[InstCombine] Fold x & (-1 >> y) u>= x to x u<= (-1 >> y)
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 14 Jul 2018 12:20:06 +0000 (12:20 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 14 Jul 2018 12:20:06 +0000 (12:20 +0000)
commitfac48474ce2247a4c35da010866a07f3529337fa
tree7db93a4fa018a67e592d023e95e20ab77fea95ba
parent3591eb9296f5ca7f53d564c6fdc02540a7299ad5
[InstCombine] Fold  x & (-1 >> y) u>= x  to  x u<= (-1 >> y)

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

This pattern is not commutative. But InstSimplify will
already have taken care of the 'commutative' variant.

llvm-svn: 337096
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-uge-to-icmp-ule.ll