From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B64FA3858C83; Tue, 14 Mar 2023 08:49:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B64FA3858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678783778; bh=NPiwPaycNYukOCorV+syjV0ujIiW/1MiIC3rKQw3P9o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ljIEYuDKtx3SV+3//Me+EUcM4JkYH26TYWlfmh1F6Z/kNieU5zF3exWtlqpHN3yXg UH0pnceq9cRgezNWT/rxt1EmuRgUJ/6WDcsfzwqREnGFokR17FKBK3xJw9RGFbhw9L XK4WipdTAD3mX+o3F7LQnW+x2dEDzrOrnLzWKdIY= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109104] [13 Regression] ICE: in gen_reg_rtx, at emit-rtl.cc:1171 with -fzero-call-used-regs=all -march=rv64gv Date: Tue, 14 Mar 2023 08:49:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: juzhe.zhong at rivai dot ai 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D109104 --- Comment #2 from JuzheZhong --- (In reply to Roger Sayle from comment #1) > Not exactly my area of expertise, but adding >=20 > if (!can_create_pseudo_p ()) > return false; >=20 > at the start of legitimize_move on line 262 of riscv-v.cc should help. > Other solutions include clearing a vector register without requiring > a scalar register (to set the vector length) by xoring it with itself, > or possibly providing a riscv backend target hook to override the default > default_zero_call_used_regs implementation. >=20 > If the vector length can be set to zero, that might be an alternative > to clearing call-used vector registers. We (me && kito) are trying to find the solution to fix it. Actually, xoring itself can not help since vxor.vv also needs=20 vsetvl a5,zero.... Setting vector-length to be VLMAX. We don't have an instruction in RVV ISA can zero a whole vector register without vsetvl to setting VLMAX vector-length. I think maybe Kito knows how to fix it. We will definetely fix it soon in GCC 13. Thanks.=