-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
LTOLink time optimization (regular/full LTO or ThinLTO)Link time optimization (regular/full LTO or ThinLTO)backend:RISC-Vmiscompilation
Description
Testcase:
short a;
long long b;
int c = 4;
signed char d[10], e[10];
int main() {
for (long h = 0; h < 10; ++h)
d[h] = 1;
for (int h = 0; h < 10; h += c || a)
e[h] = 256 / d[h];
__builtin_printf("%d\n", e[1]);
}
Commands:
> /scratch/tc-testing/tc-apr-23/build-rv64gcv/build-llvm-linux/bin/clang -fwrapv -march=rv64gcv -flto -O2 red.c -o red.out
> /scratch/tc-testing/tc-apr-23/build-rv64gcv/bin/qemu-riscv64 red.out
1
> /scratch/tc-testing/tc-apr-23/build-rv64gcv/build-llvm-linux/bin/clang -fwrapv red.c -o red.out
> /scratch/tc-testing/tc-apr-23/build-rv64gcv/bin/qemu-riscv64 red.out
0
Discovered/tested using cebc960 (not bisected)
Found via fuzzer.
-Wl,-mllvm,-opt-bisect-limit
points to pass (70) RISC-V gather/scatter lowering on function (main)
Metadata
Metadata
Assignees
Labels
LTOLink time optimization (regular/full LTO or ThinLTO)Link time optimization (regular/full LTO or ThinLTO)backend:RISC-Vmiscompilation