OSDN Git Service

[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)
commit60e082b13fc7ad25249f281b5a5fd89734c7b66b
tree0cc70d98de3f98d9de6502760c726cad05808859
parent7e8494f5c2b7a411cf26c0a6dd06d2ffe368adcc
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334347 91177308-0d34-0410-b5e6-96231b3b80d8
test/Transforms/InstCombine/canonicalize-lshr-shl-to-masking.ll [new file with mode: 0644]