[llvm] [win/arm64] Enable tail call with inreg arguments when possible (PR #134671)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 13:04:41 PDT 2025


mstorsjo wrote:

TBH I'm not sure that I can give a very useful review here, as I'm not very familiar with these aspects. But your reasoning sounds sensible.

As for the reduced testcase:

> struct T { int x; };
> struct S {
>     T foo();
>     T bar();
> };
> T S::foo() { return bar(); } // foo's sret argument will get passed directly to bar

This is kinda beside the point, but for purposes of getting a minimal repro, isn't the structure `S` unnecessary here - wouldn't this be reproducible with two plain global functions as well? Or does the implicit `this` pointer affect the calling conventions of the methods, necessary for triggering this case?

https://github.com/llvm/llvm-project/pull/134671


More information about the llvm-commits mailing list