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

SignatureRefining: Notice LUB requirements of intrinsic calls #6122

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

kripken
Copy link
Member

@kripken kripken commented Nov 15, 2023

call.without.effects implies a call to the function reference in the last parameter,
so the values sent in the other parameters must be taken into account when
computing LUBs for refining arguments, otherwise we might refine so much that
the intrinsic call no longer validates.

@kripken kripken requested a review from tlively November 15, 2023 00:57
Comment on lines +989 to +991
;; Test we consider call.without.effects when deciding what to refine. $A has
;; two subtypes, B1 and B2, and a call.without.effects sends in one while a
;; normal call sends in the other. As a result, we cannot refine to either.
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to additionally test that the refinement can still happen if there is a call without effects involved and the types work out.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. I'll start automerge now as I am gone for the evening and want to get this on the way for the user that hit it, and will open a followup PR tomorrow with that extra test.

@kripken kripken enabled auto-merge (squash) November 15, 2023 02:04
@kripken kripken disabled auto-merge November 15, 2023 03:09
@kripken kripken merged commit 20fe882 into main Nov 15, 2023
13 of 14 checks passed
@kripken kripken deleted the sigref.notice.intrinsics branch November 15, 2023 03:09
kripken added a commit that referenced this pull request Nov 15, 2023
kripken added a commit that referenced this pull request Nov 16, 2023
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
…embly#6122)

call.without.effects implies a call to the function reference in the last parameter,
so the values sent in the other parameters must be taken into account when
computing LUBs for refining arguments, otherwise we might refine so much that
the intrinsic call no longer validates.
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 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