From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7D1563858C41; Tue, 10 Oct 2023 09:32:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D1563858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696930378; bh=tXrsaDMy3iHjaSAb6YGkygeh5bUZVB5nx9LJDd9G/0c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FVvaF/IFRndIcCrItf7T4qjirVyv8n1OOWzHwtOxD3Y24cryLRMLC5yfG8/O9Sy83 LRdhtYkQN5qnkvSsSAXklun3wwJOI3FXyu7HmtCSshvF7+W1Z1fzAzbEy7Zzj/L059 qyxOWWb4yg/V83ogotXOaaO6Kod8L4fgjxNHh5Y0= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111751] RISC-V: RVV unexpected vectorization Date: Tue, 10 Oct 2023 09:32:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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=3D111751 --- Comment #10 from rguenther at suse dot de --- On Tue, 10 Oct 2023, juzhe.zhong at rivai dot ai wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111751 >=20 > --- Comment #9 from JuzheZhong --- > (In reply to Richard Biener from comment #8) > > ic =3D "\x00\x03\x06\t\f\x0f\x12\x15\x18\x1b\x1e!$\'*-"; > > ib =3D "\x00\x03\x06\t\f\x0f\x12\x15\x18\x1b\x1e!$\'*-"; > > vect__1.7_10 =3D MEM [(char *)&ib]; > > vect__2.10_34 =3D MEM [(char *)&ic]; > >=20 > > so these. The lookup result is a STRING_CST object. I'm testing a pat= ch. >=20 > I have compare and debug between ARM SVE and RVV. > It seems that ARM SVE produce result of visit_reference_op_load is > CONST_VECTOR: >=20 > (gdb) p debug(to) > { 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45 } > (gdb) p to->typed.type->type_common.mode > $23 =3D E_V16QImode >=20 > However, RVV produce result of visit_reference_op_load is STRING_CST: >=20 > (gdb) p debug (result) > "\x00\x03\x06\t\f\x0f\x12\x15\x18\x1b\x1e!$\'*-" >=20 > This is the BLKmode. >=20 > Could you tell me where I should fix in RISC-V backend? > It seems that it is not middle-end issue. The IL into the SVE case is likely different. The difference is wheher we have a direct hashtable hit for the load or whether we need to go through vn_reference_lookup_3 which will perform the type punning on its own.=