Skip to content

ComputeSideEffects: correct side effects for destroy_addr #62864

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

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

eeckstein
Copy link
Contributor

A destroy_addr also involves a read from the address. It's equivalent to a %x = load [take] and destroy_value %x.
It's also a write, because the stored value is not available anymore after the destroy.

Fixes a compiler crash in SILMem2Reg.

rdar://103879105

Also, ignore side effects of debug_value with address operands.

A destroy_addr also involves a read from the address. It's equivalent to a `%x = load [take]` and `destroy_value %x`.
It's also a write, because the stored value is not available anymore after the destroy.

Fixes a compiler crash in SILMem2Reg.

rdar://103879105
…perands

We already ignored side effects of debug_value with non-address operands. Now also do this for address operands.
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

1 similar comment
@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 6b33768 into swiftlang:main Jan 5, 2023
@eeckstein eeckstein deleted the fix-compute-side-effects branch January 5, 2023 19:35
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.

1 participant