[all-commits] [llvm/llvm-project] e3894f: [CodeGenPrepare] Convert `ctpop(X) ==/!= 1` into `...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Thu Oct 10 18:08:59 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e3894f58e1a534c57f53b3beb21d6b2f0d3382b2
https://github.com/llvm/llvm-project/commit/e3894f58e1a534c57f53b3beb21d6b2f0d3382b2
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2024-10-11 (Fri, 11 Oct 2024)
Changed paths:
M llvm/lib/CodeGen/CodeGenPrepare.cpp
M llvm/test/CodeGen/AArch64/arm64-popcnt.ll
M llvm/test/CodeGen/RISCV/rv32zbb.ll
M llvm/test/CodeGen/RISCV/rv64zbb.ll
M llvm/test/CodeGen/X86/ispow2.ll
M llvm/test/CodeGen/X86/known-never-zero.ll
Log Message:
-----------
[CodeGenPrepare] Convert `ctpop(X) ==/!= 1` into `ctpop(X) u</u> 2/1` (#111284)
Some targets have better codegen for `ctpop(X) u< 2` than `ctpop(X) ==
1`. After https://github.com/llvm/llvm-project/pull/100899, we set the
range of ctpop's return value to indicate the argument/result is
non-zero.
This patch converts `ctpop(X) ==/!= 1` into `ctpop(X) u</u> 2/1` in CGP
to fix https://github.com/llvm/llvm-project/issues/95255.
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