RFR: 8328528: C2 should optimize long-typed parallel iv in an int counted loop [v5]

Kangcheng Xu kxu at openjdk.org
Mon Jul 22 17:40:48 UTC 2024


On Thu, 13 Jun 2024 18:42:16 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Kangcheng Xu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix tests on larger strides
>
> test/hotspot/jtreg/compiler/loopopts/parallel_iv/TestParallelIvInIntCountedLoop.java line 54:
> 
>> 52:      */
>> 53:     @Test
>> 54:     @Arguments(values = {Argument.DEFAULT})
> 
> Lazy question from my side:
> Can you remind me what is the value of `DEFAULT`? Why are you choosing that?

`Argument.DEFAULT` for integers is just `0`. The value of this argument does not affect code generation: in IR the node is a variable (i.e., not a constant) anyway. During correctness tests, we use other meaningful inputs. 

I've changed it to `Argument.RANDOM_ONCE` just to show the value of it doesn't really matter.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18489#discussion_r1686906834


More information about the hotspot-compiler-dev mailing list