Skip to content
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

TupleOptimization: Properly handle subtyping in copies #6786

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

kripken
Copy link
Member

@kripken kripken commented Jul 25, 2024

We used the target's type for the read from the source, but due to subtyping those
might be different.

Found by the fuzzer.

@kripken kripken requested a review from tlively July 25, 2024 15:19
@@ -320,8 +320,13 @@ struct TupleOptimization : public WalkerPass<PostWalker<TupleOptimization>> {
// we were confused earlier and the target should not be.
assert(sourceBase);

// The source and target may have different lane types due to subtyping
Copy link
Member

Choose a reason for hiding this comment

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

Usually we use "element" rather than "lane" to describe tuple elements. ("lane" is specific to SIMD vectors.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed. Also fixed some existing appearances.

@kripken kripken merged commit d903dd3 into WebAssembly:main Jul 25, 2024
13 checks passed
@kripken kripken deleted the tuple.opt.sub branch July 25, 2024 17:17
@gkdn gkdn mentioned this pull request Aug 31, 2024
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