From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BE7F388265A; Tue, 18 Jun 2024 06:25:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BE7F388265A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718691934; bh=SbsnfYMJf0hm9hFwF+EFO8nxLGb10JLnqBDD9O3tETU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Uu7TMJIeitE2EX+E9M4ArMCoOK4/Ixh7B0oes6DQGMTRJotQKu2yT2U1Wqw3DZHRj +hZsHQwwSr1XlHDwDtsY09LBppHPoGUcIeJ0JoBGspv7XSO4C9z3wSIrLSJpZbwkOi pFKy7bQOwuTKdf9DPT5RhPmF7FBx9xVSHHMDzymo= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101639] vectorization with bool reduction Date: Tue, 18 Jun 2024 06:25:33 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org 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: cf_reconfirmed_on cc 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=3D101639 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2021-07-27 00:00:00 |2024-6-18 CC| |rguenth at gcc dot gnu.org, | |rsandifo at gcc dot gnu.org --- Comment #2 from Richard Biener --- Re-confirmed. To recap: t.c:4:21: note: =3D=3D=3D vect_determine_precisions =3D=3D=3D t.c:4:21: note: using normal nonmask vectors for r_14 =3D PHI <_8(6), 1(5= )> t.c:4:21: note: using boolean precision 8 for _4 =3D _3 !=3D 0; t.c:4:21: note: using boolean precision 8 for _8 =3D _4 & r_14; ... t.c:4:21: note: =3D=3D> examining phi: r_14 =3D PHI <_8(6), 1(5)> t.c:4:21: note: get vectype for scalar type: bool t.c:4:21: note: vectype: vector(16) unsigned char .. t.c:4:21: note: =3D=3D> examining statement: _4 =3D _3 !=3D 0; t.c:4:21: note: vectype: vector(16) t.c:4:21: note: nunits =3D 16 t.c:4:21: note: =3D=3D> examining statement: _8 =3D _4 & r_14; t.c:4:21: note: vectype: vector(16) t.c:4:21: note: nunits =3D 16 that doesn't match up. The solution might be to realize _8 is live and thus needed as nonmask.=