[Bug rtl-optimization/82683] Combine: GCC generates bad code with -tune=thunderx2t99

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 24 12:25:00 GMT 2017


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

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Ah.  So we start with

insn_cost 4 for    18: r91:DI=r83:DI<<0x2
      REG_DEAD r83:DI
insn_cost 4 for    19: r78:DI=r76:DI+r91:DI
      REG_DEAD r91:DI
      REG_DEAD r76:DI
insn_cost 20 for    20: r82:SI=[r78:DI]
      REG_DEAD r78:DI
insn_cost 4 for    21: r83:DI=sign_extend(r82:SI)

and first 18,19 are combined, and then 19,20,21.  Both 19 and 21 set
r83, it is dead after 19, but that note is put on 21.


More information about the Gcc-bugs mailing list