[Bug middle-end/99339] Poor codegen with simple varargs

2021-03-03 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339 --- Comment #8 from Jakub Jelinek --- The stdarg pass already performs similar analysis, see e.g. reachable_at_most_once function, because if those aren't used in loops and escape, it computes not just whether the function uses some fp or gpr arg

[Bug middle-end/99339] Poor codegen with simple varargs

2021-03-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339 Richard Biener changed: What|Removed |Added CC||jamborm at gcc dot gnu.org --- Comment

[Bug middle-end/99339] Poor codegen with simple varargs

2021-03-02 Thread redbeard0531 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339 --- Comment #6 from Mathias Stearn --- > The question is how common in the wild it is and if it is worth the work. I'm not sure how common it is, but this is my use case. The code in the bug report is a slightly simplified example from some Real

[Bug middle-end/99339] Poor codegen with simple varargs

2021-03-02 Thread redbeard0531 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339 --- Comment #5 from Mathias Stearn --- I filed a related bug with clang right after this one if anyone want to follow along https://bugs.llvm.org/show_bug.cgi?id=49395. Just because clang does worse doesn't mean gcc shouldn't do better ;)

[Bug middle-end/99339] Poor codegen with simple varargs

2021-03-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4

[Bug middle-end/99339] Poor codegen with simple varargs

2021-03-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339 --- Comment #3 from Richard Biener --- So we could try to lower even va_start/end to expose the va_list meta fully to the middle-end early which should eventually allow eliding it. That would require introducing other builtins/internal fns to al

[Bug middle-end/99339] Poor codegen with simple varargs

2021-03-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339 --- Comment #2 from Richard Biener --- Btw, clang manages to produce the following, which shows the situation could be worse ;) test_va:# @test_va .cfi_startproc # %bb.0: subq$88, %rsp

[Bug middle-end/99339] Poor codegen with simple varargs

2021-03-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Keywords|