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

Jatin Bhateja jbhateja at openjdk.org
Tue Aug 6 00:33:34 UTC 2024


On Mon, 5 Aug 2024 16:48:52 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:
> 
>   Add IR test for codegen

LGTM

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

Marked as reviewed by jbhateja (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20275#pullrequestreview-2220047712


More information about the hotspot-compiler-dev mailing list