-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
[RISC-V] Miscompile at -O2 #84350
Comments
Can you check if #84232 fixes this? |
@llvm/issue-subscribers-backend-risc-v Author: Patrick O'Neill (patrick-rivos)
Testcase:
```c
int printf(const char *, ...);
long a;
short b = 2;
char c(unsigned char d, unsigned char e) { return e == 0 ?: d % e; }
int main() {
char f;
a = 1;
f = c(0 <= 7, b);
a ^= f;
printf("%lX\n", a);
}
```
Commands: > /scratch/tc-testing/tc-mar-5-llvm-slp-ice-2/build/bin/clang -O2 red.c -o red.out
> /scratch/tc-testing/tc-mar-4-llvm/build/bin/qemu-riscv64 red.out
FFFFFFFFFFFFFFFE
> /scratch/tc-testing/tc-mar-5-llvm-slp-ice-2/build/bin/clang red.c -o red.out
> /scratch/tc-testing/tc-mar-4-llvm/build/bin/qemu-riscv64 red.out
0
This is a recent regression. Found via fuzzer |
I checked out the head of the PR branch at #84232 and this issue does not exist there.
Thanks! |
Thanks for confirming. I'm trying to mitigate some of the fallout from that fix before committing it. |
Should be fixed by #84232. |
Testcase:
Commands:
-opt-bisect-limit
points toType Promotion on function (main)
This is a recent regression.
Known good hash: 083d8aa
Known bad hash: 8f79cdd
Found via fuzzer
The text was updated successfully, but these errors were encountered: