From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EDCCC3858D32; Tue, 10 Oct 2023 09:24:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDCCC3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696929864; bh=80NXbViXzf3AHwxJ4sMX89DVpQtqvamhTc5oT1T9KsQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jqRueYYsBEcFhTTmmvK5x5VdqSOxDyB1gMQpsH+Jvp2ADrXKNjmGOiwfm9t9P1L2Z 8tnGPZQH3XQVUa+VGkOzlWLG3jgJX2DlLREWL37wRKcFOYIi9Z5wYrvXZNPY6F9AZn adQ9ifss/GMIEZG4tZ/FgwdBuad6mk/FxjLVAj2M= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111751] RISC-V: RVV unexpected vectorization Date: Tue, 10 Oct 2023 09:24:24 +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: juzhe.zhong at rivai dot ai 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 #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 patch. 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: (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 However, RVV produce result of visit_reference_op_load is STRING_CST: (gdb) p debug (result) "\x00\x03\x06\t\f\x0f\x12\x15\x18\x1b\x1e!$\'*-" This is the BLKmode. Could you tell me where I should fix in RISC-V backend? It seems that it is not middle-end issue.=