[Bug target/93605] GCC suboptimal tail call optimization in trivial function forwarding with __attribute__((noinline))

2021-03-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93605

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #4 from Andrew Pinski  ---
Dup of bug 97607 which has the anlysis already.

*** This bug has been marked as a duplicate of bug 97607 ***

[Bug target/93605] GCC suboptimal tail call optimization in trivial function forwarding with __attribute__((noinline))

2020-02-05 Thread xerofoify at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93605

Nicholas Krause  changed:

   What|Removed |Added

 CC||xerofoify at gmail dot com

--- Comment #3 from Nicholas Krause  ---
I just tried with bool& as auto should just be a bool without a reference.
Seems to be a issue with gcc assuming that it must move into the bool if not a
ref in the function's signature. And it works for other targets as Andrew
pointed out.

[Bug target/93605] GCC suboptimal tail call optimization in trivial function forwarding with __attribute__((noinline))

2020-02-05 Thread mike.k at digitalcarbide dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93605

--- Comment #2 from mike.k at digitalcarbide dot com ---
Interestingly, changing `impl::func`'s signature from `bool v` to `auto&& v`
fixes the issue. Changing it to `auto v` does not.

[Bug target/93605] GCC suboptimal tail call optimization in trivial function forwarding with __attribute__((noinline))

2020-02-05 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93605

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Target||x86_64-linux-gnu
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-02-05
  Component|rtl-optimization|target
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Must be a target specific issue.

Aarch64 produces:
_Z4funcbii:
.LFB1:
.cfi_startproc
b   _ZN4implL4funcEbii
.cfi_endproc