Skip to content

[embedded] Respect float arg lowering convention under -mfloat-abi=hard #74354

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 1 commit into from
Jun 14, 2024

Conversation

kubamracek
Copy link
Contributor

In IRGen, when we emit an entry point to a @convention(c) function, we have an assumption that if you have a coersion type that is a StructType, the elements are always supposed to be passed as individual elements of the struct (multiple elements of the explosion). This is not true under -mfloat-abi=hard. Let's fix that by only limiting the struct explosion to args that have AI.getCanBeFlattened() == true.

Fixes #72626

rdar://119725141

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek added the embedded Embedded Swift label Jun 12, 2024
Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

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

lgtm

@kubamracek kubamracek merged commit 17eef27 into swiftlang:main Jun 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedded Embedded Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explosion.h - Assertion failed: (NextValue < Values.size()), function claimNext
2 participants