RFR: 8323220: Reassociate loop invariants involved in Cmps and Add/Subs [v9]
Joshua Cao
duke at openjdk.org
Fri Feb 16 00:58:14 UTC 2024
On Fri, 9 Feb 2024 06:14:29 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Joshua Cao has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add correctness test for some random tests with random inputs
>
> test/hotspot/jtreg/compiler/loopopts/InvariantCodeMotionReassociateCmp.java line 54:
>
>> 52: // Reassociate to `inv2 - inv1 == i`
>> 53: if (inv1 + i == inv2) {
>> 54: blackhole();
>
> If you return instead of break, do you still need the `blackhole`?
No we don't need it. But it would feel strange to have a loop with nothing in it other than comparisons of an induction variable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17375#discussion_r1491837953
More information about the hotspot-compiler-dev
mailing list