RFR: 8373480: Optimize multiplication by constant multiplier using LEA instructions [v6]

Emanuel Peter epeter at openjdk.org
Thu Jan 8 16:10:10 UTC 2026


On Thu, 8 Jan 2026 15:57:39 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Extending micro and jtreg tests for memory patterns
>
> test/hotspot/jtreg/compiler/c2/TestConstantMultiplier.java line 89:
> 
>> 87:         ));
>> 88:         var testTemplate1 = Template.make(() -> scope(
>> 89:             IntStream.of(81, 73, 45, 41, 37, 27, 25, 21, 19, 13, 11).mapToObj(
> 
> Is there something special about these values? If yes: add a code comment :)
> If no: could we add random values to the list to improve coverage and find edge cases?

Ah, I see now that these are the values from your lookup table in the optimization.

I think it would still be good if you added random values, just for result verification.
And only enable IR rules for the special values.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28759#discussion_r2672960296


More information about the hotspot-compiler-dev mailing list