https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121936
--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Lénárd Szolnoki from comment #15) > > We get: > > depends_on_unpsecified_content(int): > > stp x29, x30, [sp, #-32]! > > str x19, [sp, #16] > > mov x29, sp > > cbz w0, .LBB1_2 > > mov w19, w0 > > > > If we used gnu::noipa, then GCC does the same as LLVM does on the original > > testcase. > > I don't see the same issue manifesting, this looks like correct inlining and > optimizations to me. Also, the original issue for GCC manifested in `main`, > not in `depends_on_unspecified_content` (or `f` in the godbolt). The codegen > for `depends_on_unspecified_content` is fine in both clang and gcc. Try to use depends_on_unpsecified_content or m from a tu compiled with gcc at -O0 and you would get the same incorrect behavior