RFR: 8267687: ModXNode::Ideal optimization is better than Parse::do_irem

Yi Yang yyang at openjdk.java.net
Tue Jun 1 05:57:20 UTC 2021


On Tue, 1 Jun 2021 01:46:30 GMT, Yi Yang <yyang at openjdk.org> wrote:

> Hi Nils, your concerns are very reasonable! I will add more benchmark results on different archs later(This may take a while).

I've updated the detailed assembly code and benchmark results. 

In summary, ModXNode::Ideal is better than Parse::do_irem on x64 platform, benchmark results are also reproducible. I guess the reason is that Parse::do_irem generates cmp and jmp while ModXNode::Ideal does not. On AArch64 platform, the two optimizations are almost the same according to benchmark results. I am not familiar with AArch64 so I can not give a constructive answer.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4188


More information about the hotspot-compiler-dev mailing list