From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C03C6385694E; Sat, 7 Oct 2023 22:43:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C03C6385694E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696718614; bh=dLe8cKmom2y1nYuzvbZrmh8r6IbcdHosO6N3dEFMCW8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qIpYlLbMpZcU9cD5jjbdqCwKTEUiie8yywQZNdfYP1ickNGNM1eTnSTz/M+m6HGSA WvrRn6YZHWc7z+6YRmOBaCFsjinqxv4CuTfqkiw4xyjiAO0FYqms0Mcg/DLCxDD/Bl 4DPYel5q3XStuszJ1kHUvHNy+MCigZ0tNfON82OI= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111720] RISC-V: Ugly codegen in RVV Date: Sat, 07 Oct 2023 22:43:34 +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: missed-optimization 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: --- 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=3D111720 --- Comment #5 from JuzheZhong --- Similar issue in GCC 13.2: https://godbolt.org/z/axKc4qj47 fn: lui a5,%hi(.LANCHOR0) addi a5,a5,%lo(.LANCHOR0) ld a1,0(a5) ld a2,8(a5) ld a3,16(a5) ld a4,24(a5) addi sp,sp,-32 sd a1,0(sp) sd a2,8(sp) sd a3,16(sp) sd a4,24(sp) li a5,32 vsetvli zero,a5,e8,m1,ta,ma vle8.v v24,0(sp) vand.vi v24,v24,1 vs1r.v v24,0(a0) addi sp,sp,32 jr ra Multiple ld/sd. It seems that we didn't allow natural constant mem pool ???= ?=