RFR: 8326638: Crash in PhaseIdealLoop::remix_address_expressions due to unexpected Region instead of Loop [v2]

Tobias Hartmann thartmann at openjdk.org
Tue Feb 27 08:59:29 UTC 2024


> Adds a missing `_head->is_Loop()` check to handle the case when the loop head is not a `LoopNode` but a `RegionNode` because the loop is irreducible:
> 
> 
> (rr) p n_loop->_head->dump(1)
>   412 IfTrue === 411 [[ 345 ]] #1 !jvms: Test$Class1::Class1_method0 @ bci:286 (line 119)
>   339 SafePoint === 336 1 340 1 1 344 290 1 1 1 1 291 1 1 293 294 295 1 320 297 1 298 299 300 301 302 1 303 1 [[ 345 ]] SafePoint !jvms: Test$Class1::Class1_method0 @ bci:307 (line 122)
>   345 Region === 345 339 412 [[ 345 456 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 1861 1863 1865 1867 1882 1888 ]] #irreducible !jvms: Test$Class1::Class1_method0 @ bci:138 (line 101)
> 
> 
> We then crash when invoking `LoopNode::skip_strip_mined` on a RegionNode or assert in debug. Unfortunately, I was not able to simply the test any further.
> 
> This is a regression from [JDK-8303511](https://bugs.openjdk.org/browse/JDK-8303511) in JDK 21 b13
> 
> Thanks,
> Tobias

Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:

  Skip optimization for irreducible loops

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18002/files
  - new: https://git.openjdk.org/jdk/pull/18002/files/a6559cee..12d59c1d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18002&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18002&range=00-01

  Stats: 8 lines in 1 file changed: 0 ins; 4 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/18002.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18002/head:pull/18002

PR: https://git.openjdk.org/jdk/pull/18002


More information about the hotspot-compiler-dev mailing list