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/68707] [6 Regression] testcase gcc.dg/vect/O3-pr36098.c vectorized using VEC_PERM_EXPR rather than VEC_LOAD_LANES


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

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