https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95084
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Note the issue is older but there are some cases where sink didn't do its job that have been fixed meanwhile. For GCC 12 we have an additional (albeit quite late) sinking pass, so one option might be to tame down early sinking for possibly trapping operations in loops that look like they could be vectorized (similar how we tame PRE). I think the only loop pass affected by not sinking might be unswitching which could get less favorable costs due to the need to duplicate the not sunk stmts. At least I cannot think of a way to preserve the conditional non-trappingness on the ref after sinking it.