src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java
changeset 48861 47f19ff9903c
parent 47216 71c04702a3d5
child 49451 e06f9607f370
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java	Fri Feb 02 10:37:48 2018 -0500
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java	Fri Feb 02 17:28:17 2018 -0800
@@ -83,15 +83,7 @@
     @Override
     public void lower(LoweringTool tool) {
         if (graph().getGuardsStage().allowsFloatingGuards()) {
-            /*
-             * Don't allow guards with action None and reason RuntimeConstraint to float. In cases
-             * where 2 guards are testing equivalent conditions they might be lowered at the same
-             * location. If the guard with the None action is lowered before the other guard then
-             * the code will be stuck repeatedly deoptimizing without invalidating the code.
-             * Conditional elimination will eliminate the guard if it's truly redundant in this
-             * case.
-             */
-            if (getAction() != DeoptimizationAction.None || getReason() != DeoptimizationReason.RuntimeConstraint) {
+            if (getAction() != DeoptimizationAction.None) {
                 ValueNode guard = tool.createGuard(this, getCondition(), getReason(), getAction(), getSpeculation(), isNegated()).asNode();
                 this.replaceAtUsages(guard);
                 graph().removeFixed(this);