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

Hongtao Liu <liuhongt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |liuhongt at gcc dot gnu.org

--- Comment #6 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> backends are free to implement extendbfsf2 in a more efficient manner.

backend pattern is defined under !HONOR_NANS (BFmode), and with
-ffinite-math-only, x86 generates vpslld  xmm0, xmm0, 16.

(define_expand "extendbfsf2"
  [(set (match_operand:SF 0 "register_operand")
        (unspec:SF
          [(match_operand:BF 1 "register_operand")]
         UNSPEC_CVTBFSF))]
 "TARGET_SSE2 && !HONOR_NANS (BFmode)")


>float out = f - 0.0;
This would be optimized off by the middle-end, so I don't think it's equivilent
to static_cast if HONOR_NANS (BFmode).

Reply via email to