Issue 171571
Summary [PowerPC] Wrong code at -O1
Labels backend:PowerPC, miscompilation
Assignees
Reporter XChy
    Reduced tescase: [reduced.c](https://github.com/user-attachments/files/24070790/reduced.c)
The testcase passed the UBSan and ASan: https://godbolt.org/z/dd8Kz49Y5

Reproduce command:
```bash
clang -O1 --target=powerpc64le-unknown-linux-musl -static reduced.c
qemu-ppc64le a.out
clang -O2 --target=powerpc64le-unknown-linux-musl -static reduced.c
qemu-ppc64le a.out
```

Output:
```
BackSmith Checksum = 0x0000000000000005
BackSmith Checksum = 0x0000000000000000
```

clang version 22.0.0git ([email protected]:llvm/llvm-project.git 0e92beb0c0f050e1180c88aa31713f3d6ba9d34e)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to