-
Notifications
You must be signed in to change notification settings - Fork 14k
AArch64: Fix hardcoding calling convention of sincos_stret (NFC) #144336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AArch64: Fix hardcoding calling convention of sincos_stret (NFC) #144336
Conversation
@llvm/pr-subscribers-backend-aarch64 Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/144336.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 7519ac5260a64..54271d4d84420 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -5106,9 +5106,10 @@ SDValue AArch64TargetLowering::LowerFSINCOS(SDValue Op,
StructType *RetTy = StructType::get(ArgTy, ArgTy);
TargetLowering::CallLoweringInfo CLI(DAG);
+ CallingConv::ID CC = getLibcallCallingConv(LC);
CLI.setDebugLoc(dl)
.setChain(DAG.getEntryNode())
- .setLibCallee(CallingConv::Fast, RetTy, Callee, std::move(Args));
+ .setLibCallee(CC, RetTy, Callee, std::move(Args));
std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
return CallResult.first;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine... Did this cause any specific issue?
I can see the CC was set for the "WatchABI", which I guess was ignored:
llvm-project/llvm/lib/IR/RuntimeLibcalls.cpp
Lines 382 to 391 in 01f9dff
if (darwinHasSinCos(TT)) { | |
setLibcallName(RTLIB::SINCOS_STRET_F32, "__sincosf_stret"); | |
setLibcallName(RTLIB::SINCOS_STRET_F64, "__sincos_stret"); | |
if (TT.isWatchABI()) { | |
setLibcallCallingConv(RTLIB::SINCOS_STRET_F32, | |
CallingConv::ARM_AAPCS_VFP); | |
setLibcallCallingConv(RTLIB::SINCOS_STRET_F64, | |
CallingConv::ARM_AAPCS_VFP); | |
} | |
} |
No, I'm just replacing all of the runtime libcall API usage and fixing irregularities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget "NFC" in the commit message.
No description provided.