AArch64/GlobalISel: Fix using wrong calling convention for calls
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 28 Feb 2021 16:28:14 +0000 (11:28 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 1 Mar 2021 13:46:33 +0000 (08:46 -0500)
This was reusing the parent function calling convention instead of the
callee. I'm not sure if there's a case where there's an observable
difference.

I previously missed this in b72a23650f573299aec30846fb844c3558921fb8

llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp

index c5b8e22..ed6b231 100644 (file)
@@ -994,7 +994,7 @@ bool AArch64CallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
 
   SmallVector<ArgInfo, 8> InArgs;
   if (!Info.OrigRet.Ty->isVoidTy())
-    splitToValueTypes(Info.OrigRet, InArgs, DL, MRI, F.getCallingConv());
+    splitToValueTypes(Info.OrigRet, InArgs, DL, MRI, Info.CallConv);
 
   // If we can lower as a tail call, do that instead.
   bool CanTailCallOpt =