From 1f673d4450a45c47ffd6ba7f017316e88b165829 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 4 May 2017 21:45:49 +0000 Subject: [PATCH] [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. llvm-svn: 302198 --- llvm/lib/Transforms/Scalar/JumpThreading.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index c7ac955..ae353ea 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/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)) || -- 2.7.4