From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D59603858D37; Mon, 23 Oct 2023 12:52:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D59603858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698065569; bh=PLu9pUJS+vwq3l9sBommD+v4RjwaUVMfc2YF+rp02Uc=; h=From:To:Subject:Date:From; b=boQwd09itAsjHFs0VnqxE4bD8cs/i5C6PMJX7bDu6KklM6DOnxj5wPaie+HsU6l1J qnmW2litUP7c2PSHOZVoBJj+32WZdtpWwn4QrXtXohdGBUN8XMsctcPERN5ABy28D1 pa4k6wVEvFpEfZrq0Ue11uigKWn9CT6m8J9yQlAg= From: "julienpommier at free dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111935] New: gcc ICE with risc-v vector intrinsics Date: Mon, 23 Oct 2023 12:52:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: julienpommier at free dot fr 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=3D111935 Bug ID: 111935 Summary: gcc ICE with risc-v vector intrinsics Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: julienpommier at free dot fr Target Milestone: --- The following code (test.c) crashes the riscv gcc 13.2.0 compiler of ubuntu 23.10: #include inline vuint32m4_t __attribute__((__always_inline__)) transpose_indexes() { static const uint32_t idx_[16] =3D {0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15}; return __riscv_vle32_v_u32m4(idx_, 16); } void pffft_real_preprocess_4x4(const float *in) { vfloat32m1_t r0=3D__riscv_vle32_v_f32m1(in,4); vfloat32m4_t tmp =3D __riscv_vundefined_f32m4(); tmp =3D __riscv_vset_v_f32m1_f32m4(tmp, 0, r0); tmp =3D __riscv_vset_v_f32m1_f32m4(tmp, 1, r0); tmp =3D __riscv_vset_v_f32m1_f32m4(tmp, 2, r0); tmp =3D __riscv_vset_v_f32m1_f32m4(tmp, 3, r0); tmp =3D __riscv_vrgather_vv_f32m4(tmp, transpose_indexes(), 16); r0 =3D __riscv_vget_v_f32m4_f32m1(tmp, 0); } when compiled with: riscv64-linux-gnu-gcc-13 -O1 -march=3Drv64gcv -c testcase.c the output is: during RTL pass: expand test.c: In function =E2=80=98pffft_real_preprocess_4x4=E2=80=99: test.c:19:8: internal compiler error: Segmentation fault 19 | r0 =3D __riscv_vget_v_f32m4_f32m1(tmp, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0xffffae3a7583 __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0xffffae3a7657 __libc_start_main_impl ../csu/libc-start.c:360 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.=