[PATCH] D124763: [InstCombine] Fold A + (B & ~A) to A | B
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 09:38:41 PDT 2022
nikic updated this revision to Diff 426434.
nikic added a comment.
Implement as part of `haveNoCommonBitsSet()` instead.
The second pattern (canonical form for constants) doesn't get fully folded in this case, so this will require an additional `or` fold. But that seems like something we'd want to do anyway.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124763/new/
https://reviews.llvm.org/D124763
Files:
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstCombine/add.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124763.426434.patch
Type: text/x-patch
Size: 6895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220502/1a0b0edf/attachment.bin>
More information about the llvm-commits
mailing list