https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033

--- Comment #8 from Davide Italiano <dccitaliano at gmail dot com> ---
(In reply to Andrew Pinski from comment #7)
> (In reply to Davide Italiano from comment #6)
> > I noticed you linked the LLVM bug I found. 
> > As part of my search/analysis, I found out there are cases that sometimes
> > clang gets but GCC doesn't (unsurprisingly, FWIW).
> > 
> > Here's a simple one.
> > https://godbolt.org/z/fjjzf9xds
> 
> here is a slightly modified example which shows the opposite way, GCC
> figures it at -Os but LLVM does not:
> ```
> long patatino() {
>     long x = 0;
>     for (int i = 0; i < 5; ++i) {
>         if (x < 10)
>         while (x < 10) {
>             x += 1;
>         }
>     }
>     return x;
> }
> ```

Yes, indeed. I found example that go both way. From what I see, FWIW, but I'm
still very early in my investigation, GCC's -Oz outperforms LLVM's -Oz on many
cases.

Reply via email to