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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
            Summary|Missed optimization due to  |Missed optimization due to
                   |dependency analysis         |vectorizing a loop with
                   |                            |dependence

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The vectorizer just does not try to ask - it only analyzes dependences of the
innermost loop where a[j] has invariant address.

loop distribution does, and there we hit

(compute_affine_dependence
  ref_a: a[i_17], stmt_a: _1 = a[i_17];
  ref_b: a[j_16], stmt_b: a[j_16] = _2;
(analyze_overlapping_iterations
  (chrec_a = {0, +, 1}<nw>_1)
  (chrec_b = {0, +, 1}_2)
(analyze_miv_subscript
(analyze_subscript_affine_affine
  (overlaps_a = [0 + 1 * x_1])
  (overlaps_b = [0 + 1 * x_1]))
)
  (overlap_iterations_a = [0 + 1 * x_1])
  (overlap_iterations_b = [0 + 1 * x_1]))
(Dependence relation cannot be represented by distance vector.)
)
consider run-time aliasing test between a[i_17] and a[j_16]

this might or might not be a limitation of classical dependence analysis
or at least of our implementation and the particular representation of
invariantness in some of the loop nests.

Reply via email to