From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 170033858C60; Sat, 23 Sep 2023 13:16:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 170033858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695475008; bh=Xa6KS1NX/2PIspvdfj9QaIGwGUPVWTwzK+Q6W9QPj1s=; h=From:To:Subject:Date:From; b=WzXcH0kUZRgJOVON2BKcX0OWj/+8QZrAjXE3OcRnfj+/iKdj+cILpiAINxdtBe4KG bhoXaUOlvBSaSCEKMft43Bu/kyxa8R/drSCtY5YDpoFD1YhgXZ4hRysK/l5fLxyNwA 6dC8020t+lyDnWNDCMp+0QXplH8WNjQZRRsvKTn0= From: "jeremy.bennett at embecosm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111548] New: RISC-V Vector: ICE in validate_change_or_fail (vsetvl pass) Date: Sat, 23 Sep 2023 13:16:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jeremy.bennett at embecosm 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 attachments.created 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=3D111548 Bug ID: 111548 Summary: RISC-V Vector: ICE in validate_change_or_fail (vsetvl pass) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: jeremy.bennett at embecosm dot com Target Milestone: --- Created attachment 55973 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55973&action=3Dedit Reproducer source code This issue was identified building SPEC CPU 2017 602.gcc_s. Reproducer (test.c): a, c, d; *b; h() { int e; i(); for (;;) { unsigned f; char *g; f =3D a; for (; f; f--) { if (*g =3D=3D '"') e =3D !e; *b =3D g++; } if (c) break; f =3D d; for (; d;) if (e) b++; } } Compile with: riscv64-unknown-linux-gnu-gcc -w -march=3Drv64gcv -mabi=3Dlp64d -c -Ofast \ -ftree-vectorize --param=3Driscv-autovec-preference=3Dscalable test.c Output is: during RTL pass: vsetvl test.c: In function 'h': test.c:22:1: internal compiler error: in validate_change_or_fail, at config/riscv/riscv-vsetvl.cc:788 22 | } | ^ 0xa6ef0b validate_change_or_fail /home/jeremy/gittrees/mustang/gcc/gcc/config/riscv/riscv-vsetvl.cc:= 788 0xa6f0bb validate_change_or_fail /home/jeremy/gittrees/mustang/gcc/gcc/hash-set.h:64 0xa6f0bb change_insn /home/jeremy/gittrees/mustang/gcc/gcc/config/riscv/riscv-vsetvl.cc:= 804 0x165d292 pass_vsetvl::earliest_fusion() /home/jeremy/gittrees/mustang/gcc/gcc/config/riscv/riscv-vsetvl.cc:= 3415 0x165da61 pass_vsetvl::vsetvl_fusion() /home/jeremy/gittrees/mustang/gcc/gcc/config/riscv/riscv-vsetvl.cc:= 3457 0x165f950 pass_vsetvl::lazy_vsetvl() /home/jeremy/gittrees/mustang/gcc/gcc/config/riscv/riscv-vsetvl.cc:= 4373 0x165fad1 pass_vsetvl::execute(function*) /home/jeremy/gittrees/mustang/gcc/gcc/config/riscv/riscv-vsetvl.cc:= 4413 0x165fad1 pass_vsetvl::execute(function*) /home/jeremy/gittrees/mustang/gcc/gcc/config/riscv/riscv-vsetvl.cc:= 4394 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. System information =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Using built-in specs. COLLECT_GCC=3Driscv64-unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=3D/home/jeremy/gittrees/mustang/install/libexec/gcc/ris= cv64-unknown-linux-gnu/14.0.0/lto-wrapper Target: riscv64-unknown-linux-gnu Configured with: /home/jeremy/gittrees/mustang/gcc/configure --target=3Driscv64-unknown-linux-gnu --prefix=3D/home/jeremy/gittrees/mustang/install --with-sysroot=3D/home/jeremy/gittrees/mustang/install/sysroot --with-pkgversion=3Dg59d27cc55a0 --with-system-zlib --enable-shared --enabl= e-tls --enable-languages=3Dc,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootst= rap --src=3D/home/jeremy/gittrees/mustang/gcc --enable-multilib --with-abi=3Dlp= 64d --with-arch=3Drv64gc --with-tune=3D --with-isa-spec=3D20191213 'CFLAGS_FOR_= TARGET=3D-O2 -mcmodel=3Dmedany' 'CXXFLAGS_FOR_TARGET=3D-O2 -mcmodel=3Dmedany' Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20230923 (experimental) (g59d27cc55a0)=