[Bug rtl-optimization/67206] Redundant spills in simple copy loop for 32-bit x86 target
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 14 08:47:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67206
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The memmove issue is because of
(compute_affine_dependence
stmt_a: _16 = *_15;
stmt_b: *_12 = _16;
) -> dependence analysis failed
/* Now check that if there is a dependence this dependence is
of a suitable form for memmove. */
vec<loop_p> loops = vNULL;
ddr_p ddr;
loops.safe_push (loop);
ddr = initialize_data_dependence_relation (single_load, single_store,
loops);
compute_affine_dependence (ddr, loop);
if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
{
free_dependence_relation (ddr);
loops.release ();
return;
}
note that we don't use dependence analysis only to decide memcpy vs. memmove
(we use general alias analysis for that) but it is used to guard against
a[i+1] = a[i] which is not a memmove. The loop in the example could be of
that form if out == in + 1.
More information about the Gcc-bugs
mailing list