https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106265
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- So why do we even emit unsupported 'li 4096' and leave it to the linker to "optimize(?)"? At least the cost of this should be reflected - IIRC powerpc recently got improvements for similar cases by changing the targets rtx_cost hook to properly const SET from CONST_INT so that CSE doesn't leave so many sets from constants around. OTOH LRA rematerialization also could be the culprit, thinking rematerializing the constant is cheaper than spilling a register holding it.