[Bug rtl-optimization/93743] [9/10 Regression] swapped arguments in atan2l

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 14 18:23:00 GMT 2020


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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i?86-*-*, x86_64-*-*
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |wrong-code
   Last reconfirmed|                            |2020-02-14
          Component|c                           |rtl-optimization
                 CC|                            |amonakov at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|swapped arguments in atan2l |[9/10 Regression] swapped
                   |                            |arguments in atan2l

--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Minimal testcase, needs -ffast-math or -Ofast

long double f(long double y, long double x)
{
    return __builtin_atan2l(y, x);
}

reg-stack seems to get the order of x87 stack pushes wrong

Correct output in gcc-8:

        fldt    8(%rsp)
        fldt    24(%rsp)
        fpatan
        ret

Wrong output in gcc-9/trunk:

        fldt    24(%rsp)
        fldt    8(%rsp)
        fpatan
        ret


More information about the Gcc-bugs mailing list