From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C07663858C52; Wed, 18 Oct 2023 03:29:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C07663858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697599751; bh=Q5YSQyQqo+P2L+v4Ta4VFgY9AiClCYRrwCRJSxdsHE4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FvAgELpmVwcX32pT8ncSoVg8UP319JM2LVlvKWnNSc/Tg1PZTbYwphO+gbLKZmRkO HVzFQHPxNUeB0Aug3yxWEk/liBjrcft7uV+4F9t39s6LOp7wwsZWB920t53iqGAbRV xXJE00d3IVt+RykHRhv1VcbQs0nW/4BzI13rFK/A= From: "pan2.li at intel dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111720] RISC-V: Ugly codegen in RVV Date: Wed, 18 Oct 2023 03:29:10 +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: pan2.li at intel dot com X-Bugzilla-Status: NEW 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 #14 from Li Pan --- Looks like option -fmerge-all-constants doesn't work for this case, as well= as RISC-V. For RISC-V, the CLOBBER exists after tree gimple. void test (vuint8m1_t *out) { uint8_t arr[32] =3D {1, 2, 7, 1, 3, 4, 5, 3, 1, 0, 1, 2, 4, 4, 9, 9, 1, 2= , 7, 1, 3, 4, 5, 3, 1, 0, 1, 2, 4, 4, 9, 9}; *out =3D *(vuint8m1_t *)arr; } void test (vuint8m1_t * out) { uint8_t arr[32]; try { arr =3D "\x01\x02\x07\x01\x03\x04\x05\x03\x01\x00\x01\x02\x04\x04\t\t\x01\x02\x07\x= 01\x03\x04\x05\x03\x01\x00\x01\x02\x04\x04\t\t"; arr.0_1 =3D &arr; _2 =3D MEM[(vuint8m1_t *)arr.0_1]; *out =3D _2; } finally { arr =3D {CLOBBER(eol)}; } }=