This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/56118] Piecewise vector / complex initialization from constants not combined


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]