RFR: 8336860: x86: Change integer src operand for CMoveL of 0 and 1 to long [v2]

Chen Liang liach at openjdk.org
Thu Jul 25 13:47:34 UTC 2024


On Mon, 22 Jul 2024 18:37:57 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:
>> 
>>                                         Baseline                     Patch           Improvement
>> Benchmark                Mode  Cnt    Score   Error  Units      Score   Error  Units
>> BasicRules.cmovL_imm_01  avgt   15  259.073 ± 5.806  ns/op    231.108 ± 2.730  ns/op  (+ 11.41%)
>> 
>> Thoughts and reviews would be appreciated!
>
> Jasmine Karthikeyan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Move benchmark to vm.compiler

@eme64 or @TobiHartmann might take a look too, I guess?

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

PR Comment: https://git.openjdk.org/jdk/pull/20275#issuecomment-2250360868


More information about the hotspot-compiler-dev mailing list