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 } |