The vectorizer currently ICEs for ppc64 and vect-27.c (and other testcases)
beacuse at the point it generates pointers for the vector accesses from the
static variable it does not set up pointer alias information correctly:

<bb 6>:
ib.20_12 = (__vector signed int *) &ib;
vect_pib.19_11 = ib.20_12 + 4;
vect_pib.14_15 = vect_pib.19_11;
# VUSE <ib_9(D), SMT.15> { ib SMT.15 }
vect_var_.13_16 = A*vect_pib.14_15;

which is because the DR for ib[i] does not have pointer info:

      /* Copy the points-to information if it exists. */
      if (DR_PTR_INFO (dr))
        duplicate_ssa_name_ptr_info (vect_ptr_init, DR_PTR_INFO (dr));
      vptr = vect_ptr_init;

and so we end up using the SMT and its aliases in the operand scanner.
But the vectorizer does not bother to rename new symbols either here.

There are several possible solutions to this:

 - recompute aliasing after vectorization
 - compute new pointer information in this case (points-to a single symbol)
 - rename the SMT

Simplified testcase that ICEs for me with a ppc64 cross:

#define N 128

/* unaligned load.  */

int ia[N];
int ib[N+1];

void main1 (void)
{
  int i;

  for (i = 1; i <= N; i++)
    {
      ia[i-1] = ib[i];
    }
}

./cc1 -quiet -O -maltivec -ftree-vectorize vect-27.c
vect-27.c: In function ‘main1’:
vect-27.c:9: internal compiler error: tree check: expected ssa_name, have
symbol_memory_tag in is_old_name, at tree-into-ssa.c:566
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: [4.3 Regression] Vectorizer does not fix up alias
                    information correctly
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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

Reply via email to