Attached Test2.java demonstrates that C2 does not remove unused runtime calls emitted for drem/frem.
java -XX:-TieredCompilation -XX:CompileCommand=print,Test2::test1 -Xbatch Test2.java
[...]
0x00007467451ccd44: callq *%r10
0x00007467451ccd47: nopl 0x0(%rax,%rax,1) ;*frem {reexecute=0 rethrow=0 return_oop=0}
; - Test2::test2@2 (line 8)
; {post_call_nop}
0x00007467451ccd4f: add $0x10,%rsp
[...]
This is a follow-up fromJDK-8345766.
java -XX:-TieredCompilation -XX:CompileCommand=print,Test2::test1 -Xbatch Test2.java
[...]
0x00007467451ccd44: callq *%r10
0x00007467451ccd47: nopl 0x0(%rax,%rax,1) ;*frem {reexecute=0 rethrow=0 return_oop=0}
; - Test2::test2@2 (line 8)
; {post_call_nop}
0x00007467451ccd4f: add $0x10,%rsp
[...]
This is a follow-up from
- relates to
-
JDK-8345766 C2 should emit macro nodes for ModF/ModD instead of calls during parsing
-
- Resolved
-
-
JDK-8347901 C2 should remove unused leaf / pure runtime calls
-
- Open
-
-
JDK-8349364 C1 sometimes fails to remove useless modulo operations
-
- Open
-
- links to
-
Commit(master) openjdk/jdk/4109c73a
-
Review(master) openjdk/jdk/23694