From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7611E3857004; Fri, 13 Oct 2023 08:13:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7611E3857004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697184810; bh=rSILydX9ZjeRYNKo95dQTQODS4mMTg/EBIdC2kpf2BU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cqe99+YEjgexjZ3RUwXsWVqmjVWXQTvhkUsLqGRWRT2hUFnUWYjsLqHSPzBl0HDAD 2l0GlggYr/ac/Iw5JzZ1R8CEa/52ro3cUy7GHf1qbUltMy+DqRmH4Nw5mnA+HQAY6I hqwHOj2ocsf5PsCKT3W/mNXV5mwWW7N1SZX3Irv4= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111794] RISC-V: Missed SLP optimization due to mask mode precision Date: Fri, 13 Oct 2023 08:13:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org 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: keywords 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=3D111794 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #3 from Richard Biener --- I'm failing to see the issue as with -march=3Drv64gcv I run into t.c:4:8: missed: not vectorized: relevant stmt not supported: *x_50(D) = =3D _6; t.c:4:8: note: removing SLP instance operations starting from: *x_50(D) = =3D _6; t.c:4:8: missed: not vectorized: bad operation in basic block. but just guessing, the issue is bool pattern recognition and t.c:12:1: note: using normal nonmask vectors for _2 =3D _1 =3D=3D 1; t.c:12:1: note: using normal nonmask vectors for _4 =3D _3 =3D=3D 2; t.c:12:1: note: using normal nonmask vectors for _5 =3D _2 & _4; ... ? To vectorize you'd want to see t.c:12:1: note: using boolean precision 32 for _2 =3D _1 =3D=3D 1; t.c:12:1: note: using boolean precision 16 for _4 =3D _3 =3D=3D 2; t.c:12:1: note: using boolean precision 16 for _5 =3D _2 & _4; ... and a pattern used for the value use: t.c:12:1: note: extra pattern stmt: patt_62 =3D _5 ? 1 : 0; You need to see why this doesn't work (it's a very delicate area).=