public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107046] New: [13 Regression] Recent FP range work causing inf-2 to be miscompiled on rx-elf
@ 2022-09-26 23:44 jeffreyalaw at gmail dot com
  2022-09-27  7:20 ` [Bug tree-optimization/107046] " aldyh at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jeffreyalaw at gmail dot com @ 2022-09-26 23:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107046

            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 <aldyh@redhat.com>
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)"

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-12-22 16:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 23:44 [Bug tree-optimization/107046] New: [13 Regression] Recent FP range work causing inf-2 to be miscompiled on rx-elf jeffreyalaw at gmail dot com
2022-09-27  7:20 ` [Bug tree-optimization/107046] " aldyh at gcc dot gnu.org
2022-09-27  8:54 ` rguenth at gcc dot gnu.org
2022-09-27  8:59 ` rguenth at gcc dot gnu.org
2022-09-27  9:39 ` [Bug testsuite/107046] " aldyh at gcc dot gnu.org
2022-09-27 20:12 ` jeffreyalaw at gmail dot com
2022-12-02 11:16 ` jakub at gcc dot gnu.org
2022-12-05 18:47 ` law at gcc dot gnu.org
2022-12-06 10:43 ` cvs-commit at gcc dot gnu.org
2022-12-22 14:33 ` rguenth at gcc dot gnu.org
2022-12-22 16:08 ` law at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).