[Bug c/90106] builtin sqrt() ignoring libm's sqrt call result

fredericopissarra at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 16 12:30:00 GMT 2019


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

--- Comment #4 from Frederico Lamberti Pissarra <fredericopissarra at gmail dot com> ---
My suggestion is to do a simple jmp after .L8 label and test the condition
before sqrtss (or fsqrt, or sqrtsd...):

  f:
    pxor %xmm2,%xmm2
    ucomiss %xmm0,%xmm2
    ja .L8
    sqrtss %xmm0,%xmm0
    ret
  .L8:
    jmp sqrtf@PLT


More information about the Gcc-bugs mailing list