This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/56118] Piecewise vector / complex initialization from constants not combined
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Sep 2014 20:46:02 +0000
- Subject: [Bug tree-optimization/56118] Piecewise vector / complex initialization from constants not combined
- Auto-submitted: auto-generated
- References: <bug-56118-4 at http dot gcc dot gnu dot org/bugzilla/>
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.