From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 77DA93858437; Thu, 10 Feb 2022 12:21:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77DA93858437 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/24021] VRP does not work with floating points Date: Thu, 10 Feb 2022 12:21:25 +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: 4.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: Thu, 10 Feb 2022 12:21:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D24021 --- Comment #17 from rguenther at suse dot de --- On Thu, 10 Feb 2022, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D24021 >=20 > --- Comment #16 from Jakub Jelinek --- > But just tracking those fpclassify/signbit properties wouldn't be enough, > because in many cases e.g. whether something can be infinite or not will = depend > on more precise value ranges. > If we track just a bitmask, can the value be: > zero > subnormal > normal > infinite > qNaN > sNaN > have positive signbit > have negative signbit > then even on simple multiplication or addition we'll need to assume from = normal > * normal or normal + normal that it can be infinite. When we know that > one operand is [-15.123 - epsilon, 23.152 + epsilon] and the other is > [256.0 - epsilon, 512.0 + epsilon], we actually can find out the result w= ill > not be infinite etc. > But sure, tracking in a bitmask the above properties in addition to some > approximate range is useful. Yes. What I was trying to say is that while the value-range propagation process should likely track actual FP value ranges it remains to be seen whether we need to store those into the SSA name info or whether tracking a set of flags is good enough in practice (given that match.pd should generally not invoke ranger in resolving mode but look at what's in SSA annotations).=