This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/68707] [6 Regression] testcase gcc.dg/vect/O3-pr36098.c vectorized using VEC_PERM_EXPR rather than VEC_LOAD_LANES
- From: "alalaw01 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Dec 2015 17:29:02 +0000
- Subject: [Bug tree-optimization/68707] [6 Regression] testcase gcc.dg/vect/O3-pr36098.c vectorized using VEC_PERM_EXPR rather than VEC_LOAD_LANES
- Auto-submitted: auto-generated
- References: <bug-68707-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68707
--- Comment #21 from alalaw01 at gcc dot gnu.org ---
Here's the smallest testcase I could come up with (where SLP gets cancelled,
but we end up with fewer st2's than before)...the key seems to be things being
used in multiple places.
#define N 1024
int in1[N], in2[N];
int out1[N], out2[N];
int w[N];
void foo() {
for (int i = 0; i < N; i+=2)
{
int a = in1[i] & in2[i];
int b = in1[i+1] & in2[i+1];
out1[i] = a;
out1[i+1] = b;
out2[i] = (a + w[i]) ^ (b+w[i+1]);
out2[i+1] = (b + w[i]) ^ (a+w[i+1]);
}
}