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

Hongyu Wang <wwwhhhyyy333 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wwwhhhyyy333 at gmail dot com

--- Comment #3 from Hongyu Wang <wwwhhhyyy333 at gmail dot com> ---
(In reply to Hongtao.liu from comment #2)
> > 
> > Also, baz iz highly un-optimal for 32bit targets.
> 
> Yes, it needs to be fixed, note w/ -mavx512fp16 codegen for baz is optimal
> on 32-bit target, maybe related to vector_mode_supported_p, but then why
> codegen for baz on 64-bit target is optimal w/o TARGET_AVX512FP16?

For V8HFmode that is unsupported in VALID_SSE2_REG_MODE, function_value_32 has

return gen_rtx_REG (orig_mode, regno); 

so the retval is (reg:BLK 20 xmm0).

while function_value_64 uses construct_container and returns

(parallel:BLK [                                   
        (expr_list:REG_DEP_TRUE (reg:V8HF 20 xmm0)
            (const_int 0 [0]))                    
    ])                                            

This could be optimized to simple movaps finally.

So we may need to support V8HFmode in VALID_SSE2_REG_MODE if we don't want to
modify those function_args and function_value stuff.

Reply via email to