From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C7FD3858CDB; Fri, 3 Mar 2023 13:34:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C7FD3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677850462; bh=LsIha7qC6HT/5NdIB3fqoV/B2F2ZUbFx6cfDMDo2EQQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sSUOH0ubTWFVAUPNlmyePGjzFkObHxb58eb2QJd54m7jeJr4/unKkXT6FTc0RKziS sLi/ZZOxLKeDlAyE/ugNxNU0kP/UaXKmILVmLu0ebxEdDFdcupmLeJMQE9Lo/LOgX3 q0zWyfqdEv8YIVzfbjopZX093Wjn2gXUNEE+nXWE= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109008] [13 Regression] Wrong code in scipy package since r13-3926-gd4c2f1d376da6f Date: Fri, 03 Mar 2023 13:34:21 +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: wrong-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=3D109008 --- Comment #10 from Jakub Jelinek --- So, can't we say compute what we compute right now for the reverse operation and then call some helper function which will try to extended that range a little bit in both directions by performing frange_arithmetic (or variant thereof) on the original operation and checking if the other op's range OP = the slightly extended range still yields the result range? Of course it would = be better if we knew how to exactly compute that rather than try to iteratively guess, but even iterative guess could say punt after a few iterations on smallest range extension which would already result in a different range.=20 Though, I bet reverse multiplication/division are even harder because there= we perform the reverse operation of all the boundaries against each other and union.=