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

--- Comment #5 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> (In reply to Hongtao Liu from comment #1)
> > Although the option is x86 specific, but I think the issue is middle-end,
> > it's related how MOVE_MAX and STORE_MAX_PIECES is used.
> 
> #define MOVE_MAX \
>   ((TARGET_AVX512F \
>     && (ix86_move_max == PVW_AVX512 \
>         || ix86_store_max == PVW_AVX512)) \
>    ? 64 \
>    : ((TARGET_AVX \
>        && (ix86_move_max >= PVW_AVX256 \
>            || ix86_store_max >= PVW_AVX256)) \
>       ? 32 \
>       : ((TARGET_SSE2 \
>           && TARGET_SSE_UNALIGNED_LOAD_OPTIMAL \
>           && TARGET_SSE_UNALIGNED_STORE_OPTIMAL) \
>          ? 16 : UNITS_PER_WORD)))
> 
> 
> x86 defines MOVE_MAX based on if either option is set to 512 here. 
> 
> While STORE_MAX_PIECES is defined by store max only:
> 
> #define STORE_MAX_PIECES \
>   (TARGET_INTER_UNIT_MOVES_TO_VEC \
>    ? ((TARGET_AVX512F && ix86_store_max == PVW_AVX512) \
>       ? 64 \
>       : ((TARGET_AVX \
>           && ix86_store_max >= PVW_AVX256) \
>           ? 32 \
>           : ((TARGET_SSE2 \
>               && TARGET_SSE_UNALIGNED_STORE_OPTIMAL) \
>               ? 16 : UNITS_PER_WORD))) \
>    : UNITS_PER_WORD)
> 
> 
> So this seems like a target issue.

Ah, I see, thanks.

H.J, I think we should remove ix86_store_max from MOVE_MAX.

Reply via email to