[PATCH] D136582: [InstCombine] fold sub pattern to and
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 00:59:42 PDT 2022
bcl5980 created this revision.
bcl5980 added reviewers: spatel, RKSimon.
Herald added a subscriber: hiraditya.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`C - ((C3 -nuw X) & C2) --> X & C2`
when:
`((C2 & C3) == C)` && `(C3 - C + 1) is Pow2`
https://alive2.llvm.org/ce/z/V4-4YP
Fix: #58523
https://reviews.llvm.org/D136582
Files:
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/sub.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136582.470076.patch
Type: text/x-patch
Size: 4487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221024/5c873200/attachment.bin>
More information about the llvm-commits
mailing list