[PATCH] D105807: [X86] pr51000 struct return tailcalling
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 10:30:54 PDT 2021
efriedma added a comment.
re: [[clang::musttail]]: if the C++-level types match, musttail should always succeed. If it doesn't, that's generally a backend bug. Note that the [[clang::musttail]] rules imply the sret markings match. (The old PowerPC ABI has complicated issues with tail calls, though...)
================
Comment at: llvm/test/CodeGen/X86/sibcall.ll:861
define fastcc void @t21_sret_to_non_sret(%struct.foo* noalias sret(%struct.foo) %agg.result) nounwind {
; X86-LABEL: t21_sret_to_non_sret:
----------------
Are you sure it's legal to transform t21_sret_to_non_sret?
>From the x86_64 ABI document: "If the type has class MEMORY [...] On return `%rax` will contain the address that has been passed in by the caller in `%rdi`." t21_f_non_sret won't do that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105807/new/
https://reviews.llvm.org/D105807
More information about the llvm-commits
mailing list