]> granicus.if.org Git - llvm/commit
[InstCombine] Add test cases demonstrating failure to handle (select (icmp eq (and...
authorCraig Topper <craig.topper@intel.com>
Tue, 13 Jun 2017 23:30:41 +0000 (23:30 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 13 Jun 2017 23:30:41 +0000 (23:30 +0000)
commit4e62b0384420ca47f14e922f2a0e9dcbf5a0a7e4
tree3a0b5a4520049753e942a6e4c3bae9b3cbd74973
parent41342f536dabb3fddd89c07bd15ea200b4ba50e9
[InstCombine] Add test cases demonstrating failure to handle (select (icmp eq (and X, C1), 0), Y, (or Y, C2)) when the icmp portion gets turned into a truncate and a signed compare with 0.

InstCombine has an optimization that recognizes an and with the sign bit of legal type size and turns it into a truncate and compare that checks the sign bit. But the select handling code doesn't recognize this idiom.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305338 91177308-0d34-0410-b5e6-96231b3b80d8
test/Transforms/InstCombine/select-with-bitwise-ops.ll