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

--- Comment #10 from Vineet Gupta <vineetg at gcc dot gnu.org> ---
Quick update as I was testing this for gcc-16 dev cycle.

It seems on the trunk the spill issue goes away with uabd expander re-enabled
(at least for the toggles originally report)

I reverse bisected (good is buggy, bad is fixed) it to 


commit ef8b3b979b6117eba9b39a7174f89b7297e8a1cd
Author: Richard Biener <[email protected]>
Date:   Fri Oct 17 14:03:21 2025 +0200

    tree-optimization/121631 - UB in vector epilogue

    The vectorizer fails to take UB due to signed overflow into account
    when generating code for the epilogue of a signed reduction.  The
    following tries to make sure to perform the actual reduction
    computations in an unsigned type.  I did not bother to adjust
    inputs to internal functions like .REDUC_PLUS.

I don't think this fixed anything specifically to the issue, but it seems to
have changed the generated insn order so the live range of some reg improved,
eliding the spill. However the fundamental issue remains (and most likely
exhibited with different set of toggles or tunes) thus this PR stays open.

Reply via email to