https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97640
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |ipa
Status|ASSIGNED |NEW
Assignee|pinskia at gcc dot gnu.org |unassigned at gcc dot
gnu.org
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> Confirmed. We get close at -O3 (even at -O2 we are close).
>
> GCC even gets the tail call at -O2 which LLVM does not.
Note at -O3 and s/main/f/ GCC does optimize it down to a constant. So maybe
there is just heurstics of the inliner let.