RFR: 8334647: C2: CastII added by PhaseIdealLoop::add_template_assertion_predicate() should have control [v3]

Roland Westrelin roland at openjdk.org
Fri Jul 12 10:30:23 UTC 2024


> `PhaseIdealLoop::add_template_assertion_predicate()` creates a new
> `CastII` but doesn't set its control. I think it's good practice to
> always set the control of a `CastII` when it narrows the type of its
> input (it has to be control dependent on some condition that makes the
> narrowing possible). This is also motivated by
> https://bugs.openjdk.org/browse/JDK-8275202 where a node that becomes
> top is used as an indication that control flow where the node changes
> type can constant fold. This only works if control is set correctly.

Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:

 - Merge branch 'master' into JDK-8334647
 - review
 - Merge branch 'master' into JDK-8334647
 - review
 - review
 - fix

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19808/files
  - new: https://git.openjdk.org/jdk/pull/19808/files/b22ba3f7..4029073b

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

  Stats: 29143 lines in 934 files changed: 16804 ins; 8413 del; 3926 mod
  Patch: https://git.openjdk.org/jdk/pull/19808.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19808/head:pull/19808

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


More information about the hotspot-compiler-dev mailing list