[PATCH] D110488: [InstCombine] Canonicalize ((X & -X) - 1) --> (~X & (X - 1)) (PR51784)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 05:10:46 PDT 2022
RKSimon updated this revision to Diff 455168.
RKSimon retitled this revision from "[InstCombine] Fold ctpop((x & -x ) - 1) -> cttz(x, false) (PR51784)" to "[InstCombine] Canonicalize ((X & -X) - 1) --> (~X & (X - 1)) (PR51784)".
RKSimon edited the summary of this revision.
RKSimon added a reviewer: nikic.
RKSimon added a comment.
Herald added a project: All.
Replaced the ctpop fold with a generic ((X & -X) - 1) --> (~X & (X - 1)) canonicalization
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110488/new/
https://reviews.llvm.org/D110488
Files:
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/add-mask-neg.ll
llvm/test/Transforms/InstCombine/ctpop-cttz.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110488.455168.patch
Type: text/x-patch
Size: 6264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220824/9399b922/attachment.bin>
More information about the llvm-commits
mailing list