OSDN Git Service

[InstCombine] Fold x & (-1 >> y) != x to x u> (-1 >> y)
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 12 Jul 2018 14:56:12 +0000 (14:56 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 12 Jul 2018 14:56:12 +0000 (14:56 +0000)
commit83a86dd616bce8c4528c3fab172324ceb3289ee9
tree2b2649be42d8bda488eb1a776e27d00e995a2b17
parentf6e61654a198c62caecab5521b6da7087ab2dcb3
[InstCombine] Fold  x & (-1 >> y) != x  to  x u> (-1 >> y)

Summary:
A complementary fold to D49179.

https://bugs.llvm.org/show_bug.cgi?id=38123
https://rise4fun.com/Alive/Rny

Caveat: one more thing in `test/Transforms/InstCombine/icmp-logical.ll` breaks.

Reviewers: spatel, craig.topper

Reviewed By: spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D49205

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336911 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ne-to-icmp-ugt.ll
test/Transforms/InstCombine/canonicalize-low-bit-mask-and-icmp-ne-to-icmp-ugt.ll
test/Transforms/InstCombine/icmp-logical.ll