Do not clone arbitrary condition instructions.
authorChris Lattner <sabre@nondot.org>
Sun, 2 May 2004 05:19:36 +0000 (05:19 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 2 May 2004 05:19:36 +0000 (05:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13316 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyCFG.cpp

index a5153d65e3208af998c856b1c39f93e2b1fa99b1..446bad88f7514ebb0b7e0f1696949fd255431e03 100644 (file)
@@ -806,7 +806,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
       // predecessor and use logical operations to pick the right destination.
       BasicBlock *TrueDest  = BI->getSuccessor(0);
       BasicBlock *FalseDest = BI->getSuccessor(1);
-      if (Instruction *Cond = dyn_cast<Instruction>(BI->getCondition()))
+      if (BinaryOperator *Cond = dyn_cast<BinaryOperator>(BI->getCondition()))
         if (Cond->getParent() == BB && &BB->front() == Cond &&
             Cond->getNext() == BI && Cond->hasOneUse() &&
             TrueDest != BB && FalseDest != BB)