public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114476] New: [14] RISC-V rv64gcv vector: Runtime mismatch at -O3
@ 2024-03-26  4:34 patrick at rivosinc dot com
  2024-03-26  5:04 ` [Bug tree-optimization/114476] [13/14 Regression] wrong code with -fwrapv -O3 -fno-vector-cost-mode (and -march=armv9-a+sve2 on aarch64 and -march=rv64gcv on riscv) pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: patrick at rivosinc dot com @ 2024-03-26  4:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114476

            Bug ID: 114476
           Summary: [14] RISC-V rv64gcv vector: Runtime mismatch at -O3
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Testcase:
signed char b = 9;
int c[23][23];
signed char d[23];
int main() {
  for (int h = 0; h < 23; h += 2) {
    c[h][h] = d[h];
    b *= 255;
  }
  __builtin_printf("%u\n", b);
}

Commands:
> /scratch/tc-testing/tc-mar-25/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O3 -fwrapv red.c -o red.out
> /scratch/tc-testing/tc-mar-25/build-rv64gcv/bin/qemu-riscv64 red.out
4294967287
> /scratch/tc-testing/tc-mar-25/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O2 -fwrapv red.c -o red.out
> /scratch/tc-testing/tc-mar-25/build-rv64gcv/bin/qemu-riscv64 red.out
9

Discovered/tested using r14-9654-g78b56a12dd0 (not bisected)

Found via fuzzer.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-03 12:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26  4:34 [Bug target/114476] New: [14] RISC-V rv64gcv vector: Runtime mismatch at -O3 patrick at rivosinc dot com
2024-03-26  5:04 ` [Bug tree-optimization/114476] [13/14 Regression] wrong code with -fwrapv -O3 -fno-vector-cost-mode (and -march=armv9-a+sve2 on aarch64 and -march=rv64gcv on riscv) pinskia at gcc dot gnu.org
2024-03-26  5:05 ` pinskia at gcc dot gnu.org
2024-03-26  5:10 ` pinskia at gcc dot gnu.org
2024-03-26  5:16 ` pinskia at gcc dot gnu.org
2024-03-26  8:07 ` rguenth at gcc dot gnu.org
2024-03-26 12:47 ` rdapp at gcc dot gnu.org
2024-03-27 21:03 ` [Bug tree-optimization/114476] [13/14 Regression] wrong code with -fwrapv -O3 -fno-vect-cost-model " pinskia at gcc dot gnu.org
2024-04-03  1:48 ` juzhe.zhong at rivai dot ai
2024-04-03 12:05 ` rdapp at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).