RFR: 8323220: Reassociate loop invariants involved in Cmps and Add/Subs [v6]
Emanuel Peter
epeter at openjdk.org
Wed Feb 7 07:45:54 UTC 2024
On Tue, 6 Feb 2024 18:51:38 GMT, Joshua Cao <duke at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/loopopts/InvariantCodeMotionReassociateCmp.java line 115:
>>
>>> 113: }
>>> 114: }
>>> 115: }
>>
>> I suggest you add a test that first iterates some number of iterations, and then returns inside the if-statement with return value i. Then you check if that value is as expected.
>> Because with all the tests that you have here, I'm not sure if really all branches are always taken, or if they may lead to uncommon traps, and hence leave some things uncovered by testing.
>
> @eme64 can you take a look at the updates?
@caojoshua I don't think you have added what I requested. Do you have any test that does the reassociation, and where you verify that the computed values are correct?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17375#discussion_r1481013888
More information about the hotspot-compiler-dev
mailing list