[llvm] 87e2801 - GlobalISel: Use correct calling convention in handleAssignments

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 14:09:42 PST 2021


Author: Matt Arsenault
Date: 2021-02-08T17:09:28-05:00
New Revision: 87e280110d91edda0353eddb621cb96f72c7ece3

URL: https://github.com/llvm/llvm-project/commit/87e280110d91edda0353eddb621cb96f72c7ece3
DIFF: https://github.com/llvm/llvm-project/commit/87e280110d91edda0353eddb621cb96f72c7ece3.diff

LOG: GlobalISel: Use correct calling convention in handleAssignments

This was using the calling convention of the calling function, not the
callee. Avoids regressions in a future patch.

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/CallLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
index 8c300f1eb974..d9960739baf8 100644
--- a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
@@ -260,12 +260,12 @@ bool CallLowering::handleAssignments(CCState &CCInfo,
       continue;
 
     MVT NewVT = TLI->getRegisterTypeForCallingConv(
-        F.getContext(), F.getCallingConv(), EVT(CurVT));
+        F.getContext(), CCInfo.getCallingConv(), EVT(CurVT));
 
     // If we need to split the type over multiple regs, check it's a scenario
     // we currently support.
     unsigned NumParts = TLI->getNumRegistersForCallingConv(
-        F.getContext(), F.getCallingConv(), CurVT);
+        F.getContext(), CCInfo.getCallingConv(), CurVT);
 
     if (NumParts == 1) {
       // Try to use the register type if we couldn't assign the VT.


        


More information about the llvm-commits mailing list