Skip to content

Conversation

@rwestrel
Copy link
Contributor

@rwestrel rwestrel commented Dec 5, 2025

The crash occurs because verification code expects the inner and outer
loop of a loop strip mining nest to have the same number of phis but,
in this case, the inner loop has one more memory phis than the outer
loop.

  1. After OuterStripMinedLoopNode::adjust_strip_mined_loop, inner and
    outer loops have the same number of phis, as expected.
 309  MergeMem  === _ 1 306 1 1 284  [[ 429 ]]  { - - N284:instptr:java/lang/Throwable (java/io/Serializable):BotPTR+20,iid=bot [narrow] }  Memory: @ptr:BotPTR+bot, idx=Bot; !orig=205 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)

 248  OuterStripMinedLoop  === 248 321 247  [[ 248 249 428 429 430 ]] 
 429  Phi  === 248 309 205  [[ 93 ]]  #memory  Memory: @ptr:BotPTR+bot, idx=Bot; !orig=93 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
 430  Phi  === 248 306 121  [[ 94 ]]  #memory  Memory: @instptr:TestMismatchedMemoryPhis:BotPTR+16,iid=bot, name=l, idx=4; !orig=94 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)

 249  CountedLoop  === 249 248 197  [[ 249 119 96 93 94 ]] inner stride: 1  strip mined !orig=[223],[91] !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  93  Phi  === 249 429 205  [[ 117 97 ]]  #memory  Memory: @ptr:BotPTR+bot, idx=Bot; !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  94  Phi  === 249 430 121  [[ 97 ]]  #memory  Memory: @instptr:TestMismatchedMemoryPhis:BotPTR+16,iid=bot, name=l, idx=4; !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  1. Then PhiNode::Ideal runs for 429 and pushed the MergeMem 309
    through the outer loop phi:
 248  OuterStripMinedLoop  === 248 321 247  [[ 248 249 428 429 430 444 446 ]] 
 430  Phi  === 248 306 121  [[ 94 ]]  #memory  Memory: @instptr:TestMismatchedMemoryPhis:BotPTR+16,iid=bot, name=l, idx=4; !orig=94 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
 444  Phi  === 248 306 121  [[ 445 ]]  #memory  Memory: @ptr:BotPTR+bot, idx=Bot; !orig=429,93 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
 446  Phi  === 248 284 170  [[ 445 ]]  #memory  Memory: @instptr:java/lang/Throwable (java/io/Serializable):BotPTR+20,iid=bot [narrow], name=detailMessage, idx=5; !orig=444,429,93 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)

 445  MergeMem  === _ 1 444 1 1 446  [[ 93 ]]  { - - N446:instptr:java/lang/Throwable (java/io/Serializable):BotPTR+20,iid=bot [narrow] }  Memory: @ptr:BotPTR+bot, idx=Bot; !orig=[429],93 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)

 249  CountedLoop  === 249 248 197  [[ 249 119 96 93 94 ]] inner stride: 1  strip mined !orig=[223],[91] !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  93  Phi  === 249 445 205  [[ 117 97 ]]  #memory  Memory: @ptr:BotPTR+bot, idx=Bot; !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  94  Phi  === 249 430 121  [[ 97 ]]  #memory  Memory: @instptr:TestMismatchedMemoryPhis:BotPTR+16,iid=bot, name=l, idx=4; !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  1. PhiNode::Identity runs for 430 and finds that it can be replace
    by 429: the non bottom memory phi 430 can be replaced by the bottom
    memory 429 that has the same inputs.
 248  OuterStripMinedLoop  === 248 321 247  [[ 248 249 428 446 444 ]] 
 446  Phi  === 248 284 170  [[ 445 ]]  #memory  Memory: @instptr:java/lang/Throwable (java/io/Serializable):BotPTR+20,iid=bot [narrow], name=detailMessage, idx=5; !orig=444,[429],93 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
 444  Phi  === 248 306 121  [[ 445 94 ]]  #memory  Memory: @ptr:BotPTR+bot, idx=Bot; !orig=[429],93 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)

 445  MergeMem  === _ 1 444 1 1 446  [[ 93 ]]  { - - N446:instptr:java/lang/Throwable (java/io/Serializable):BotPTR+20,iid=bot [narrow] }  Memory: @ptr:BotPTR+bot, idx=Bot; !orig=[429],93 !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)

 249  CountedLoop  === 249 248 197  [[ 249 119 96 93 94 ]] inner stride: 1  strip mined !orig=[223],[91] !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  93  Phi  === 249 445 205  [[ 117 97 ]]  #memory  Memory: @ptr:BotPTR+bot, idx=Bot; !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  94  Phi  === 249 444 121  [[ 97 ]]  #memory  Memory: @instptr:TestMismatchedMemoryPhis:BotPTR+16,iid=bot, name=l, idx=4; !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  1. PhiNode::Ideal runs for 93 and pushed the MergeMem through that
    Phi:
 248  OuterStripMinedLoop  === 248 321 247  [[ 248 249 428 446 444 ]] 
 446  Phi  === 248 284 170  [[ 453 ]]  #memory  Memory: @instptr:java/lang/Throwable (java/io/Serializable):BotPTR+20,iid=bot [narrow], name=detailMessage, idx=5; !orig=444,[429],[93] !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
 444  Phi  === 248 306 121  [[ 451 94 ]]  #memory  Memory: @ptr:BotPTR+bot, idx=Bot; !orig=[429],[93] !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)

 249  CountedLoop  === 249 248 197  [[ 249 119 96 453 94 451 ]] inner stride: 1  strip mined !orig=[223],[91] !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
 453  Phi  === 249 446 170  [[ 452 ]]  #memory  Memory: @instptr:java/lang/Throwable (java/io/Serializable):BotPTR+20,iid=bot [narrow], name=detailMessage, idx=5; !orig=451,[93] !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
  94  Phi  === 249 444 121  [[ 97 ]]  #memory  Memory: @instptr:TestMismatchedMemoryPhis:BotPTR+16,iid=bot, name=l, idx=4; !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)
 451  Phi  === 249 444 121  [[ 452 ]]  #memory  Memory: @ptr:BotPTR+bot, idx=Bot; !orig=[93] !jvms: TestMismatchedMemoryPhis::mainTest @ bci:37 (line 49)

Now, PhiNode::Identity for 94 could replace it with the bottom
memory phi with same inputs 451. But it doesn't run. It last ran
between 3) and 4) and there's no reason for igvn to execute it again
because 4) doesn't cause 94 to change in any way.

The fix I propose is to mirror the transformation from
PhiNode::Identity in PhiNode::Ideal so the end result doesn't
depend on what phi is modified and processed by igvn last.


Progress

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

Issue

  • JDK-8370200: Crash: assert(outer->outcnt() >= phis + 2 - be_loads && outer->outcnt() <= phis + 2 + stores + 1) failed: only phis (Bug - P3)(⚠️ The fixVersion in this issue is [26] but the fixVersion in .jcheck/conf is 27, a new backport will be created when this pr is integrated.)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28677

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 5, 2025

👋 Welcome back roland! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 5, 2025

@rwestrel This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8370200: Crash: assert(outer->outcnt() >= phis + 2 - be_loads && outer->outcnt() <= phis + 2 + stores + 1) failed: only phis

Reviewed-by: rcastanedalo, dlunden, dfenacci

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 119 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Dec 5, 2025
@openjdk
Copy link

openjdk bot commented Dec 5, 2025

@rwestrel The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 5, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 5, 2025

Copy link
Member

@dlunde dlunde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @rwestrel!

Now, PhiNode::Identity for 94 could replace it with the bottom memory phi with same inputs 451. But it doesn't run. It last ran between 3) and 4) and there's no reason for igvn to execute it again because 4) doesn't cause 94 to change in any way.

Just to double check, does VerifyIterativeGVN identify this missed transformation? If not, we should make sure it does.

The fix I propose is to mirror the transformation from PhiNode::Identity in PhiNode::Ideal so the end result doesn't depend on what phi is modified and processed by igvn last.

Correct me if I'm wrong, but do we not achieve the same thing if we identify and add 94 to the worklist after the transformation of 93 -> 451? This possibly seems like a cleaner solution to me (see my code comment below).

Comment on lines 2683 to 2702
// PhiNode::Identity replaces a non bottom memory phi with a bottom memory phi with same inputs if it exists
// This performs the mirror transformation: it looks for non bottom memory phis with same inputs as this bottom memory
// phi and replaces them by this phi.
// The reason for having the same transformation in 2 places is so all candidates are transformed. For instance, if
// the bottom memory phi's inputs are changed (so it can now replace the non bottom memory phi) only after the non
// bottom memory phi is processed by igvn, having the transformation in PhiNode::Identity is not sufficient
if (can_reshape && type() == Type::MEMORY && adr_type() == TypePtr::BOTTOM) {
PhaseIterGVN* igvn = phase->is_IterGVN();
uint phi_len = req();
Node* phi_reg = region();
for (DUIterator_Fast imax, i = phi_reg->fast_outs(imax); i < imax; i++) {
Node* u = phi_reg->fast_out(i);
assert(!u->is_Phi() || (u->in(0) == phi_reg && u->req() == phi_len), "broken Phi/Region subgraph");
if (u->is_Phi() && u->as_Phi()->can_be_replaced_by(this)) {
igvn->replace_node(u, this);
--i; --imax;
}
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems a bit out of place to transform other Phi nodes in the Ideal call for this Phi node. Can't we just instead readd all matching other Phis that we can transform to the worklist, and let IGVN handle it in a subsequent iteration?

@rwestrel
Copy link
Contributor Author

rwestrel commented Dec 9, 2025

Thanks for working on this @rwestrel!

Now, PhiNode::Identity for 94 could replace it with the bottom memory phi with same inputs 451. But it doesn't run. It last ran between 3) and 4) and there's no reason for igvn to execute it again because 4) doesn't cause 94 to change in any way.

Just to double check, does VerifyIterativeGVN identify this missed transformation? If not, we should make sure it does.

It doesn't because PhaseIterGVN::verify_Identity_for() skips Phi nodes. All issues related to Phi nodes in VerifyIterativeGVN would need to be fixed first.

The fix I propose is to mirror the transformation from PhiNode::Identity in PhiNode::Ideal so the end result doesn't depend on what phi is modified and processed by igvn last.

Correct me if I'm wrong, but do we not achieve the same thing if we identify and add 94 to the worklist after the transformation of 93 -> 451? This possibly seems like a cleaner solution to me (see my code comment below).

In principle, yes.
The question is how do you reliably get 94 on the igvn queue.
In this particular case, PhiNode::Ideal() creates 451 and enqueues it on the igvn queue with register_new_node_with_optimizer(). Do we want to add custom logic in PhiNode::Ideal() to also enqueue all memory Phis that are uses of the region?
It's likely not sufficient in the general case as, maybe, the transformation can only happen once one input of the bottom Phi is changed. So do we need something like PhaseIterGVN::add_users_of_use_to_worklist() as well? It wouldn't quite the same as we wouldn't enqueue uses of a use but the uses of a common input (the region)?
Or rather than having logic in a couple different places to enqueue the non bottom memory Phi, maybe, we can do that in PhiNode::Ideal for the bottom Phi which would essentially bethe patch I propose but, instead of making any change to the graph, it would enqueue the non bottom Phi so PhiNode::Identity does the change. It seems a bit wasteful to delay the change to the graph when it can be done safely in PhiNode::Ideal for the bottom memory Phi which is why I went with the change I propose.

@dlunde
Copy link
Member

dlunde commented Dec 9, 2025

The question is how do you reliably get 94 on the igvn queue.
In this particular case, PhiNode::Ideal() creates 451 and enqueues it on the igvn queue with register_new_node_with_optimizer(). Do we want to add custom logic in PhiNode::Ideal() to also enqueue all memory Phis that are uses of the region?
It's likely not sufficient in the general case as, maybe, the transformation can only happen once one input of the bottom Phi is changed. So do we need something like PhaseIterGVN::add_users_of_use_to_worklist() as well? It wouldn't quite the same as we wouldn't enqueue uses of a use but the uses of a common input (the region)?

I'm not sure about the exact mechanism, but it would be nice if PhiNode::Ideal adds all relevant nodes to the worklist after creating a new Bot memory Phi. Optimally, we'd like VerifyIterativeGVN to notify us of any missing cases. Sounds like two follow-up issues: (1) support Phi nodes in VerifyIterativeGVN and (2) use the information from VerifyIterativeGVN to fix missing cases.

Or rather than having logic in a couple different places to enqueue the non bottom memory Phi, maybe, we can do that in PhiNode::Ideal for the bottom Phi which would essentially bethe patch I propose but, instead of making any change to the graph, it would enqueue the non bottom Phi so PhiNode::Identity does the change. It seems a bit wasteful to delay the change to the graph when it can be done safely in PhiNode::Ideal for the bottom memory Phi which is why I went with the change I propose.

Right, this is what I propose to fix the present issue and it seems cleaner to me (we let Identity handle the identity transformations). I doubt there'll be a measurable compilation time difference. I don't have a strong opinion though, so we can go with what you propose as well. Let's see what other reviewers think before we make a decision!

@robcasloz
Copy link
Contributor

I just started some internal testing, will come back with results in a day or two, and hopefully also start reviewing this soon.

Copy link
Contributor

@dafedafe dafedafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @rwestrel!

Right, this is what I propose to fix the present issue and it seems cleaner to me (we let Identity handle the identity transformations). I doubt there'll be a measurable compilation time difference.

It seems to be slightly simpler as well and a bit more inline with what Ideal should do. That said, I'm not too sure of what the "guidelines" are. So, really I have no strong opinions either.

}

bool PhiNode::can_be_replaced_by(const PhiNode* other) const {
return type() == Type::MEMORY && other->type() == Type::MEMORY && adr_type() != TypePtr::BOTTOM &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I might miss something but I was wondering if we strictly need to check for adr_type() != TypePtr::BOTTOM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting we could do:

bool PhiNode::can_be_replaced_by(const PhiNode* other) const {
  return type() == Type::MEMORY && other->type() == Type::MEMORY && other->adr_type() == TypePtr::BOTTOM && has_same_inputs_as(other);
}

?

If there are 2 memory Phis with same inputs and same adr_type then global value numbering should common them so that would make no difference.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I was thinking (to have one less operand).

@robcasloz
Copy link
Contributor

I just started some internal testing, will come back with results in a day or two, and hopefully also start reviewing this soon.

Test results look good except for trivial failures in product runs of the new tests, due to missing -XX:+UnlockDiagnosticVMOptions for the stress options.

Right, this is what I propose to fix the present issue and it seems cleaner to me (we let Identity handle the identity transformations). I doubt there'll be a measurable compilation time difference. I don't have a strong opinion though, so we can go with what you propose as well. Let's see what other reviewers think before we make a decision!

Like Daniel and Damon, I also have a slight preference towards enqueuing the node and letting PhiNode::Identity perform the change.

rwestrel and others added 4 commits December 11, 2025 10:14
…ryPhis.java

Co-authored-by: Roberto Castañeda Lozano <robcasloz@users.noreply.github.com>
…ryPhis.java

Co-authored-by: Roberto Castañeda Lozano <robcasloz@users.noreply.github.com>
@rwestrel
Copy link
Contributor Author

Like Daniel and Damon, I also have a slight preference towards enqueuing the node and letting PhiNode::Identity perform the change.

Thanks @dlunde @dafedafe @robcasloz for the comments. I made that change.

@robcasloz
Copy link
Contributor

Like Daniel and Damon, I also have a slight preference towards enqueuing the node and letting PhiNode::Identity perform the change.

Thanks @dlunde @dafedafe @robcasloz for the comments. I made that change.

Thanks Roland, will come back with internal test results.

Copy link
Member

@dlunde dlunde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @rwestrel! A few very minor suggestions.

rwestrel and others added 3 commits December 11, 2025 16:40
Co-authored-by: Daniel Lundén <daniel.lunden@oracle.com>
…ryPhis.java

Co-authored-by: Daniel Lundén <daniel.lunden@oracle.com>
Co-authored-by: Daniel Lundén <daniel.lunden@oracle.com>
Copy link
Contributor

@dafedafe dafedafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Thank you @rwestrel!

Copy link
Contributor

@robcasloz robcasloz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 12, 2025
Comment on lines +60 to +62
} catch (NullPointerException npe) {
// Expected
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this exception be avoided, and still reproduce the bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure doesn't reproduce without it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So iArrFld[] must be null for this to reproduce?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to reproduce it without it but couldn't. I'm not sure why the exception handling code is needed but it seems it is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the main method is not even compiled, right? Do we ever deopt, and then recompile maybe? I suppose don't worry about it too much. I just don't like random catch statements, because they could hide bugs down the line. But it is a very slim chance that this would happen anyway.

Comment on lines +2684 to +2701
// PhiNode::Identity replaces a non-bottom memory phi with a bottom memory phi with the same inputs, if it exists.
// If the bottom memory phi's inputs are changed (so it can now replace the non-bottom memory phi) or if it's created
// only after the non-bottom memory phi is processed by igvn, PhiNode::Identity doesn't run and the transformation
// doesn't happen.
// Look for non-bottom Phis that should be transformed and enqueue them for igvn so that PhiNode::Identity executes for
// them.
if (can_reshape && type() == Type::MEMORY && adr_type() == TypePtr::BOTTOM) {
PhaseIterGVN* igvn = phase->is_IterGVN();
uint phi_len = req();
Node* phi_reg = region();
for (DUIterator_Fast imax, i = phi_reg->fast_outs(imax); i < imax; i++) {
Node* u = phi_reg->fast_out(i);
assert(!u->is_Phi() || (u->in(0) == phi_reg && u->req() == phi_len), "broken Phi/Region subgraph");
if (u->is_Phi() && u->as_Phi()->can_be_replaced_by(this)) {
igvn->_worklist.push(u);
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another drive-by question:
You are refactoring / fixing existing optimizations:
Are there IR tests that cover the original optimization? How do we avoid that we lose optimizations here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None was integrated with the initial change. I added one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And how confident are you that this one test ensures there won't be a regression?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eme64: My understanding of this issue is that it is really a case of nodes not being added properly to the IGVN worklist. What @rwestrel does is simply adding the missing entries to the worklist; he is not changing an existing optimization.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlunde @robcasloz @rwestrel I leave this to you all. If you are very sure that the change is trivial, and that no additional IR tests are helpful, then leave it. But I've seen it happen multiple times that seemingly "trivial" changes have suddenly disabled older optimizations, and nobody noticed in the review. That's why I'm cautious in these cases.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eme64 Right, always good to be cautious. In this case, the only thing we do is igvn->_worklist.push(u);, which should be harmless and really only enable further optimizations. I'll let @rwestrel confirm!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, the only thing we do is igvn->_worklist.push(u);, which should be harmless and really only enable further optimizations.

If you are sure about that. I have not looked at it in depth. But what I see is also that code was moved from Identity to Ideal, and refactored.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code was refactored but not moved. It is fairly similar to bugs fixed by adding logic to PhaseIterGVN::add_users_of_use_to_worklist().

…ryPhis.java

Co-authored-by: Emanuel Peter <emanuel.peter@oracle.com>
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Dec 12, 2025
@rwestrel
Copy link
Contributor Author

What should I do with this change? Should I go ahead and integrate?

@robcasloz
Copy link
Contributor

What should I do with this change? Should I go ahead and integrate?

I'm happy with the current version of this changeset, please give me one or two days to re-run it through or CI test system.

Copy link
Contributor

@robcasloz robcasloz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test results look good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 18, 2025
@rwestrel
Copy link
Contributor Author

@robcasloz @dlunde @dafedafe thanks for the reviews and testing

@rwestrel
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 18, 2025

Going to push as commit 2ba423d.
Since your change was applied there have been 119 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 18, 2025
@openjdk openjdk bot closed this Dec 18, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 18, 2025
@openjdk
Copy link

openjdk bot commented Dec 18, 2025

@rwestrel Pushed as commit 2ba423d.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

5 participants