https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87576
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic,
| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-10-11
Component|c++ |tree-optimization
Ever confirmed|0 |1
Known to fail| |7.3.1, 8.2.0
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(compute_affine_dependence
stmt_a: _152 = MEM[(type &)&v].smallData.arr[_150];
stmt_b: v.smallData.arr[_151] = _152;
(analyze_overlapping_iterations
(chrec_a = {6, +, 1}_5)
(chrec_b = {3, +, 1}_5)
(analyze_siv_subscript
(analyze_subscript_affine_affine
(overlaps_a = no dependence)
(overlaps_b = no dependence))
)
(overlap_iterations_a = no dependence)
(overlap_iterations_b = no dependence))
) -> no dependence
that looks somewhat odd, a usual case would look like
(compute_affine_dependence
stmt_a: _2 = a[_1];
stmt_b: a[i_11] = _2;
(analyze_overlapping_iterations
(chrec_a = {3, +, 1}_1)
(chrec_b = {0, +, 1}_1)
...
(build_classic_dist_vector
dist_vector = ( 3
)
)
...
generated memmove
commenting the use of std::move doesn't "fix" it but we see
(compute_affine_dependence
stmt_a: _152 = v.smallData.arr[_150];
stmt_b: v.smallData.arr[_151] = _152;
(analyze_overlapping_iterations
(chrec_a = {6, +, 1}_5)
(chrec_b = {3, +, 1}_5)
(analyze_siv_subscript
(analyze_subscript_affine_affine
(overlaps_a = no dependence)
(overlaps_b = no dependence))
)
(overlap_iterations_a = no dependence)
(overlap_iterations_b = no dependence))
) -> no dependence
Confirmed. It's possibly related to how you use smallData, thus that
the index 6 above is outside of the declared storage.
So this is a case of a warning for essentially dead code or subsequently
the failure to eliminate that dead code.