https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113255
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
So this:
static void
expand_set_or_cpymem_prologue_epilogue_by_misaligned_moves (rtx destmem, rtx
srcmem,
...
/* See how many bytes we skipped. */
saveddest = expand_simple_binop (GET_MODE (*destptr), MINUS, saveddest,
*destptr,
saveddest, 1, OPTAB_DIRECT);
/* Adjust srcptr and count. */
if (!issetmem)
*srcptr = expand_simple_binop (GET_MODE (*srcptr), MINUS, *srcptr,
saveddest, *srcptr, 1, OPTAB_DIRECT);
is the problematical op, but I'm not seeing an easy way to avoid the MINUS
here. It's also difficult to match (minus (..) (and ... aligning-cst))
in find_base_term as the AND is exposed via CSELIB values only.
find_base_term is known broken but base_alias_check continues to be "useful"
for aliasing with spill slots mostly. find_base_term tries to do ad-hoc
points-to analysis but is not conservative in any way - it doesn't even
have a way to say a final "I don't know" which means there's no way to
perform a conservative correction to it. In fact I don't think we can
make it conservative.