< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java

Print this page

        

*** 316,327 **** private boolean isConstant() { /* * There are many forms of NaNs and any operations on them can silently convert them into * the canonical NaN. */ ! return (Double.compare(lowerBound, upperBound) == 0 && nonNaN); } private static FloatStamp stampForConstant(Constant constant) { FloatStamp result; PrimitiveConstant value = (PrimitiveConstant) constant; --- 316,329 ---- private boolean isConstant() { /* * There are many forms of NaNs and any operations on them can silently convert them into * the canonical NaN. + * + * We need to exclude 0 here since it can contain -0.0 && 0.0 . */ ! return (Double.compare(lowerBound, upperBound) == 0 && nonNaN) && lowerBound != 0; } private static FloatStamp stampForConstant(Constant constant) { FloatStamp result; PrimitiveConstant value = (PrimitiveConstant) constant;
< prev index next >