jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8334647: C2: CastII added by PhaseIdealLoop::add_template_assertion_predicate() should have control

Open rwestrel opened this issue 8 months ago • 11 comments

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.


Progress

  • [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issue

  • JDK-8334647: C2: CastII added by PhaseIdealLoop::add_template_assertion_predicate() should have control (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19808/head:pull/19808
$ git checkout pull/19808

Update a local copy of the PR:
$ git checkout pull/19808
$ git pull https://git.openjdk.org/jdk.git pull/19808/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19808

View PR using the GUI difftool:
$ git pr show -t 19808

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19808.diff

Webrev

Link to Webrev Comment

rwestrel avatar Jun 20 '24 14:06 rwestrel