public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113796] New: [14] RISC-V rv64gcv vector: Runtime mismatch at -O2
@ 2024-02-07  6:14 patrick at rivosinc dot com
  2024-02-07  6:33 ` [Bug tree-optimization/113796] [14 Regression] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: patrick at rivosinc dot com @ 2024-02-07  6:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113796
           Summary: [14] RISC-V rv64gcv vector: Runtime mismatch at -O2
           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 a[] = {0x80, 0};
int b;
signed char c;

int main() {
  for (; b < 1; b += 1)
      c = a[b] < 0 ?: a[b] >> 6;

  if (c == 1)
    return 0;
  else
    return 1;
}

Commands:
> /scratch/tc-testing/tc-feb-6/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O2 red.c -o user-config.out
> QEMU_CPU=rv64,vlen=128,v=true,vext_spec=v1.0,Zve32f=true,Zve64f=true /scratch/tc-testing/tc-feb-6/build-rv64gcv/bin/qemu-riscv64 user-config.out
> echo $?
1

> /scratch/tc-testing/tc-feb-6/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O1 red.c -o user-config.out
> QEMU_CPU=rv64,vlen=128,v=true,vext_spec=v1.0,Zve32f=true,Zve64f=true /scratch/tc-testing/tc-feb-6/build-rv64gcv/bin/qemu-riscv64 user-config.out
> echo $?
0

Godbolt:
https://godbolt.org/z/c7xrqx7Kz

Tested using r14-8834-gdb5c3f6d952 (not bisected).

Found using fuzzer.

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

end of thread, other threads:[~2024-02-07 14:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-07  6:14 [Bug target/113796] New: [14] RISC-V rv64gcv vector: Runtime mismatch at -O2 patrick at rivosinc dot com
2024-02-07  6:33 ` [Bug tree-optimization/113796] [14 Regression] " pinskia at gcc dot gnu.org
2024-02-07  6:35 ` pinskia at gcc dot gnu.org
2024-02-07  6:36 ` pinskia at gcc dot gnu.org
2024-02-07  6:48 ` pinskia at gcc dot gnu.org
2024-02-07  6:56 ` [Bug tree-optimization/113796] [14 Regression] ifcvt does not remove range info before folding: " pinskia at gcc dot gnu.org
2024-02-07  8:53 ` rguenth at gcc dot gnu.org
2024-02-07 12:06 ` rguenth at gcc dot gnu.org
2024-02-07 14:50 ` cvs-commit at gcc dot gnu.org
2024-02-07 14:50 ` rguenth 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).