# HG changeset patch # User Thomas Wuerthinger # Date 1309452344 -7200 # Node ID a2b425ca743e8946b1c8a9c8eeeaafa1d5d16c49 # Parent 573c8e2917abc595031e4118e77df392c72c8e4c fixed outdated asserts. diff -r 573c8e2917ab -r a2b425ca743e graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/EdgeMoveOptimizer.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/EdgeMoveOptimizer.java Thu Jun 30 18:39:13 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/EdgeMoveOptimizer.java Thu Jun 30 18:45:44 2011 +0200 @@ -136,8 +136,12 @@ return; } + if (predInstructions.get(predInstructions.size() - 1).code == LIROpcode.Xir) { + return; + } + assert pred.suxAt(0) == block : "invalid control flow"; - assert predInstructions.get(predInstructions.size() - 1).code == LIROpcode.Branch : "block with successor must end with branch"; + assert predInstructions.get(predInstructions.size() - 1).code == LIROpcode.Branch : "block with successor must end with branch" + predInstructions.get(predInstructions.size() - 1); assert predInstructions.get(predInstructions.size() - 1) instanceof LIRBranch : "branch must be LIROpBranch"; assert ((LIRBranch) predInstructions.get(predInstructions.size() - 1)).cond() == Condition.TRUE : "block must end with unconditional branch"; @@ -191,6 +195,11 @@ assert numSux == 2 : "method should not be called otherwise"; + if (instructions.get(instructions.size() - 1).code == LIROpcode.Xir) { + // cannot optimize when last instruction is Xir. + return; + } + assert instructions.get(instructions.size() - 1).code == LIROpcode.Branch : "block with successor must end with branch block=B" + block.blockID(); assert instructions.get(instructions.size() - 1) instanceof LIRBranch : "branch must be LIROpBranch"; assert ((LIRBranch) instructions.get(instructions.size() - 1)).cond() == Condition.TRUE : "block must end with unconditional branch";