From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 502313858C60; Wed, 1 Dec 2021 07:36:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 502313858C60 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/103513] [12 Regression] ICE in evaluate_conditions_for_known_args, at ipa-fnsummary.c:516 with -O2 and above Date: Wed, 01 Dec 2021 07:36:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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 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: Wed, 01 Dec 2021 07:36:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103513 --- Comment #3 from Andrew Pinski --- Note we disable the creation of the cond_expr here normally until !canonicalize_math_p () is true But evrp does: Folding statement: _10 =3D _9 * 20; Matching expression match.pd:2075, gimple-match.c:819 Matching expression match.pd:2078, gimple-match.c:892 Matching expression match.pd:2085, gimple-match.c:952 Applying pattern match.pd:5297, gimple-match.c:53296 Matching expression match.pd:1718, gimple-match.c:280 Matching expression match.pd:2075, gimple-match.c:819 Matching expression match.pd:2078, gimple-match.c:892 Matching expression match.pd:2085, gimple-match.c:952 gimple_simplified to _10 =3D _1 =3D=3D 0 ? 0 : 20; We should definitely be more defensive in evaluate_conditions_for_known_args for the cond_expr but also I think evrp should disable this transformation until later if we produce a cond_expr ...=