# HG changeset patch # User Josef Eisl # Date 1396513414 -7200 # Node ID 63bc517c354383c32bf61b3fad34513f23ca0502 # Parent fe00ea6439be192d41b16ac02c4aeb7c2a4d6499 BaselineCompiler: implement genIf. diff -r fe00ea6439be -r 63bc517c3543 graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java --- a/graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java Fri Apr 04 12:29:46 2014 +0200 +++ b/graal/com.oracle.graal.baseline/src/com/oracle/graal/baseline/BaselineBytecodeParser.java Thu Apr 03 10:23:34 2014 +0200 @@ -390,21 +390,10 @@ } } - // the mirroring and negation operations get the condition into canonical form - boolean mirror = cond.canonicalMirror(); - boolean negate = cond.canonicalNegate(); - - Value a = mirror ? y : x; - Value b = mirror ? x : y; + LabelRef trueDestination = LabelRef.forSuccessor(lirGenRes.getLIR(), currentBlock, 0); + LabelRef falseDestination = LabelRef.forSuccessor(lirGenRes.getLIR(), currentBlock, 1); - LabelRef trueDestination = LabelRef.forSuccessor(lirGenRes.getLIR(), trueBlock, 0); - LabelRef falseDestination = LabelRef.forSuccessor(lirGenRes.getLIR(), falseBlock, 1); - - if (negate) { - gen.emitCompareBranch(a.getKind(), a, b, cond, false, falseDestination, trueDestination, 1 - probability); - } else { - gen.emitCompareBranch(a.getKind(), a, b, cond, false, trueDestination, falseDestination, probability); - } + gen.emitCompareBranch(x.getKind(), x, y, cond, false, trueDestination, falseDestination, probability); } @Override