[NFC][InstCombine] Tests for (x >> y) << y -> x & (-1 << y) fold.
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 9 Jun 2018 09:27:43 +0000 (09:27 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 9 Jun 2018 09:27:43 +0000 (09:27 +0000)
commit8aada65f8131abdc4b72ae33fd57fcb35f1fe5b3
tree960866d84da105a64f96d83fbe18800f2d1d3146
parent794e29f964c41504e2a06c9f09984a7278b16c91
[NFC][InstCombine] Tests for  (x >> y) << y  ->  x & (-1 << y)  fold.

We already do it for splat constants, but not just values.
Also, undef cases are mostly non-functional.

https://bugs.llvm.org/show_bug.cgi?id=37603
https://reviews.llvm.org/D46760#1123713
https://rise4fun.com/Alive/cplX

llvm-svn: 334347
llvm/test/Transforms/InstCombine/canonicalize-lshr-shl-to-masking.ll [new file with mode: 0644]