[Bug target/87627] GCC generates rube-goldberg machine for trivial tail call on 32-bit x86

2021-08-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87627 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2018-10-17 00:00:00 |2021-8-19 --- Comment #7 from Andrew

[Bug target/87627] GCC generates rube-goldberg machine for trivial tail call on 32-bit x86

2018-10-29 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87627 --- Comment #6 from Alexander Monakov --- FWIW the following CSE enhancement cleans this up, but I'm unhappy with this patch because it's too narrowly targeted; in particular, won't clean up void g(int a, int *b, int c); void f(int a, int *b,

[Bug target/87627] GCC generates rube-goldberg machine for trivial tail call on 32-bit x86

2018-10-22 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87627 --- Comment #5 from Alexander Monakov --- I've spent some time looking at this again, and I couldn't find a way to preserve REG_EQUIV notes (it's actually unclear what REG_EQUIV means precisely). What I think could help in simple cases like

[Bug target/87627] GCC generates rube-goldberg machine for trivial tail call on 32-bit x86

2018-10-17 Thread bugdal at aerifal dot cx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87627 --- Comment #4 from Rich Felker --- Thanks, that's helpful! For 64-bit what I mean is that it emits: pushq %r12 movl %edx, %r12d pushq %rbp movl %esi, %ebp pushq %rbx movl %edi, %ebx call bar movl %r12d, %edx movl %ebp, %esi

[Bug target/87627] GCC generates rube-goldberg machine for trivial tail call on 32-bit x86

2018-10-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87627 Richard Biener changed: What|Removed |Added Keywords||missed-optimization

[Bug target/87627] GCC generates rube-goldberg machine for trivial tail call on 32-bit x86

2018-10-17 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87627 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org ---

[Bug target/87627] GCC generates rube-goldberg machine for trivial tail call on 32-bit x86

2018-10-16 Thread bugdal at aerifal dot cx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87627 --- Comment #2 from Rich Felker --- Further trial-and-error shows that it seems to be the sibcall itself that causes the mess. My first guess is that something in the RTL considers the whole argument area as clobbered/belonging to the sibcallee

[Bug target/87627] GCC generates rube-goldberg machine for trivial tail call on 32-bit x86

2018-10-16 Thread bugdal at aerifal dot cx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87627 --- Comment #1 from Rich Felker --- Results are similarly bad for 64-bit, except at -Os where it effectively just pushes/pops the argument registers around the call to bar rather than allocating call-saved registers for them. Using -Os on 32-bit