-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Modulo operation fails on integers of bitwidth greater than 128 bits #1534
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
Comments
backtrace:
|
Hmm, llvm does not support urem and friends on integers with bitwidth > 128: urem_test.ll: define i256 @urem_test(i256 %a) {
%1 = urem i256 %a, %a
ret i256 %1
}
|
very similar to #1485 |
The short answer to this and #1485 is that we need to send a patch to LLVM to make it emit library calls for this even though the scope of those library calls is outside of the standardized compiler-rt. |
I also ran into this when trying to compare two To reproduce:
produces this output, when run with
|
LLVM15 lowers division, remainder and modulus to |
929cb68 implements But looks like another direction is being taken by LLVM. |
results in compiler error:
LLVM ERROR: Unsupported library call operation!
#1533 is related.
The text was updated successfully, but these errors were encountered: