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

--- Comment #32 from Richard Biener <rguenth at gcc dot gnu.org> ---
          int ii;
            for (ii=j+1; ii<M; ii++)
            {
                double *Aii = A[ii];
                double *Aj = A[j];
                double AiiJ = Aii[j];       /* Here */
                int jj;
                for (jj=j+1; jj<N; jj++)
                  Aii[jj] -= AiiJ * Aj[jj];

            }

the alias check for Aii[jj] vs. Aj[jj] should be as "simple" as
abs(Aii - Aj) >= VF * sizeof (double).  It certainly looks more complicated
than that:

  _1100 = (unsigned int) SOR_size_19;
  _1096 = (unsigned int) j_910;
  _1087 = _1100 - _1096;
  _1077 = _1087 + 4294967295;
  _1076 = _1077 > 8;
  _1075 = (sizetype) j_910;
  _1074 = _1075 + 3;
  _1073 = _1074 * 8;
  _1072 = _539 + _1073;
  _1071 = (sizetype) j_910;
  _1056 = _1071 + 1;
  _1055 = _1056 * 8;
  _1054 = Aii_557 + _1055;
  _1053 = _1054 >= _1072;
  _1052 = (sizetype) j_910;
  _1034 = _1052 + 3;
  _1033 = _1034 * 8;
  _1032 = Aii_557 + _1033;
  _1031 = (sizetype) j_910;
  _1030 = _1031 + 1;
  _1029 = _1030 * 8;
  _1028 = _539 + _1029;
  _1027 = _1028 >= _1032;
  _1026 = _1027 | _1053;
  _1025 = _1026 & _1076;
  if (_1025 != 0)

appearantly we expanded things too much.

Creating dr for *_566
analyze_innermost: Applying pattern match.pd:84, generic-match.c:11338
success.
Applying pattern match.pd:84, generic-match.c:11338
        base_address: _539 + (sizetype) ((long unsigned int) j_910 * 8)
        offset from base address: 0
        constant offset from base address: 8
        step: 8
        aligned to: 128
        base_object: *_539 + (sizetype) ((long unsigned int) j_910 * 8)
        Access function 0: {8B, +, 8}_25
Creating dr for *_564
analyze_innermost: Applying pattern match.pd:84, generic-match.c:11338
success.
Applying pattern match.pd:84, generic-match.c:11338
        base_address: Aii_557 + (sizetype) ((long unsigned int) j_910 * 8)
        offset from base address: 0
        constant offset from base address: 8
        step: 8
        aligned to: 128
        base_object: *Aii_557 + (sizetype) ((long unsigned int) j_910 * 8)
        Access function 0: {8B, +, 8}_25
...
LU.c:93:32: note: mark for run-time aliasing test between *_566 and *_564

looks like we fail to split the common exprs away.  But that may be hard(er)
because data reference analysis produces

DR_BASE_ADDRESS == Aii_81 + ((sizetype) j_94 + 1) * 8
DR_OFFSET == 0

rather than the expected DR_OFFSET == ((sizetype) j_94 + 1) * 8 because of
the way pointer accesses are handled (only the get_inner_reference part
provides some input to the "offset-IV" analysis).

Later doing ptr1 + X <= ptr2 + X is not folded to ptr1 <= ptr2 because of
overflow concerns.

Reply via email to