mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
Dont' merge terminators that are needed to select PHI node values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e67fa05036
commit
a1f79fb08b
@ -812,7 +812,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
|
||||
|
||||
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI!=E; ++PI)
|
||||
if (BranchInst *PBI = dyn_cast<BranchInst>((*PI)->getTerminator()))
|
||||
if (PBI->isConditional()) {
|
||||
if (PBI->isConditional() && SafeToMergeTerminators(BI, PBI)) {
|
||||
if (PBI->getSuccessor(0) == FalseDest ||
|
||||
PBI->getSuccessor(1) == TrueDest) {
|
||||
// Invert the predecessors condition test (xor it with true),
|
||||
|
Loading…
x
Reference in New Issue
Block a user