Skip to content

8360175: C2 crash: assert(edge_from_to(prior_use,n)) failed: before block local scheduling #26157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/peephole_x86_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ bool Peephole::lea_remove_redundant(Block* block, int block_index, PhaseCFG* cfg
for (DUIterator_Fast imax, i = decode->fast_outs(imax); i < imax; i++) {
Node* dependant_lea = decode->fast_out(i);
if (dependant_lea->is_Mach() && dependant_lea->as_Mach()->ideal_Opcode() == Op_AddP) {
dependant_lea->set_req(AddPNode::Base, decode_address);
dependant_lea->set_req(AddPNode::Base, lea_derived_oop->in(AddPNode::Address));
Copy link
Member

Choose a reason for hiding this comment

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

The fix looks reasonable to me, too. No worries about the regression test, thanks for trying! A small question: Why don't we use lea_address?

Another thing I've noticed while browsing the code: ra_ and new_root seem to be unused and could be removed (could probably also be squeezed into this PR here instead of creating a new issue just for that).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We cannot use lea_address because in case of a spill that also gets moved up one node to check if the lea and the decode point to the same grandparent.

Another thing I've noticed while browsing the code: ra_ and new_root seem to be unused and could be removed.

These arguments come from the machinery that calls this out of the matcher. I am not too familiar with it, so my working assumption so far has been to keep the signature the same as the other peepholes, which seems logical since it is called by generated code.

// This deleted something in the out array, hence adjust i, imax.
--i;
--imax;
Expand Down