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 tree-optimization/70103] gcc reports bad dependence and bails out of vectorization for one of the bwaves loops.


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

vekumar at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at suse dot de,
                   |                            |richard.guenther at gmail dot com
           Severity|normal                      |enhancement

--- Comment #1 from vekumar at gcc dot gnu.org ---
After discussion with Richard it was concluded that even after we fix this
still we still won't be able to vectorize the loop.

(Snip)
flux_lam.f:68:0: note: not vectorized: relevant stmt not supported:
_177 = _176 % _21;
flux_lam.f:68:0: note: bad operation or unsupported loop bound.
(Snip)

The reason is we have % operations.

(Snip)
  <bb 27>:
  # i_2 = PHI <1(23), _181(28)>
  _175 = i_2 + _21;
  _176 = _175 + -2;
  _177 = _176 % _21;
  im1_178 = _177 + 1;
  _179 = i_2 % _21;
  ip1_180 = _179 + 1;
(Snip)

that makes indices "wrap" around which is of course something that is hard to
vectorize.  One would need iteration space splitting to ensure the wrapping
doesn't occur in the vectorized iterations.

Reporting this bug and marking this as enhancement

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