changeset 3122:ab218bdf7077

Removed unnecessary jump.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Thu, 30 Jun 2011 18:00:22 +0200
parents 17d96a6af824
children 33f0052372c6
files graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/lir/LIRBlock.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/lir/LIRBlock.java	Thu Jun 30 17:53:23 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/lir/LIRBlock.java	Thu Jun 30 18:00:22 2011 +0200
@@ -276,7 +276,12 @@
         if (instructionsList.size() == 0) {
             return false;
         }
-        LIROpcode code = instructionsList.get(instructionsList.size() - 1).code;
+        LIRInstruction lirInstruction = instructionsList.get(instructionsList.size() - 1);
+        if (lirInstruction instanceof LIRXirInstruction) {
+            LIRXirInstruction lirXirInstruction = (LIRXirInstruction) lirInstruction;
+            return (lirXirInstruction.falseSuccessor() != null) && (lirXirInstruction.trueSuccessor() != null);
+        }
+        LIROpcode code = lirInstruction.code;
         return code == LIROpcode.Branch || code == LIROpcode.TableSwitch;
     }
 }