Considering that CI is not even IN SCOPE here, I wooda thought the compiler
authorChris Lattner <sabre@nondot.org>
Fri, 21 Nov 2003 21:57:29 +0000 (21:57 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 21 Nov 2003 21:57:29 +0000 (21:57 +0000)
would have caught this.  *sigh*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10142 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/InlineSimple.cpp

index 8b7c4adee34942b37a842d72b636c01ceb1f2619..eec2ebd694ae1d8b4e20b9979e74152948c96a3d 100644 (file)
@@ -62,7 +62,7 @@ static unsigned CountCodeReductionForConstant(Value *V) {
       Reduction += CI->getCalledValue() == V ? 500 : 0;
     } else if (InvokeInst *II = dyn_cast<InvokeInst>(*UI)) {
       // Turning an indirect call into a direct call is a BIG win
-      Reduction += CI->getCalledValue() == V ? 500 : 0;
+      Reduction += II->getCalledValue() == V ? 500 : 0;
     } else {
       // Figure out if this instruction will be removed due to simple constant
       // propagation.