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

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
#include <x86intrin.h>
__m128d f(){
  __m128d r;
  r[0]=1;
  r[1]=2;
  return r;
}

Currently, SLP vectorizes it with -fvect-cost-model=unlimited, but not by
default because:

  Vector inside of basic block cost: 1
  Vector prologue cost: 1
  Vector epilogue cost: 0
  Scalar cost of basic block: 2
r.c:4:9: note: not vectorized: vectorization is not profitable.

And if r is initialized to {3,4} as in the initial testcase, we don't vectorize
either:

r.c:3:17: note: not vectorized: no vectype for stmt: # .MEM_2 = VDEF
<.MEM_1(D)>
rD.15637 = { 3.0e+0, 4.0e+0 };
 scalar_type: __m128dD.4386
r.c:3:17: note: not vectorized: not enough data-refs in basic block.

Reply via email to