From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C5E23856DC2; Thu, 23 Jun 2022 14:22:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C5E23856DC2 From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106063] [13 Regression] ICE: in gimple_expand_vec_cond_expr, at gimple-isel.cc:281 with -O2 -fno-tree-forwprop --param=evrp-mode=legacy-first Date: Thu, 23 Jun 2022 14:22:13 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com 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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2022 14:22:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106063 Andrew Macleod changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amacleod at redhat dot com --- Comment #1 from Andrew Macleod --- That option enables legacy EVRP, and will be going away soon. however, loo= king at the IL, the difference out of EVRP is that legacy doesnt touch the code.= The IL is: vector(1) __int128 _1; vector(1) _2; V _4; : _1 =3D v_3(D) & { 15 }; _2 =3D v_3(D) =3D=3D _1; _4 =3D VEC_COND_EXPR <_2, { -1 }, { 0 }>; return _4; Ranger ends up triggering a simplification : Folding statement: _2 =3D v_3(D) =3D=3D _1; gimple_simplified to _6 =3D v_3(D) & { -16 }; _2 =3D _6 =3D=3D { 0 }; Folded into: _2 =3D _6 =3D=3D { 0 }; producing: _1 =3D v_3(D) & { 15 }; _6 =3D v_3(D) & { -16 }; _2 =3D _6 =3D=3D { 0 }; _4 =3D VEC_COND_EXPR <_2, { -1 }, { 0 }>; return _4; Which ends up not causing the ICE seen in this PR. However, if we completely disable EVRP, we also get the trap. -O2 -fno-tree-forwprop --disable-tree-evrp So it would seem the problem probably lies with vector expansion?=