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

Cranelift: ISLE: aarch64: fix imm12_from_negated_value for i32, i16 #6078

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

avanhatt
Copy link
Member

Fixes #5903

This fixes imm12_from_negated_value to correctly sign-extend narrow values before negating them as i64 values, allowing these rules to work for non-zero negative i32 and i16.

As suggested by @jameysharp in that issue, switch imm12_from_negated_value to be a partial term with a corresponding rule.

Also updated + added to the relevant filetest.

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:aarch64 Issues related to AArch64 backend. labels Mar 21, 2023
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

This makes sense to me -- thanks!

@cfallin cfallin added this pull request to the merge queue Mar 21, 2023
@cfallin cfallin merged commit 13be561 into bytecodealliance:main Mar 21, 2023
@avanhatt avanhatt deleted the iconst-imm12 branch March 27, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:aarch64 Issues related to AArch64 backend. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cranelift: ISLE: aarch64: imm12_from_negated_value rules don't apply for i32, i16
2 participants