From: Chris Lattner Date: Thu, 2 Jul 2009 15:39:39 +0000 (+0000) Subject: fix inverted logic pointed out by John McCall, noticed by inspection. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=62c762f329cb16783f19b075bb2fefe35b5d5879;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74698 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index c3aee01e644..611d24b1336 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -207,7 +207,7 @@ static unsigned getJumpThreadDuplicationCost(const BasicBlock *BB) { if (const CallInst *CI = dyn_cast(I)) { if (!isa(CI)) Size += 3; - else if (isa(CI->getType())) + else if (!isa(CI->getType())) Size += 1; } }