-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P3
-
Affects Version/s: 9
-
Component/s: hotspot
Math.pow() doesn't constant folds when inputs are constant. For example, Math.pow(2, 1) should be replaced by `2`. This is not happening.
It was observed starting with JDK11. JDK 8 is approximately 20 times faster with constant base and exponent. This is likely a performance regression withJDK-8145688.
Additionally, strength reduction with Math.pow(x, 2.0D) => x*x introduced withJDK-8190869 does not work if the exponent only become a constant later during igvn. This should also be adressed.
This issue was noticed and reported by one of our customers.
It was observed starting with JDK11. JDK 8 is approximately 20 times faster with constant base and exponent. This is likely a performance regression with
Additionally, strength reduction with Math.pow(x, 2.0D) => x*x introduced with
This issue was noticed and reported by one of our customers.
- relates to
-
JDK-8190869 C2: missing strength reduction of Math.pow(x, 2.0D) to x*x
-
- Resolved
-
-
JDK-8145688 update for x86 pow in the math lib
-
- Resolved
-