[all-commits] [llvm/llvm-project] 637e81: Reland `[CodeGenPrepare] Convert `ctpop(X) ==/!= 1...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Mon Oct 14 17:18:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 637e81f8adfe725c73aeafa4c2315d962be4770d
https://github.com/llvm/llvm-project/commit/637e81f8adfe725c73aeafa4c2315d962be4770d
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2024-10-15 (Tue, 15 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:
-----------
Reland `[CodeGenPrepare] Convert `ctpop(X) ==/!= 1` into `ctpop(X) u</u> 2/1` (#111284)` (#111998)
Relands #111284. Test failure with stage2 build has been fixed by
https://github.com/llvm/llvm-project/pull/111946.
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