RFR: 8347459: C2: missing transformation for chain of shifts/multiplications by constants [v5]

Marc Chevalier duke at openjdk.org
Fri Mar 7 13:11:40 UTC 2025


On Fri, 7 Mar 2025 09:17:21 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:

>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   + comment on why not zerocon
>
> test/hotspot/jtreg/compiler/c2/irTests/LShiftINodeIdealizationTests.java line 178:
> 
>> 176: 
>> 177:         short[] arr = new short[1];
>> 178:         arr[0] = (short)1;
> 
> What do you think about using random short value here? (I was just thinking it might slightly increase the chances of spotting if something is wrong with the shifts...)

That makes sense. I use the random `a` everywhere else, so why not here, too!? So, done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23728#discussion_r1985034602


More information about the hotspot-compiler-dev mailing list