From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D8E333858C52; Fri, 3 Feb 2023 15:20:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8E333858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675437650; bh=7fs6YOYTre713mJVLXc/sHRTcXcxtOpMIum2V1UAmOU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ckCJd3r4w7FEYRBFudOz2H7oJvUfwnZIZ7jTQA8kqAY1dfXQjLh8FTOFnq/yTppih PdoyZRyxrgG9mD5nn3QSL5Eq1LCry2Z0DA9kNRe1k+6oEgUSPrfJePF1ImBzJbEJHc px/DaFVqdPyngiz8do5PNi3gGrueHIG7YcP39PlM= 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:20:50 +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 #9 from Andrew Macleod --- (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 b= oth > case BRS_TRUE: and case BRS_FALSE:. Well, if the LHS is undefined, (or even one of the operands) we are typical= ly in dead code or edge anyway.. I'm not sure it really matters? 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=