[InstCombine] Remove the (not (sext)) case from foldBoolSextMaskToSelect and inline...
authorCraig Topper <craig.topper@intel.com>
Fri, 4 Aug 2017 16:07:20 +0000 (16:07 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 4 Aug 2017 16:07:20 +0000 (16:07 +0000)
commit760ff6ee872aaefdbbe780667b6597b6a742067f
tree89b6250602daeb056abc20690bda1168e2d87c71
parent3b74a68cc707b776633fc501a822dae3c3ac9400
[InstCombine] Remove the (not (sext)) case from foldBoolSextMaskToSelect and inline the remaining code to match visitOr

Summary:
The (not (sext)) case is really (xor (sext), -1) which should have been simplified to (sext (xor, 1)) before we got here. So we shouldn't need to handle it.

With that taken care of we only need to two cases so don't need the swap anymore. This makes us in sync with the equivalent code in visitOr so inline this to match.

Reviewers: spatel, eli.friedman, majnemer

Reviewed By: spatel

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D36240

llvm-svn: 310063
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/vector-casts.ll