From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7505D3858CDA; Mon, 22 Apr 2024 22:53:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7505D3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713826434; bh=L5olKm+SG6v1VVHlYLVFxjSUWJA6kRQ9T66mqo1IT5U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nPAzVwYdsV8D9ZK1kRm6n1G90J3aLHhAtfN4bUE24IGwYFtGh9lqVeAR3IWFyEz+Y aKwZJ63c/5QLpayLpKJVbz++togDVhuAZQ9/eVOL8Hg+W93SfpllMeqY1mBoppC+J7 QvIbdap6ylt7e1aJ82lGX9kwQIzXgcmvE17+y33k= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114639] [riscv] ICE in create_pre_exit, at mode-switching.cc:451 Date: Mon, 22 Apr 2024 22:53:54 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: juzhe.zhong at rivai dot ai X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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=3D114639 --- Comment #16 from JuzheZhong --- This issue is not fully fixed since the fixed patch only fixes ICE but ther= e is a regression in codegen: https://godbolt.org/z/4nvxeqb6K Terrible codege: test(__rvv_uint64m4_t): addi sp,sp,-16 csrr t0,vlenb sd ra,8(sp) sub sp,sp,t0 vs1r.v v1,0(sp) sub sp,sp,t0 vs1r.v v2,0(sp) sub sp,sp,t0 vs1r.v v3,0(sp) sub sp,sp,t0 vs1r.v v4,0(sp) sub sp,sp,t0 vs1r.v v5,0(sp) sub sp,sp,t0 vs1r.v v6,0(sp) sub sp,sp,t0 vs1r.v v7,0(sp) sub sp,sp,t0 vs1r.v v24,0(sp) sub sp,sp,t0 vs1r.v v25,0(sp) sub sp,sp,t0 vs1r.v v26,0(sp) sub sp,sp,t0 vs1r.v v27,0(sp) sub sp,sp,t0 vs1r.v v28,0(sp) sub sp,sp,t0 vs1r.v v29,0(sp) sub sp,sp,t0 vs1r.v v30,0(sp) sub sp,sp,t0 csrr t0,vlenb slli t1,t0,2 vs1r.v v31,0(sp) sub sp,sp,t1 vs4r.v v8,0(sp) call get_vl() csrr t0,vlenb slli t1,t0,2 vl4re64.v v8,0(sp) csrr t0,vlenb add sp,sp,t1 vl1re64.v v31,0(sp) add sp,sp,t0 vl1re64.v v30,0(sp) add sp,sp,t0 vl1re64.v v29,0(sp) add sp,sp,t0 vl1re64.v v28,0(sp) add sp,sp,t0 vl1re64.v v27,0(sp) add sp,sp,t0 vl1re64.v v26,0(sp) add sp,sp,t0 vl1re64.v v25,0(sp) add sp,sp,t0 vl1re64.v v24,0(sp) add sp,sp,t0 vl1re64.v v7,0(sp) add sp,sp,t0 vl1re64.v v6,0(sp) add sp,sp,t0 vl1re64.v v5,0(sp) add sp,sp,t0 vl1re64.v v4,0(sp) add sp,sp,t0 vl1re64.v v3,0(sp) add sp,sp,t0 vl1re64.v v2,0(sp) add sp,sp,t0 vl1re64.v v1,0(sp) add sp,sp,t0 ld ra,8(sp) vsetvli zero,a0,e64,m4,ta,ma vmsne.vi v0,v8,0 addi sp,sp,16 jr ra=