-
Notifications
You must be signed in to change notification settings - Fork 12.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
[RISC-V] Miscompile at -O3 #111555
Labels
Comments
@llvm/issue-subscribers-backend-risc-v Author: Patrick O'Neill (patrick-rivos)
Testcase:
```c
int printf(const char *, ...);
short a, d, k, r, s;
int b, c, f, i, w, y = -963555834;
char e, g, h, j, n, p, u, x;
unsigned l;
long m;
long long aa;
void ab(short ac, int ad, int ae, unsigned af) {
for (long o = 0; o < 10969; o += af)
for (int q = 0; q < (s ?: (0 >= ae) > p); q = -10827206556692219962ULL) {
for (int t = j; t; t = u) {
for (int v = 0; v < i; v += 2) {
for (long z = r; z; z += 4) {
a = w ? k / j : m;
b = x ? ad ? p ?: d : 0 : r;
}
for (; 0 < ({
__typeof__(0) ag = l;
ag;
});)
;
for (char ah = 0; ah < 1; ah += 178)
;
for (; 2 < w;)
;
for (; 0 < s;)
;
for (int ai = 0; ai < 21; ai += 4)
;
for (; p;)
c = 0;
}
for (short aj = 0; aj < 3; aj += r) {
for (char ak = j; ak; ak++)
d ^= ~0;
for (short al = (unsigned short)ad - 24655; al < (short)l; al += 4)
e += ae;
for (short am = (unsigned short)ad - 24655; am; am = 4)
;
}
}
for (int an = 0; an < ae + 963555845; an += 4)
for (long ao = s; ao < ae + 963555845; ao += 4) {
for (char ap = -7; ap < 3; ap += ac)
for (char aq = n; aq < 1; aq += 2) {
f += ac;
g = ({
__typeof__(0) ar = b ? ({ r < (unsigned short)p; }) : 0;
g ?: ar;
});
}
h = ({ h ?: x; });
}
}
}
void as(long long *ac, int ad) { *ac = ad; }
int main() {
ab(2, 10958, y, 8);
as(&aa, f);
printf("%llu\n", aa);
}
```
Commands:
-opt-bisect-limit points to Stack Slot Coloring on function (ab) Found via fuzzer |
There was a stackcoloring bug file just today. I wonder if its related #126252 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Testcase:
Commands:
-opt-bisect-limit points to Stack Slot Coloring on function (ab)
Found via fuzzer
The text was updated successfully, but these errors were encountered: