summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/shl-unsigned-cmp-const.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two ↵Huihui Zhang2019-06-251-22/+22
| | | | | | | | | | | | | | | | | | | | | | | -> icmp eq/ne (and %x, (lshr -C1, C2)), 0. Simplify 'shl' inequality test into 'and' equality test. This pattern happens in the middle-end while simplifying bitfield access, Exposed in https://reviews.llvm.org/D63505 https://rise4fun.com/Alive/6uz Reviewers: lebedev.ri, efriedma Reviewed By: lebedev.ri Subscribers: spatel, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63675 llvm-svn: 364348
* [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, ↵Huihui Zhang2019-06-251-0/+236
C2), C1. Summary: '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. ``` Reviewers: lebedev.ri, efriedma Reviewed By: lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63670 llvm-svn: 364256
OpenPOWER on IntegriCloud