This cast<Instruction> is unnecessary.
authorDan Gohman <gohman@apple.com>
Mon, 22 Feb 2010 02:07:36 +0000 (02:07 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 22 Feb 2010 02:07:36 +0000 (02:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96771 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/IndVarSimplify.cpp

index 60492b028369e2cf325dc60e3f4186f83d145320..91447d12b15c6f226aeac4f0c5476e8b07f3f59b 100644 (file)
@@ -190,7 +190,7 @@ ICmpInst *IndVarSimplify::LinearFunctionTestReplace(Loop *L,
 
   ICmpInst *Cond = new ICmpInst(BI, Opcode, CmpIndVar, ExitCnt, "exitcond");
 
-  Instruction *OrigCond = cast<Instruction>(BI->getCondition());
+  Value *OrigCond = BI->getCondition();
   // It's tempting to use replaceAllUsesWith here to fully replace the old
   // comparison, but that's not immediately safe, since users of the old
   // comparison may not be dominated by the new comparison. Instead, just