[Bug tree-optimization/68707] [6 Regression] testcase gcc.dg/vect/O3-pr36098.c vectorized using VEC_PERM_EXPR rather than VEC_LOAD_LANES

alalaw01 at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 17 17:29:00 GMT 2015


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


More information about the Gcc-bugs mailing list