https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129143
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-12-01
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords| |missed-optimization
Priority|P3 |P5
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed reporter's analysis on m68k-linux (verified on Compiler Explorer with
GCC 16.2 -O2 -m68040 -fomit-frame-pointer). Reassociation of (idx * 32) + (31 -
clz) to (idx * 32 + 31) - clz increases register pressure beyond m68k's two
call-clobbered data registers (%d0 and %d1), spilling into callee-saved %d2 and
adding an extra register copy, whereas -fno-tree-reassoc cleanly fits in %d0
and %d1 (7 vs 10 insns).