[llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun May 2 00:20:02 PDT 2004
Changes in directory llvm/lib/Transforms/Utils:
SimplifyCFG.cpp updated: 1.40 -> 1.41
---
Log message:
Do not clone arbitrary condition instructions.
---
Diffs of the changes: (+1 -1)
Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.40 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.41
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.40 Sun May 2 00:02:03 2004
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Sun May 2 00:19:36 2004
@@ -806,7 +806,7 @@
// 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)
More information about the llvm-commits
mailing list