[PATCH] D141990: [InstCombine] Add transform ctpop(X) -> 1 iff X is non-zero power of 2
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 22:47:32 PST 2023
goldstein.w.n created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Definitionally a non-zero power of 2 will only have 1 bit set so this
is a freebee.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141990
Files:
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/ctpop-pow2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141990.490046.patch
Type: text/x-patch
Size: 4554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230118/64917bbc/attachment.bin>
More information about the llvm-commits
mailing list