[PATCH] D132888: [InstCombine] reduce test-for-overflow of shifted value
Tian Zhou via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 14:29:03 PDT 2022
tianz created this revision.
tianz added reviewers: spatel, RKSimon.
Herald added a subscriber: hiraditya.
Herald added a project: All.
tianz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Refer to issue #57338 <https://github.com/llvm/llvm-project/issues/57338>. The added code makes the following transformations:
For unsigned predicates / eq / ne:
icmp pred (x << 1), x --> icmp getSignedPredicate(pred) x, 0
icmp pred x, (x << 1) --> icmp getSignedPredicate(pred) 0, x
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132888
Files:
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/icmp-shl-1-overflow.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132888.456459.patch
Type: text/x-patch
Size: 8092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220829/3dba7a27/attachment.bin>
More information about the llvm-commits
mailing list