[all-commits] [llvm/llvm-project] 5080a0: [CodeGenPrepare] Unfold slow ctpop when used in po...

Sergei Barannikov via All-commits all-commits at lists.llvm.org
Tue Apr 22 22:54:31 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5080a0251fe3352d26560075a9b3b8c9acb13d23
      https://github.com/llvm/llvm-project/commit/5080a0251fe3352d26560075a9b3b8c9acb13d23
  Author: Sergei Barannikov <barannikov88 at gmail.com>
  Date:   2025-04-23 (Wed, 23 Apr 2025)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/test/CodeGen/PowerPC/vector-popcnt-128-ult-ugt.ll
    M llvm/test/CodeGen/RISCV/GlobalISel/rv32zbb.ll
    M llvm/test/CodeGen/RISCV/GlobalISel/rv64zbb.ll
    A llvm/test/CodeGen/RISCV/pr101786.ll
    M llvm/test/CodeGen/RISCV/rv32zbb.ll
    M llvm/test/CodeGen/RISCV/rv64zbb.ll
    M llvm/test/CodeGen/X86/ispow2.ll
    A llvm/test/CodeGen/X86/pr94829.ll
    M llvm/test/CodeGen/X86/vector-popcnt-128.ll
    M llvm/test/CodeGen/X86/vector-popcnt-256-ult-ugt.ll
    M llvm/test/CodeGen/X86/vector-popcnt-256.ll
    M llvm/test/CodeGen/X86/vector-popcnt-512-ult-ugt.ll
    M llvm/test/CodeGen/X86/vector-popcnt-512.ll
    A llvm/test/Transforms/CodeGenPrepare/unfold-pow2-test-vec.ll
    A llvm/test/Transforms/CodeGenPrepare/unfold-pow2-test.ll

  Log Message:
  -----------
  [CodeGenPrepare] Unfold slow ctpop when used in power-of-two test (#102731)

DAG combiner already does this transformation, but in some cases it does
not have a chance because either CodeGenPrepare or SelectionDAGBuilder
move icmp to a different basic block.

https://alive2.llvm.org/ce/z/ARzh99

Fixes #94829

Pull Request: https://github.com/llvm/llvm-project/pull/102731



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list