-
Bug
-
Resolution: Fixed
-
P3
-
8, 11, 17, 21, 25
-
b16
C2 incorrectly folds '0 - (0 - x)' to 'x' for double and float 'x':
https://github.com/openjdk/jdk/blob/4b463ee70eceb94fdfbffa5c49dd58dcc6a6c890/src/hotspot/share/opto/subnode.cpp#L56-L62
Attached test demonstrates this:
java -XX:-TieredCompilation -Xbatch -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,Test::test* Test.java
Exception in thread "main" java.lang.RuntimeException: Invalid result: -2147483648
at Test.main(Test.java:37)
https://github.com/openjdk/jdk/blob/4b463ee70eceb94fdfbffa5c49dd58dcc6a6c890/src/hotspot/share/opto/subnode.cpp#L56-L62
Attached test demonstrates this:
java -XX:-TieredCompilation -Xbatch -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,Test::test* Test.java
Exception in thread "main" java.lang.RuntimeException: Invalid result: -2147483648
at Test.main(Test.java:37)
- links to
-
Commit(master) openjdk/jdk/5591f8a4
-
Review(master) openjdk/jdk/24150