From: Craig Topper Date: Thu, 4 May 2017 21:45:49 +0000 (+0000) Subject: [JumpThreading] When processing compares, explicitly check that the result type is... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=195a2d9be0a76a7531e1a1614045664814ea309b;p=llvm [JumpThreading] When processing compares, explicitly check that the result type is not a vector rather than check for it being an integer. Compares always return a scalar integer or vector of integers. isIntegerTy returns false for vectors, but that's not completely obvious. So using isVectorTy is less confusing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302198 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index c7ac955cde0..ae353ea4459 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -580,7 +580,7 @@ bool JumpThreadingPass::ComputeValueKnownInPredecessors( // If comparing a live-in value against a constant, see if we know the // live-in value on any predecessors. - if (isa(Cmp->getOperand(1)) && Cmp->getType()->isIntegerTy()) { + if (isa(Cmp->getOperand(1)) && !Cmp->getType()->isVectorTy()) { Constant *CmpConst = cast(Cmp->getOperand(1)); if (!isa(Cmp->getOperand(0)) ||