From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 98F183858D20; Fri, 14 Apr 2023 02:04:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98F183858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681437876; bh=VxXJs8+VaC7/26yeoCObvWLI1UFiXmkIaWnbM25khBE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IAVPE6QlMu8swr2Epgi+Ys2LZgKmyQHuehZhXhVzI52XEVFBsQ87h+C5QOkueUZoW Lr0kUlfMLDPWk8CLDMNAqY51I7z8W/GzTIwn6Fm8YIMBNE7C3cdf6PqaY8i5DEWXJj pgfj62CaQNhyTXBJGGGC6vAcBt0R8w9XBIMXpcos= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109502] [12/13 Regression] wrong code with -O -ftree-vectorize -fvect-cost-model=unlimited on aarch64 Date: Fri, 14 Apr 2023 02:04:36 +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: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 12.3 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=3D109502 --- Comment #2 from Andrew Pinski --- (In reply to Andrew Pinski from comment #1) > SLP transforms: >=20 > g.0_1 =3D g; > _2 =3D g.0_1 =3D=3D 0; > a_7 =3D (unsigned int) _2; > _3 =3D a_7 % 6; > _4 =3D _3 =3D=3D 0; > _5 =3D (unsigned int) _4; > a_8 =3D _5 + a_7; >=20 > To: >=20 > g.0_1 =3D g; > _2 =3D g.0_1 =3D=3D 0; > a_7 =3D (unsigned int) _2; > _3 =3D a_7 % 6; > _15 =3D {_3, g.0_1}; > mask__4.4_16 =3D { 0, 0 } =3D=3D _15; > vect__5.5_19 =3D VIEW_CONVERT_EXPR(mask__4.4_16= ); > _17 =3D BIT_FIELD_REF ; > _18 =3D (bool) _17; > _4 =3D _3 =3D=3D 0; > _5 =3D (unsigned int) _18; > _20 =3D .REDUC_PLUS (vect__5.5_19); > a_8 =3D _20; >=20 If anything there is a missing, a negative after the reduc_plus (or before) when it translates the bools comparisons into vector comparisons.=