From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 77B053858C74; Fri, 3 Feb 2023 03:05:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77B053858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675393542; bh=fXOBbz3x7GpTJw0XBJ8o5AYzoji2OjZK26witmrygUE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xNs2dW5sbJsAvA63P/xYIdvz3lOwZVaRAGrIQeBCUQJqhUXKpaQjnH7/ipaw9uL7Y vffIacNoX5/LhKlJ9yGWgO9fve0Ta62njM8bskz1aVKM/d0t/n58QWYTJrQlwFog1h I7ex0hnF+HpSgAmVRi/DRshU72wUDcCuQqyT1GC4= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108185] [RISC-V] Sub-optimal code-gen for vsetvli: redundant stack store Date: Fri, 03 Feb 2023 03:05:42 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: juzhe.zhong at rivai dot ai 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=3D108185 --- Comment #5 from JuzheZhong --- Revise the testcase, it has a bug here: void foo5_3 (int32_t * restrict in, int32_t * restrict out, size_t n, int c= ond) { vint8m1_t v =3D *(vint8m1_t*)in; *(vint8m1_t*)out =3D v; vbool8_t v3 =3D *(vbool8_t*)in; *(vbool8_t*)(out + 200) =3D v3; vbool16_t v4 =3D *(vbool16_t *)in; *(vbool16_t *)(out + 300) =3D v4; } The second vlm.v for vbool16_t is missing which is incorrect codegen. Confirm for vbool8/16/32/64 all have the same issue. -fdump-tree-optimized can observe that: They are all tied and consider as same in GIMPLE IR.=