RFR: 8350756: C2 SuperWord Multiversioning: remove useless slow loop when the fast loop disappears [v4]

Emanuel Peter epeter at openjdk.org
Tue Mar 4 13:45:52 UTC 2025


On Tue, 4 Mar 2025 08:31:14 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   rm condition
>
> 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 :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23865#discussion_r1979455969


More information about the hotspot-compiler-dev mailing list