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

[Bug][move-compiler-v2] Compiler V2 constant folding folds SHR width == type size #14631

Open
brmataptos opened this issue Sep 14, 2024 · 1 comment · May be fixed by #15982
Open

[Bug][move-compiler-v2] Compiler V2 constant folding folds SHR width == type size #14631

brmataptos opened this issue Sep 14, 2024 · 1 comment · May be fixed by #15982
Assignees
Labels
bug Something isn't working compiler-v2 stale-exempt Prevents issues from being automatically marked and closed as stale starter-task

Comments

@brmataptos
Copy link
Contributor

🐛 Bug

Compiler V2 constant-folds (0u8 >> 8) to 0, while V1 leaves this operation in to abort at runtime.

The manual says the code "may abort" if the shift width is the same as the type size, so it's technically allowed (and thus not Urgent), but this behavior differs from V1, so would be better corrected.

Case 1:

  • third_party/move/move-compiler/tests/move_check/folding/unfoldable_constants.exp
  • third_party/move/move-compiler-v2/tests/folding/unfoldable_constants.exp
    Case 2:
  • third_party/move/move-compiler/tests/move_check/folding/unfoldable_constants_blocks.exp
  • third_party/move/move-compiler-v2/tests/folding/unfoldable_constants_blocks.exp
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Oct 29, 2024
@brmataptos brmataptos added stale-exempt Prevents issues from being automatically marked and closed as stale and removed Stale labels Oct 31, 2024
@brmataptos brmataptos self-assigned this Nov 14, 2024
@brmataptos brmataptos moved this from 🆕 New to Assigned in Move Language and Runtime Nov 14, 2024
@vineethk vineethk moved this from Assigned to For Grabs in Move Language and Runtime Feb 13, 2025
@vineethk vineethk self-assigned this Feb 19, 2025
@vineethk vineethk moved this from For Grabs to Assigned in Move Language and Runtime Feb 19, 2025
@vineethk vineethk moved this from Assigned to 🏗 In progress in Move Language and Runtime Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler-v2 stale-exempt Prevents issues from being automatically marked and closed as stale starter-task
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants