RFR: 8350756: C2 SuperWord Multiversioning: remove useless slow loop when the fast loop disappears [v5]
Christian Hagedorn
chagedorn at openjdk.org
Tue Mar 4 14:08:06 UTC 2025
On Tue, 4 Mar 2025 13:39:55 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/loopopts/superword/TestMultiversionRemoveUselessSlowLoop.java line 38:
>>
>>> 36: */
>>> 37:
>>> 38: public class TestMultiversionRemoveUselessSlowLoop {
>>
>> Is it also possible to add an IR test where we can check that a `OpaqueMultiversioning` node is first in the graph and then removed? Maybe we can check that in loop opts phase n, `COUNTED_LOOP_MAIN` and `OpaqueMultiversioning` is present. Then in loop opts phase n + 1, `COUNTED_LOOP_MAIN` is removed and in n + 2, `OpaqueMultiversioning` is removed as well. But I'm not sure if this is reliable enough when some loop opts change - though could easily be fixed or dropped again if the test fails at some point.
>
> @chhagedorn I created an IR test, let me know if it looks good enough for you :)
Nice test! Thanks for taking the extra effort. I only have a small suggestion for it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23865#discussion_r1979524288
More information about the hotspot-compiler-dev
mailing list