From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 29DD73858407; Fri, 3 Feb 2023 15:28:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29DD73858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675438099; bh=gfAoHXscY4dSyB3gU8oQv+X/CuKjonStrxT7xr888/0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BYaTnJ4Xiu3SZ0uciLTfoek5XWHiwkID2ju2DbXsqZzaaurLtWoFA8W+FvF2VNsob XgpoYuPJMdVImNxbfAahcBPJ39Dpy8JviVGSWiygrTlFApdWvUX9AOR9id2zi73ycc xRz5x+odadumODqqDpMPNDnTJ/0g4x61ELoLE6xs= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108647] [13 Regression] ICE in upper_bound, at value-range.h:950 with -O3 since r13-2974-g67166c9ec35d58ef Date: Fri, 03 Feb 2023 15:28:18 +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: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108647 --- Comment #11 from Andrew Macleod --- (In reply to Jakub Jelinek from comment #10) > (In reply to Andrew Macleod from comment #9) > > (In reply to Jakub Jelinek from comment #8) > > > Unfortunately that would mean for the non-equality cases that if > > > lhs.undefined_p () we don't return undefined but false (aka VARYING). > > > Another option is to add those if (op?.undefined_p ()) return false; = to both > > > case BRS_TRUE: and case BRS_FALSE:. > >=20 > > Well, if the LHS is undefined, (or even one of the operands) we are > > typically in dead code or edge anyway.. I'm not sure it really matters? >=20 > Ok, I'll test the patch then. >=20 > > An alternate question as well is why is the threader even looking at th= is > > impossible path. It should know that the branch can never be true >=20 > I think range-op shouldn't assume nothing will call it with UNDEFINED ran= ges. Oh I wasn't suggesting otherwise,we should be bulletproof. Just wondering = why the threader is spending any time evaluating ranges on a path it should kno= w is impossible.=