[InstCombine] foldICmpWithLowBitMaskedVal(): disable 2 faulty folds.
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 3 Dec 2018 20:07:58 +0000 (20:07 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 3 Dec 2018 20:07:58 +0000 (20:07 +0000)
commit7bf2fed16773b549f9abf6cdaa4b42f2f2644ed5
tree5418846be3447317399c9598f12f0c2744f84db8
parentf75f88d090c46a7fd9da3c966678e19f2c301a55
[InstCombine] foldICmpWithLowBitMaskedVal(): disable 2 faulty folds.

These two folds are invalid for this non-constant pattern
when the mask ends up being all-ones:
https://rise4fun.com/Alive/9au
https://rise4fun.com/Alive/UcQM

Fixes https://bugs.llvm.org/show_bug.cgi?id=39861

llvm-svn: 348181
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-sge-to-icmp-sle.ll
llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-slt-to-icmp-sgt.ll