RFR: 8336860: x86: Change integer src operand for CMoveL of 0 and 1 to long
Aleksey Shipilev
shade at openjdk.org
Mon Jul 22 10:03:31 UTC 2024
On Mon, 22 Jul 2024 03:33:23 GMT, Jasmine Karthikeyan <jkarthikeyan at openjdk.org> wrote:
> Hi all,
> This patch fixes `cmovL_imm_01*` instructions matching against an integer immediate 1 instead of a long immediate 1. I noticed while looking at the backend implementation of CMove that the rules specify `immI_1` instead of `immL1`, which means that the instructions can't be matched and instead falls through to the base case. I added a small benchmark and got these results (time unit changed from us to ns for clarity):
>
> Baseline Patch Improvement
> Benchmark (size) Mode Cnt Score Error Units Score Error Units
> Longs.cmovConstant01 500 avgt 15 133.254 ± 14.804 ns/op 97.845 ± 2.486 ns/op (+ 30.64%)
>
> Thoughts and reviews would be appreciated!
Ah, oops. @merykitty might confirm this was not intentional.
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20275#pullrequestreview-2191161038
More information about the hotspot-compiler-dev
mailing list