-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[RISCV] Miscompile with -O3 #87042
Labels
Comments
@llvm/issue-subscribers-backend-risc-v Author: Yingwei Zheng (dtcxzyw)
Reduced test case:
```
#include <stdio.h>
#include <stdint.h>
int16_t g;
int32_t f;
uint32_t h;
uint64_t j = 6;
static uint64_t o(int16_t x, uint32_t *a, int16_t ac) {
if (!x) j |= f;
f = ac ? 7 % ac : 7;
return j;
}
int main() {
uint64_t v1 = o(g, &h, 8);
uint64_t v2 = o(v1, &h, 0);
o(v2 >> 8, &h, 0);
printf("%lu\n", j);
return 0;
}
```
llvm version: ba6b2d2 |
It should be a middle-end bug since the disjoint flag is incorrectly inferred. |
Reduced LLVM IR: https://alive2.llvm.org/ce/z/d5utst
|
This was referenced Mar 29, 2024
dtcxzyw
added a commit
that referenced
this issue
Apr 11, 2024
… in threadBinOpOverSelect (#87075) Alive2: https://alive2.llvm.org/ce/z/y_Jmdn Fix #87042.
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Apr 11, 2024
… in threadBinOpOverSelect (llvm#87075) Alive2: https://alive2.llvm.org/ce/z/y_Jmdn Fix llvm#87042. (cherry picked from commit 3197f9d)
tstellar
pushed a commit
to llvmbot/llvm-project
that referenced
this issue
Apr 15, 2024
… in threadBinOpOverSelect (llvm#87075) Alive2: https://alive2.llvm.org/ce/z/y_Jmdn Fix llvm#87042. (cherry picked from commit 3197f9d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reduced test case:
llvm version: ba6b2d2
qemu version: v8.2.0
The text was updated successfully, but these errors were encountered: