[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-07-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 --- Comment #12 from Andrew Pinski --- (In reply to Andrew Pinski from comment #11) > (In reply to Andrew Pinski from comment #10) > > > > Patch posted: > > https://gcc.gnu.org/pipermail/gcc-patches/2025-July/688286.html > > > > That just fixe

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-07-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 --- Comment #11 from Andrew Pinski --- (In reply to Andrew Pinski from comment #10) > > Patch posted: > https://gcc.gnu.org/pipermail/gcc-patches/2025-July/688286.html > > That just fixes the tail recusion part. The tail call part I will post

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-07-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 --- Comment #10 from Andrew Pinski --- (In reply to Andrew Pinski from comment #9) > Created attachment 61759 [details] > Patch which is in testing but needs testcases > > This only fixes the tree level part; there is a middle-end part which I

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-06-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 --- Comment #9 from Andrew Pinski --- Created attachment 61759 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61759&action=edit Patch which is in testing but needs testcases This only fixes the tree level part; there is a middle-end part

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-06-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 --- Comment #8 from Andrew Pinski --- (In reply to Andrew Pinski from comment #7) > But I have a patch for the tree part which detects the tail call. And it also detects the tail recusion too. So at least I could submit it seperately for that.

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-06-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 Andrew Pinski changed: What|Removed |Added Depends on||71761 Severity|normal

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-06-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 --- Comment #6 from Andrew Pinski --- A simple tail recusion case: ``` struct Slice { const char* data; unsigned long size; ~Slice(); }; Slice get_s_impl(); Slice get_s(bool t) { if (!t) return get_s(!t); return {}; } ``` Wh

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-06-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 --- Comment #5 from Andrew Pinski --- Note clang rejects musttail here: ``` tail call requires that the return value, all parameters, and any temporaries created by the expression are trivially destructible ``` :)

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-06-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/120871] missing tail call optimization on RVO

2025-06-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120871 Andrew Pinski changed: What|Removed |Added Component|c++ |tree-optimization Last reconfirmed|