https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61194

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #10)
> Created attachment 32805 [details]
> patch fixing the regression
> 
> This would fix the regression (also without the previous patch?)

It does, on the 4.9 branch at least, for

static float x[1024];
static float y[1024];
static float z[1024];
static float w[1024];

static int k[1024];

void __attribute__((noinline,noclone)) barX()
{
  int i;
  for (i=0; i<1024; ++i)
    {
      k[i] = x[i]>0;
      k[i] &=  w[i]<y[i];
      z[i] = (k[i]) ? z[i] : y[i];
    }
}

but it doesn't change the outcome of the big testcase in the original report.
It does together with the other patch though:

> g++-4.9 t.C -Ofast -ftree-loop-if-convert-stores  -fopt-info-vec -B. -fopenmp
t.C:11:5: note: loop vectorized
t.C:19:23: note: loop vectorized
t.C:24:5: note: loop vectorized
t.C:29:5: note: loop vectorized
t.C:35:5: note: loop vectorized
t.C:41:5: note: loop vectorized
t.C:47:5: note: loop vectorized

bar2 still not vectorized there.

But with 4.7 I see the same as with 4.8 and 4.9:

35: LOOP VECTORIZED.
41: LOOP VECTORIZED.
47: LOOP VECTORIZED.

so where exactly does the "regression" part appear for you?  Is that only
for the code in comment#1?

Reply via email to