This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/82683] Combine: GCC generates bad code with -tune=thunderx2t99
- From: "segher at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Oct 2017 12:25:55 +0000
- Subject: [Bug rtl-optimization/82683] Combine: GCC generates bad code with -tune=thunderx2t99
- Auto-submitted: auto-generated
- References: <bug-82683-4@http.gcc.gnu.org/bugzilla/>
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.