[PATCH] D63670: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2), C1.
Huihui Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 14:00:55 PDT 2019
huihuiz created this revision.
huihuiz added reviewers: lebedev.ri, efriedma.
Herald added a project: LLVM.
'shl' inequality test
icmp ult/uge (shl %x, C2), C1 iff C1 is power of two
can be simplified as 'and' equality test
icmp eq/ne (and %x, (lshr -C1, C2)), 0.
Repository:
rL LLVM
https://reviews.llvm.org/D63670
Files:
llvm/test/Transforms/InstCombine/shl-and-unsigned-cmp-const.ll
llvm/test/Transforms/InstCombine/shl-unsigned-cmp-const.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63670.206069.patch
Type: text/x-patch
Size: 16836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190621/79e67ba7/attachment.bin>
More information about the llvm-commits
mailing list