[PATCH] D122757: [InstCombine] Fold (ctpop(X) == N) || (X != 0) into X != 0 where N > 0
Hirochika Matsumoto via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 30 12:10:03 PDT 2022
hkmatsumoto created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
hkmatsumoto requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
(ctpop(X) == N) || (X != 0) --> (X != 0) https://alive2.llvm.org/ce/z/hYL5C2 (for N = 10)
(ctpop(X) != N) && (X == 0) --> (X == 0) https://alive2.llvm.org/ce/z/oLkMvI (for N = 15)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122757
Files:
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/ispow2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122757.419239.patch
Type: text/x-patch
Size: 15663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220330/6a7bcf1a/attachment.bin>
More information about the llvm-commits
mailing list