public static long micro(long a) {
return a + 100 ;
}
sde64 -dmr -ptr_raise -icount -- java -Xbatch -XX:-TieredCompilation -XX:CompileCommand=PrintIdealPhase,test::micro,FINAL_CODE -cp . test
BB#001:
RAX 9 addL_rReg_rReg_imm_ndd === _ 11 [[ 10 2 ]] #100/0x0000000000000064 !jvms: test::micro @ bci:4 (line 5)
17 Epilog === [[ ]] [40000000017]
2 Ret === 3 5 6 7 8 9 [[ 1 ]]
java -Xbatch -XX:-TieredCompilation -XX:CompileCommand=PrintIdealPhase,test::micro,FINAL_CODE -cp . test
BB#001:
RAX 17 leaL_rReg_immL32_peep === _ 11 [[ 2 ]] #100/0x0000000000000064
19 Epilog === [[ ]] [40000000019]
2 Ret === 3 5 6 7 8 17 [[ 1 ]]
```
We can write dedicated IR framework tests to check this optimization being enforced on NDD patterns after PEEPHOLE phase
https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/lib/ir_framework/CompilePhase.java#L121
return a + 100 ;
}
sde64 -dmr -ptr_raise -icount -- java -Xbatch -XX:-TieredCompilation -XX:CompileCommand=PrintIdealPhase,test::micro,FINAL_CODE -cp . test
BB#001:
RAX 9 addL_rReg_rReg_imm_ndd === _ 11 [[ 10 2 ]] #100/0x0000000000000064 !jvms: test::micro @ bci:4 (line 5)
17 Epilog === [[ ]] [40000000017]
2 Ret === 3 5 6 7 8 9 [[ 1 ]]
java -Xbatch -XX:-TieredCompilation -XX:CompileCommand=PrintIdealPhase,test::micro,FINAL_CODE -cp . test
BB#001:
RAX 17 leaL_rReg_immL32_peep === _ 11 [[ 2 ]] #100/0x0000000000000064
19 Epilog === [[ ]] [40000000019]
2 Ret === 3 5 6 7 8 17 [[ 1 ]]
```
We can write dedicated IR framework tests to check this optimization being enforced on NDD patterns after PEEPHOLE phase
https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/lib/ir_framework/CompilePhase.java#L121
- relates to
-
JDK-8329030 Intel Advanced Performance Extension support
-
- Open
-