[Bug target/92905] [10 Regression] Spills float-int union to memory

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 11 13:09:00 GMT 2019


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

--- Comment #4 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Perhaps only xmm0 is problematic, as making xmm0 unused by adding a dummy
argument brings back the old spill-free result:

float my_copysign(float dummy, float x, float y)
{
    union {float f; unsigned i;} ux = {x}, uy ={y};
    ux.i &= 0x7fffffff;
    ux.i |= 0x80000000 & uy.i;
    return ux.f;
}

float f(float dummy, float x)
{
    union {float f; unsigned i;} u = {x};
    u.i |= 0x80000000;
    return u.f;
}


More information about the Gcc-bugs mailing list