mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-26 21:47:07 +00:00
Do not clone arbitrary condition instructions.
llvm-svn: 13316
This commit is contained in:
parent
da2d746a3b
commit
d8345001fa
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user