From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D02893858283; Mon, 26 Sep 2022 23:44:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D02893858283 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664235870; bh=Lii23PXGL/4O8g938jr0fCe5as8dY72LSSCMCCtm45s=; h=From:To:Subject:Date:From; b=NDJ3t3K1Dy2CKjGbzPZDiwW0neo7vTUm2X1jrncsIg/NEyUVOvNWDc84agAiy+C41 AxR77qcRIp92NxkNPRw5j/CzcTFj5pTxB4qcURB9H9QIkPfFmQfpnvbzI0Utx1E8lz PZJmBjaUowxZMUTt/rtz/M2Pj1Him5xJPiZvKm/g= From: "jeffreyalaw at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107046] New: [13 Regression] Recent FP range work causing inf-2 to be miscompiled on rx-elf Date: Mon, 26 Sep 2022 23:44:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jeffreyalaw at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D107046 Bug ID: 107046 Summary: [13 Regression] Recent FP range work causing inf-2 to be miscompiled on rx-elf Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jeffreyalaw at gmail dot com Target Milestone: --- gcc.c-torture/execute/ieee/inf-2.c is being mis-compiled as of: commit b7fd7fb5011106c062df9275ca8fddcbce4ebdeb Author: Aldy Hernandez Date: Thu Sep 22 18:20:39 2022 +0200 frange: drop endpoints to min/max representable numbers for -ffinite-math-only. Similarly to how we drop NANs to UNDEFINED when -ffinite-math-only, I think we can drop the numbers outside of the min/max representable numbers to the representable number. This means the endpoings to VR_VARYING for -ffinite-math-only can now be the min/max representable, instead of -INF and +INF. Saturating in the setter means that the upcoming implementation for binary operators no longer have to worry about doing the right thing for -ffinite-math-only. If the range goes outside the limits, it'll get chopped down. Looking at the assembly code, test, testf and testl are all collapsing down= to calls to abort. .file "k.c" .section P,"ax" .section .text.unlikely,"ax",@progbits .global _test .type _test, @function _test: bsr _abort .size _test, .-_test .global _testf .type _testf, @function _testf: bsr _abort .size _testf, .-_testf .global _testl .type _testl, @function _testl: bsr _abort .size _testl, .-_testl .global _main .type _main, @function _main: bsr _abort .size _main, .-_main .ident "GCC: (GNU) 13.0.0 20220923 (experimental)"=