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

Hongyu Wang <hongyuw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-*-*
           Keywords|                            |missed-optimization
            Summary|i386: Bad convert-storm on  |i386: Bad convert-storm on
                   |roundf16 vectorization      |_Float16 builtin_round
                   |                            |vectorization

--- Comment #1 from Hongyu Wang <hongyuw at gcc dot gnu.org> ---
In match.pd we have

 (simplify
   (convert (froms (convert float16_value_p@0)))
     (if (optimize
          && types_match (type, TREE_TYPE (@0))
          && direct_internal_fn_supported_p (as_internal_fn (tos),
                                             type, OPTIMIZE_FOR_BOTH))
       (tos @0))))

But the ix86_optab_supported_p mismatches for HFmode

    case round_optab:
    case lround_optab:
      return opt_type == OPTIMIZE_FOR_SPEED;

We can deal it similar to the ceil/floor/btrunc variant to relax for HFmode.

Reply via email to