RFR: 8325746: Refactor Loop Unswitching code [v8]

Emanuel Peter epeter at openjdk.org
Mon Feb 26 11:39:02 UTC 2024


On Mon, 26 Feb 2024 11:28:20 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/loopopts/TestBaseCountedEndLoopUnswitchCandidate.java line 31:
>> 
>>> 29:  * @run main/othervm -XX:CompileCommand=compileonly,compiler.loopopts.TestBaseCountedEndLoopUnswitchCandidate::test*
>>> 30:  *                   -Xcomp -XX:LoopMaxUnroll=0 -XX:-UseLoopPredicate -XX:-RangeCheckElimination
>>> 31:  *                   compiler.loopopts.TestBaseCountedEndLoopUnswitchCandidate
>> 
>> Might it make sense to have a run with fewer flags?
>
> Do you mean an additional run? For the current run, we require the C2 flags in order to have loop peeling -> loop unswitching to get unswitching on a `BaseCountedLoopEndNode`. We might be able to find a test that requires fewer flags but I think it's okay to opt for a simpler test + flags.

Yes, I thought you could just add another `@run` with fewer flags, so that external flags have more influence, and potentially trigger other cases.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17842#discussion_r1502472293


More information about the hotspot-compiler-dev mailing list