summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/JumpThreading.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-02 15:39:39 +0000
committerChris Lattner <sabre@nondot.org>2009-07-02 15:39:39 +0000
commitf3f6aaa2c3490d760feee6847f7c2292aed6b2a5 (patch)
tree858b3cbe5f036c0d4a1a4513bab83164cc39f62c /llvm/lib/Transforms/Scalar/JumpThreading.cpp
parentf9cf4ffcc70ad7524d0b2cd9cb856df17e2056f4 (diff)
downloadbcm5719-llvm-f3f6aaa2c3490d760feee6847f7c2292aed6b2a5.tar.gz
bcm5719-llvm-f3f6aaa2c3490d760feee6847f7c2292aed6b2a5.zip
fix inverted logic pointed out by John McCall, noticed by inspection.
This was considering vector intrinsics to have cost 2, but non-vector intrinsics to have cost 1, which is backward. llvm-svn: 74698
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index c3aee01e644..611d24b1336 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -207,7 +207,7 @@ static unsigned getJumpThreadDuplicationCost(const BasicBlock *BB) {
if (const CallInst *CI = dyn_cast<CallInst>(I)) {
if (!isa<IntrinsicInst>(CI))
Size += 3;
- else if (isa<VectorType>(CI->getType()))
+ else if (!isa<VectorType>(CI->getType()))
Size += 1;
}
}
OpenPOWER on IntegriCloud