[PATCH] D105807: [X86] pr51000 struct return tailcalling
    Nathan Sidwell via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jul 15 13:30:28 PDT 2021
    
    
  
urnathan added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:4679
+  // is incompatible.
+  if (callIsStructReturn(Outs, Subtarget.isTargetMCU()) == StackStructReturn) {
+    // For a compatible tail call the callee must return our sret pointer. So it
----------------
efriedma wrote:
> I feel like I must be blind here, but this is what we used to call isCalleeStructRet, right? 
> I thought we wanted to check isCallerStructRet?
Not quite.  callIsStructReturn's result is tri-valued.  Previously we were checking != NotStructReturn.  It is sufficient to check == StackStructReturn, as RegStructReturn is tailcallable.  I moved the call to callIsStructReturn here, from the caller, because its the only use of that value.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105807/new/
https://reviews.llvm.org/D105807
    
    
More information about the llvm-commits
mailing list