Skip to content

Conversation

tlively
Copy link
Member

@tlively tlively commented Oct 1, 2025

Do not leave unreachable ref.cast_desc instructions with descriptors
arguments that have been optimized to no longer be descriptors. This was
intended to be inluded in #7937.

Do not leave unreachable ref.cast_desc instructions with descriptors
arguments that have been optimized to no longer be descriptors. This was
intended to be inluded in #7937.
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm % question

if (curr->type == Type::unreachable && curr->desc &&
curr->desc->type != Type::unreachable) {
assert(curr->ref->type == Type::unreachable);
replaceCurrent(curr->ref);
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to drop the desc for any effects it might have?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, because the preceding ref operand is unreachable. The desc operand will never be executed.

Copy link
Member

Choose a reason for hiding this comment

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

Oh right, thanks.

@tlively tlively enabled auto-merge (squash) October 1, 2025 23:59
@tlively tlively merged commit 23c43b5 into main Oct 2, 2025
16 checks passed
@tlively tlively deleted the gto-unreachable-desc-cast branch October 2, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants