public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114200] New: [14] RISC-V fixed-length vector miscompile at -O3
@ 2024-03-02  1:15 patrick at rivosinc dot com
  2024-03-06 12:55 ` [Bug target/114200] " rdapp at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: patrick at rivosinc dot com @ 2024-03-02  1:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114200
           Summary: [14] RISC-V fixed-length vector miscompile 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:
int printf(const char *, ...);
short a, e = 1;
_Bool b, d;
short c[300];
int main() {
  for (int f = 0; f < 19; f++) {
    for (int g = 0; g < 14; g++)
      for (int h = 0; h < 10; h++)
        a += c[g] + e;
    b += d;
  }
  printf("%d\n", a);
}

Commands:
> /scratch/tc-testing/tc-feb-20/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O3 --param=riscv-autovec-preference=fixed-vlmax red.c -o red.out
> /scratch/tc-testing/tc-feb-20-llvm/build/bin/qemu-riscv64 red.out
2318
> /scratch/tc-testing/tc-feb-20/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O2 --param=riscv-autovec-preference=fixed-vlmax red.c -o red.out
> /scratch/tc-testing/tc-feb-20-llvm/build/bin/qemu-riscv64 red.out
2660

Tested/found using r14-9084-g61ab046a327 (not bisected)

Found using fuzzer

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

end of thread, other threads:[~2024-03-07  5:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-02  1:15 [Bug target/114200] New: [14] RISC-V fixed-length vector miscompile at -O3 patrick at rivosinc dot com
2024-03-06 12:55 ` [Bug target/114200] " rdapp at gcc dot gnu.org
2024-03-06 19:42 ` cvs-commit at gcc dot gnu.org
2024-03-06 19:43 ` rdapp at gcc dot gnu.org
2024-03-07  0:31 ` patrick at rivosinc dot com
2024-03-07  5:39 ` pinskia 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).