-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
fshl-related miscompile by arm64 and x86-64 backends #55296
Comments
@llvm/issue-subscribers-backend-aarch64 |
@llvm/issue-subscribers-backend-x86 |
(sorry, I'm have a million alive2 tabs open, I think this is the correct one): |
I think this might be the fix
We need to make sure we clear any promoted bits before creating the UREM node. |
Candidate patch https://reviews.llvm.org/D125076 |
Should be fixed after 76f90a9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok this one is a bit of a pain so please bear with me:
let's play through what this code should do when called as
f(8, 0, 39)
%0 = 0b0001000
%1 = 0b0000000
%2 = 0b100111
%4 = 0b1100111
the concatenation of
%0
and%1
is0b00010000000000
and the shift amount is 103 mod 7, or 5. thus, after the shift we get a run of all zeroes, thereforef(8, 0, 39)
should be0
.Alive2 agrees with this analysis: https://alive2.llvm.org/ce/z/Ph-9vE
but this isn't what we get from either the x64 or arm64 backend. let's use this driver:
on x64 we get:
and on arm64:
cc @ornata @nunoplopes @ryan-berger @nbushehri @zhengyang92 @aqjune @Hatsunespica
The text was updated successfully, but these errors were encountered: