src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java
changeset 59095 03fbcd06b4c0
parent 58877 aec7bf35d6f5
equal deleted inserted replaced
59094:5d4c3724e4c7 59095:03fbcd06b4c0
   352             comparison = IntegerBelowNode.create(constantReflection, metaAccess, options, smallestCompareWidth, x, y, view);
   352             comparison = IntegerBelowNode.create(constantReflection, metaAccess, options, smallestCompareWidth, x, y, view);
   353         }
   353         }
   354 
   354 
   355         return comparison;
   355         return comparison;
   356     }
   356     }
       
   357 
       
   358     public static LogicNode createFloatCompareNode(StructuredGraph graph, CanonicalCondition condition, ValueNode x, ValueNode y, boolean unorderedIsTrue, NodeView view) {
       
   359         LogicNode result = createFloatCompareNode(condition, x, y, unorderedIsTrue, view);
       
   360         return (result.graph() == null ? graph.addOrUniqueWithInputs(result) : result);
       
   361     }
       
   362 
       
   363     public static LogicNode createFloatCompareNode(CanonicalCondition condition, ValueNode x, ValueNode y, boolean unorderedIsTrue, NodeView view) {
       
   364         assert x.getStackKind() == y.getStackKind();
       
   365         assert x.getStackKind().isNumericFloat();
       
   366 
       
   367         LogicNode comparison;
       
   368         if (condition == CanonicalCondition.EQ) {
       
   369             comparison = FloatEqualsNode.create(x, y, view);
       
   370         } else {
       
   371             assert condition == CanonicalCondition.LT;
       
   372             comparison = FloatLessThanNode.create(x, y, unorderedIsTrue, view);
       
   373         }
       
   374 
       
   375         return comparison;
       
   376     }
   357 }
   377 }