From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9B1413858D33; Mon, 2 Oct 2023 22:28:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B1413858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696285719; bh=YHQU85LwgAt0zLYUiVpyKD31RntQIj6NO89/rwBQqxA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZGciDlD/DOTlwMoDZKLmDm9lsZlKJMzKynXIS0jjdgNZ3PzXWo4sGWmoJ99pDHgGa XEjY3bAce3Zu4xwgZ2dnn26017VCamgFnNsMtda8pC941cfP34k1tS8hw9HbeVtL+2 sHWhT+9KEQ4DncJRNqLWE/BojyCRnolJSSR3Gwc0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111668] vrp2 (match and simplify) introduces invalid wide signed Boolean values Date: Mon, 02 Oct 2023 22:28:39 +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: 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc cf_reconfirmed_on bug_status cc everconfirmed 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=3D111668 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|vrp2 introduces invalid |vrp2 (match and simplify) |wide Boolean values |introduces invalid wide | |signed Boolean values Last reconfirmed| |2023-10-02 Status|UNCONFIRMED |NEW CC| |jakub at gcc dot gnu.org Ever confirmed|0 |1 Keywords| |wrong-code --- Comment #1 from Andrew Pinski --- This was broken by r14-4125-g5c5851bd93b8 . Before VRP: ``` # RANGE [irange] [-1, 0] _66 =3D _16 ? -1 : 0; vect_cst__67 =3D {_66, _66, _66, _66}; ``` VRP2 dump: ``` Folding statement: _66 =3D _16 ? -1 : 0; Applying pattern match.pd:5115, gimple-match-2.cc:16882 gimple_simplified to _38 =3D () _16; _66 =3D -_38; ``` This is was the reasoning for the build_nonstandard_integer_type there.=20 With r14-4125-g5c5851bd93b8 reverted: ``` Folding statement: _66 =3D _16 ? -1 : 0; Applying pattern match.pd:5118, gimple-match-1.cc:16933 gimple_simplified to _38 =3D (signed int) _16; _43 =3D -_38; _66 =3D () _43; Global Exported: _66 =3D [irange] [-1, 0] Folded into: _66 =3D () _43; ``` Note the testcase needs to compiled at -O3 on x86_64.=