summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChen Zheng <shchenz@cn.ibm.com>2018-07-16 00:51:40 +0000
committerChen Zheng <shchenz@cn.ibm.com>2018-07-16 00:51:40 +0000
commitb972273f984997cda449480927e12ec22046bd9b (patch)
tree766651260243e933e516a29601d04c10bf5a0c09 /llvm/lib
parent7bb2767fba25313c3c4b002127b5ff35836d0627 (diff)
downloadbcm5719-llvm-b972273f984997cda449480927e12ec22046bd9b.tar.gz
bcm5719-llvm-b972273f984997cda449480927e12ec22046bd9b.zip
[InstCombine] fold icmp pred (sub 0, X) C for vector type
Differential Revision: https://reviews.llvm.org/D49283 llvm-svn: 337141
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 784ff9eb56c..f91eb9da99e 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -3154,8 +3154,8 @@ Instruction *InstCombiner::foldICmpBinOp(ICmpInst &I) {
if (NoOp0WrapProblem && ICmpInst::isSigned(Pred)) {
Value *X;
if (match(BO0, m_Neg(m_Value(X))))
- if (ConstantInt *RHSC = dyn_cast<ConstantInt>(Op1))
- if (!RHSC->isMinValue(/*isSigned=*/true))
+ if (Constant *RHSC = dyn_cast<Constant>(Op1))
+ if (RHSC->isNotMinSignedValue())
return new ICmpInst(I.getSwappedPredicate(), X,
ConstantExpr::getNeg(RHSC));
}
OpenPOWER on IntegriCloud