mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-02 10:33:53 +00:00
Do not clone arbitrary condition instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13316 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
12fe2b1b82
commit
bdcc0b8c55
@ -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…
x
Reference in New Issue
Block a user