diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-05-04 21:45:49 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-05-04 21:45:49 +0000 |
commit | 1f673d4450a45c47ffd6ba7f017316e88b165829 (patch) | |
tree | abaf89be40b92a8bf7b7519ef095328df4e6068d /llvm/lib/Transforms | |
parent | 930689ada4fea96bea869a440873079437661974 (diff) | |
download | bcm5719-llvm-1f673d4450a45c47ffd6ba7f017316e88b165829.tar.gz bcm5719-llvm-1f673d4450a45c47ffd6ba7f017316e88b165829.zip |
[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
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index c7ac955cde0..ae353ea4459 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<Constant>(Cmp->getOperand(1)) && Cmp->getType()->isIntegerTy()) { + if (isa<Constant>(Cmp->getOperand(1)) && !Cmp->getType()->isVectorTy()) { Constant *CmpConst = cast<Constant>(Cmp->getOperand(1)); if (!isa<Instruction>(Cmp->getOperand(0)) || |