RFR: 8339733: C2: some nodes can have incorrect control after do_range_check() [v3]

Roland Westrelin roland at openjdk.org
Wed Sep 11 08:10:45 UTC 2024


> PhaseIdealLoop::do_range_check() sets the control of the new pre and
> main limits to be the entry control of the pre loop but it eliminates
> all conditions whose parameters are invariant in the main loop. Most
> of the time they are also invariant in the pre loop but that's not
> guaranteed. It does happen sometimes that those parameters are pinned
> in the pre loop. In that case, PhaseIdealLoop::do_range_check() sets
> wrong controls.
> 
> This doesn't cause any issue today AFAICT.
> 
> Also, this seems to be a typo in PhaseIdealLoop::insert_pre_post_loops():
> 
> 
> pre_head->in(0)
> 
> 
> is `pre_head`. I fixed that one too.

Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:

  review

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20908/files
  - new: https://git.openjdk.org/jdk/pull/20908/files/24889f3b..03d80a49

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

  Stats: 21 lines in 2 files changed: 3 ins; 0 del; 18 mod
  Patch: https://git.openjdk.org/jdk/pull/20908.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20908/head:pull/20908

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


More information about the hotspot-compiler-dev mailing list