https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121970
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |target Keywords| |missed-optimization --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (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.