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

iadd_cout and isub_bout wrong for signed values #1100

Closed
bjorn3 opened this issue Jul 13, 2019 · 2 comments
Closed

iadd_cout and isub_bout wrong for signed values #1100

bjorn3 opened this issue Jul 13, 2019 · 2 comments
Labels
bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 13, 2019

https://github.com/CraneStation/cranelift/blob/2b1cfea1634c58d22b880eb082c748350041c3f0/cranelift-codegen/meta/src/shared/legalize.rs#L465-L477

They should do a signed comparison for signed integers.

Edit: when y is negative, the condition should be inverted too.

@bnjbvr
Copy link
Member

bnjbvr commented Jul 29, 2019

Good catch, thanks for reporting.

@alexcrichton alexcrichton transferred this issue from bytecodealliance/cranelift Feb 28, 2020
@alexcrichton alexcrichton added bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator labels Feb 28, 2020
@cfallin
Copy link
Member

cfallin commented May 4, 2022

Closing in favor of #2860 as we need to implement the carry/borrow-out-as-flag in general (we no longer use the old legalizations).

@cfallin cfallin closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

No branches or pull requests

4 participants