From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C53A385840C; Sat, 2 Mar 2024 01:15:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C53A385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709342119; bh=7PQFak5OKV8TWH7e7DNOnVlcSebz0SmIu4+g7N7oqiU=; h=From:To:Subject:Date:From; b=IS9KnOSw1aT0JteXeRI1dIJpxQM63uNM9qpjfokxi5V4okLlAzE4NSx0iZQ7oDxq6 5kNy5qmQX0r4O0S9/aEaJYzy/lCtIBdFc/7iav8RBRJSVzGqbqu94lGJiY7nJFhUtn i6ylKdrtX55TYt+agi2im2ENli/TCEFnrfei4H1I= From: "patrick at rivosinc dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114200] New: [14] RISC-V fixed-length vector miscompile at -O3 Date: Sat, 02 Mar 2024 01:15:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: patrick at rivosinc dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114200 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 =3D 1; _Bool b, d; short c[300]; int main() { for (int f =3D 0; f < 19; f++) { for (int g =3D 0; g < 14; g++) for (int h =3D 0; h < 10; h++) a +=3D c[g] + e; b +=3D d; } printf("%d\n", a); } Commands: > /scratch/tc-testing/tc-feb-20/build-rv64gcv/bin/riscv64-unknown-linux-gnu= -gcc -march=3Drv64gcv -O3 --param=3Driscv-autovec-preference=3Dfixed-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=3Drv64gcv -O2 --param=3Driscv-autovec-preference=3Dfixed-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=