diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-09-15 14:15:47 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-09-15 14:15:47 +0000 |
| commit | 7577a3d799b7fd66a9053f6059dcd5877e9d56e5 (patch) | |
| tree | 38a5175352c4195a1a019b47b63b7749c3223f20 /llvm/lib/Transforms/InstCombine | |
| parent | bc2bbb2e29e0a11aaeedadbf796035a8c0b707e4 (diff) | |
| download | bcm5719-llvm-7577a3d799b7fd66a9053f6059dcd5877e9d56e5.tar.gz bcm5719-llvm-7577a3d799b7fd66a9053f6059dcd5877e9d56e5.zip | |
[InstCombine] use m_APInt to allow icmp folds using known bits for splat constant vectors
llvm-svn: 281613
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index a55bfda320f..e744dde78d3 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -3216,9 +3216,9 @@ Instruction *InstCombiner::foldICmpUsingKnownBits(ICmpInst &I) { if (~Op1KnownZero == 0) { // If the LHS is an AND with the same constant, look through it. Value *LHS = nullptr; - ConstantInt *LHSC = nullptr; - if (!match(Op0, m_And(m_Value(LHS), m_ConstantInt(LHSC))) || - LHSC->getValue() != Op0KnownZeroInverted) + const APInt *LHSC; + if (!match(Op0, m_And(m_Value(LHS), m_APInt(LHSC))) || + *LHSC != Op0KnownZeroInverted) LHS = Op0; Value *X; |

