RFR: 8291809: Convert compiler/c2/cr7200264/TestSSE2IntVect.java to IR verification test [v2]

Daniel Lundén dlunden at openjdk.org
Thu Jan 18 14:08:12 UTC 2024


On Thu, 18 Jan 2024 13:27:40 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Isn't that whitelist only for flags passed down through JTREG? For example, when I add `"-XX:LoopUnrollLimit=0"` (not in the whitelist) to the `runWithFlags` arguments, all the IR tests fail.
>
> Ok then, let me explain IR Framework whitelists, and `runWithFlags`:
> Generally, we want a test to be run from the outside with as many flag combinations as possible, since some bugs only trigger with strange combinations.
> On the other hand, we need some way to say under what conditions an IR rule should be checked, because many flags might have side-effects on the IR, and disable all sorts of optimizations.
> We chose the whitelist approach: those flags are expected generally not to change the IR, or change it in a way that could also happen on other machines, and therefore must be allowed to simulate those machines (e.g. UseAVX).
> If you have a test that is not ok with any combination of the whitelisted flags, then the test must further restrict the IR rule with `applyIf` statements.
> 
> Sometimes, we want to make sure that IR rules are ok with flag settings that are not allowed by the whitelist, for example `OptimizeFill` (it has an effect, but maybe an effect we want to check for in a specific test). Or maybe we want to overwrite some flag setting for specific reasons (put up some node limit, etc). In those cases, it can make sense to use `runWithFlags`.
> 
> In the case of this test, I don't see why you would want to set `-XX:LoopUnrollLimit=0` via `runWithFlags`. Of course this makes all tests fail, because it messes up unrolling, and without unrolling you have no SuperWord, and without SuperWord you have no vectorization.
> But if anybody were to set this flag from the outside (via JTREG), then it would disable the IR rules implicitly (because the flag is not on the whitelist), and the jtreg test would pass as a whole.
> 
> Does that make sense, and help?

Yes, thanks, that corresponds to my understanding of the framework. Sorry if I was unclear, we of course do not want to include `-XX:LoopUnrollLimit=0`, that was just an example to illustrate the difference between whitelisting and `runWithFlags` (and what originally spawned this issue: https://bugs.openjdk.org/browse/JDK-8291809).

The question is if we want to include `-XX:StressLongCountedLoop=0` in `runWithFlags`, as that flag was part of the original test. I'm fine with removing it if it no longer makes sense in the IR framework.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17428#discussion_r1457489284


More information about the hotspot-compiler-dev mailing list