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;
}
-----------------------------------------

Reply via email to