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 middle-end/43901] [4.6 Regression] FAIL: gcc.c-torture/compile/pr42196-2.c



------- Comment #12 from irar at il dot ibm dot com  2010-05-03 12:30 -------

> Well.  For loops we'd have disqualified it as there is no vector
> type for the external def (well, the stmt inside the loop).

I don't think that's true. With -fno-tree-pre we get the same ICE for loop
vectorization for:

#define N 64

union U
{
  __complex__ int ci;
  __complex__ float cf;
};

union U u[N];

void foo (double f1, double f2)
{
  int i;

  for (i=0; i<N; i++)
    {
      __real__ u[i].cf = f1;
      __imag__ u[i].cf = f2;
    }
}

> So we do not do this for SLP?  In that case
> yes, if we can return false at this point then we should replace this
> (and similar) asserts with return false.  Or we should fix
> the code that scans the BB initially and sets vector types properly?

The loop scan that sets vector types, only checks lhs types (or the smallest
type in stmt) in order to decide on vectorization factor. There is a similar
scan for BBs in vect_analyze_stmt (only to set vector types for stmts) and it
also looks only at lhs. 

The failure occurs in analysis, so it's ok to return false at this point. 
But I don't understand why external def has to have the same size as the lhs?
(And it is, of course, possible that both types are vectorizable, but still the
rhs type is bigger than the lhs type).

Thanks,
Ira

> 
> Thanks,
> Richard.
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43901


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