RFR: 8351568: Improve source code documentation for PhaseCFG::insert_anti_dependences [v2]

Daniel Lundén dlunden at openjdk.org
Mon May 5 09:04:49 UTC 2025


On Wed, 30 Apr 2025 10:09:53 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/loopopts/TestSplitIfPinnedLoadInStripMinedLoop.java line 141:
>> 
>>> 139: 
>>> 140:     // Same as test2 but with reference to inner loop induction variable 'j' and different order of instructions.
>>> 141:     // Triggers an assert in PhaseCFG::raise_above_anti_dependences if loop strip mining verification is disabled:
>> 
>> Is this test still valid? According to the comment it should trigger an assert but this assert appears to be removed? Is the test correct if the test is passing even though the assert has been removed? See my above comment on the removal of this assertion.
>
> Ah, good catch. Let me try to verify that my new asserts also trigger if I revert the fix for [JDK-8260420](https://bugs.openjdk.org/browse/JDK-8260420).

Unfortunately, it was not straightforward to revert the fix for [JDK-8260420](https://bugs.openjdk.org/browse/JDK-8260420) (too many changes since then). If `!LCA_orig->dominates(pred_block) || early->dominates(pred_block)` failed at some point, then the new assert `early->dominates(LCA_orig)` must also fail in that situation (in theory). See the details in my other response above.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24926#discussion_r2073093682


More information about the hotspot-compiler-dev mailing list