-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
x86_64: Bug multiplying @as(u17, @intCast(u8)) * comptime_int
#19607
Comments
I don't believe this should be happening anyway, but just wanted to note that the |
@mochalins Problem still happens with |
I think that the problem is related to the code in CodeGen.zig in line 9183: if (switch (tag) {
else => unreachable,
.mul, .mul_wrap => dst_abi_size != src_abi_size and dst_abi_size != src_abi_size * 2,
.div_trunc, .div_floor, .div_exact, .rem, .mod => dst_abi_size != src_abi_size,
} or src_abi_size > 8) When |
aarch64 have same issus
|
No longer reproduces. |
Oops, misfire. |
Zig Version
0.12.0-dev.3528+423cb317f
Steps to Reproduce and Observed Behavior
Expected Behavior
No crash. I spent a while reading the Intel developer's manual but now I understand less.
Edit: Remove unnecessary @intcast
The text was updated successfully, but these errors were encountered: