commit | 242aeb9d840180ab25ab6632d2ee1009998e8aa0 | [log] [tgz] |
---|---|---|
author | David Majnemer <david.majnemer@gmail.com> | Sun Oct 19 08:23:08 2014 +0000 |
committer | David Majnemer <david.majnemer@gmail.com> | Sun Oct 19 08:23:08 2014 +0000 |
tree | 7c133866a3c84900eade2de47bf744313f941256 | |
parent | 908d4514f689035f1d36e03110e2cbc375360421 [diff] |
InstCombine: Optimize icmp eq/ne (shl Const2, A), Const1 The following implements the optimization for sequences of the form: icmp eq/ne (shl Const2, A), Const1 Such sequences can be transformed to: icmp eq/ne A, (TrailingZeros(Const1) - TrailingZeros(Const2)) This handles only the equality operators for now. Other operators need to be handled. Patch by Ankur Garg! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220162 91177308-0d34-0410-b5e6-96231b3b80d8