From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5FD6B3858C5F; Fri, 3 Feb 2023 15:23:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5FD6B3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675437795; bh=zOc7n762/BBbfs4wdmWis0PHxvcN3j3ZxYuX7Z0oDzE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rd+0s3WJzZfOdQ26OVEhHujJR/1uiqGMZ4c6R2H5iKGtpTDMcyQk864favc8vjmro RExnUbi+f6l53naW3f4MYMeejH8Qsd3OZKY8GmM6XzYWijEd+UsGxq6XeDQWxwj5vo 3Y3XYoWdrV6G69guutMkzhowhciK/xe8xEjJmvmg= From: "jakub at gcc dot gnu.org" 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:23:14 +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: jakub 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: 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 #10 from Jakub Jelinek --- (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? Ok, I'll test the patch then. > An alternate question as well is why is the threader even looking at this > impossible path. It should know that the branch can never be true I think range-op shouldn't assume nothing will call it with UNDEFINED range= s.=