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

--- Comment #2 from rguenther at suse dot de <rguenther at suse dot de> ---
On November 11, 2019 10:20:10 AM GMT+01:00, crazylht at gmail dot com
<gcc-bugzi...@gcc.gnu.org> wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92448
>
>--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
>Also with TARGET_AVX128_OPTIMAL plus -mprefer-vector-width=256, 256-bit
>vectorization may be not generated since TARGET_AVX128_OPTIMAL will
>change
>vec_cost.
>
>--------------------------------------------
>/* Return cost of vector operation in MODE given that scalar version
>has
>   COST.  */
>
>static int
>ix86_vec_cost (machine_mode mode, int cost)
>{
>  if (!VECTOR_MODE_P (mode))
>    return cost;
>
>  if (GET_MODE_BITSIZE (mode) == 128
>      && TARGET_SSE_SPLIT_REGS)
>    return cost * 2;
>  if (GET_MODE_BITSIZE (mode) > 128
>      && TARGET_AVX128_OPTIMAL)
>    return cost * GET_MODE_BITSIZE (mode) / 128;
>  return cost;
>}
>-----------------------------------------

But this is because 128 optimal really means 256 bit ops are split into two 128
bit ones. The tuning is possibly poorly named. 

Richard.

Reply via email to