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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
/app/example.cpp:20:25: note:   Detected interleaving store a[i_27] and a[i_27]
/app/example.cpp:20:25: note:   Queuing group with duplicate access for fixup
/app/example.cpp:20:25: note:   zero step in outer loop.
/app/example.cpp:20:25: note:   zero step in outer loop.
/app/example.cpp:20:25: missed:   not vectorized: complicated access pattern.
/app/example.cpp:22:18: missed:   not vectorized: complicated access pattern.
/app/example.cpp:20:25: missed:  bad data access.
...

/app/example.cpp:21:27: note:   dependence distance  = 0.
/app/example.cpp:21:27: note:   dependence distance == 0 between b[i_27] and
b[i_27]
/app/example.cpp:21:27: note:   dependence distance  = 1.
/app/example.cpp:22:18: missed:   not vectorized, possible dependence between
data-refs a[i_27] and a[_9]
/app/example.cpp:21:27: missed:  bad data dependence.
/app/example.cpp:21:27: note:  ***** Analysis  failed with vector mode V4SF

There is a missing DSE before hand:
  # VUSE <.MEM_28>
  _1 = bD.3768[i_27];
  # VUSE <.MEM_28>
  _2 = cD.3769[i_27];
  # VUSE <.MEM_28>
  _3 = dD.3770[i_27];
  _4 = _2 * _3;
  _5 = _1 + _4;
  # .MEM_19 = VDEF <.MEM_28>
  aD.3767[i_27] = _5;
  # VUSE <.MEM_19>
  _6 = eD.3771[i_27];
  _7 = _3 * _6;
  _8 = _5 + _7;
  # .MEM_20 = VDEF <.MEM_19>
  bD.3768[i_27] = _8;
  # RANGE [irange] int [1, 31999] NONZERO 0x7fff
  _9 = i_27 + 1;
  # VUSE <.MEM_20>
  _10 = aD.3767[_9];
  _11 = _3 * _10;
  _12 = _8 + _11;
  # .MEM_21 = VDEF <.MEM_20>
  aD.3767[i_27] = _12;

DSE does not notice the store defining MEM_19 does touch the load:
  # VUSE <.MEM_20>
  _10 = aD.3767[_9];

And that it is redudent with the store defining MEM_21.

Reply via email to