From bdcc0b8c55041ff89b59f0ea2cdbc2ac02f26a3d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 2 May 2004 05:19:36 +0000 Subject: [PATCH] Do not clone arbitrary condition instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13316 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/SimplifyCFG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index a5153d65e32..446bad88f75 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -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(BI->getCondition())) + if (BinaryOperator *Cond = dyn_cast(BI->getCondition())) if (Cond->getParent() == BB && &BB->front() == Cond && Cond->getNext() == BI && Cond->hasOneUse() && TrueDest != BB && FalseDest != BB)