[clang] [llvm] [ARM] Fix musttail calls (PR #109943)
Oliver Stannard via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 26 03:37:45 PDT 2024
================
@@ -5112,7 +5112,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
RawAddress SRetAlloca = RawAddress::invalid();
llvm::Value *UnusedReturnSizePtr = nullptr;
if (RetAI.isIndirect() || RetAI.isInAlloca() || RetAI.isCoerceAndExpand()) {
- if (IsVirtualFunctionPointerThunk && RetAI.isIndirect()) {
+ if ((IsVirtualFunctionPointerThunk && RetAI.isIndirect()) || IsMustTail) {
----------------
ostannard wrote:
I think `isIndirect()` is the only case needed for `IsMustTail`, so I'll change the code to limit it to that, matching the `IsVirtualFunctionPointerThunk` check.
https://github.com/llvm/llvm-project/pull/109943
More information about the cfe-commits
mailing list