https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106265
--- Comment #7 from Vineet Gupta <vineet.gupta at linux dot dev> --- (In reply to Richard Biener from comment #5) > So why do we even emit unsupported 'li 4096' and leave it to the linker to > "optimize(?)"? li 4096 is really a pseudo-op - LUI is used to build 32-bit constants. For this problem whether LI or LUI is used is just a detail. > OTOH LRA rematerialization also could be the culprit, thinking rematerializing > the constant is cheaper than spilling a register holding it. Thx for the pointer. I tried disabling it -fno-lra-remat and it generates exactly same code.