Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit f3d3277

Browse files
committed
Merging r298179:
----------------------------------------------------------------------- r298179 | niravd | 2017-03-17 20:44:07 -0400 (Fri, 17 Mar 2017) | 7 lines Make library calls sensitive to regparm module flag (Fixes PR3997). Reviewers: mkuper, rnk Subscribers: mehdi_amini, jyknight, aemerson, llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D27050 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@304242 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 8f89f72 commit f3d3277

25 files changed

+285
-102
lines changed

include/llvm/CodeGen/FastISel.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,47 @@ class FastISel {
5757
};
5858
typedef std::vector<ArgListEntry> ArgListTy;
5959

60+
// This is a workaround to not move around the ArgListEntryTypes.
61+
void markFastLibCallAttributes(const TargetLowering &TL, MachineFunction *MF,
62+
unsigned CC, ArgListTy &Args) const {
63+
64+
TargetLowering::ArgListTy TLArgs;
65+
// Convert to TargetLowering::ArgListTy
66+
for (unsigned long i = 0; i < Args.size(); ++i) {
67+
TargetLowering::ArgListEntry TArg;
68+
TArg.Ty = Args[i].Ty;
69+
TArg.isSExt = Args[i].IsSExt;
70+
TArg.isZExt = Args[i].IsZExt;
71+
TArg.isInReg = Args[i].IsInReg;
72+
TArg.isSRet = Args[i].IsSRet;
73+
TArg.isNest = Args[i].IsNest;
74+
TArg.isByVal = Args[i].IsByVal;
75+
TArg.isInAlloca = Args[i].IsInAlloca;
76+
TArg.isReturned = Args[i].IsReturned;
77+
TArg.isSwiftSelf = Args[i].IsSwiftSelf;
78+
TArg.isSwiftError = Args[i].IsSwiftError;
79+
TArg.Alignment = Args[i].Alignment;
80+
TLArgs.push_back(TArg);
81+
}
82+
// Call convered
83+
TL.markLibCallAttributes(MF, CC, TLArgs);
84+
// Copy back.
85+
for (unsigned long i = 0; i < Args.size(); ++i) {
86+
Args[i].Ty = TLArgs[i].Ty;
87+
Args[i].IsSExt = TLArgs[i].isSExt;
88+
Args[i].IsZExt = TLArgs[i].isZExt;
89+
Args[i].IsInReg = TLArgs[i].isInReg;
90+
Args[i].IsSRet = TLArgs[i].isSRet;
91+
Args[i].IsNest = TLArgs[i].isNest;
92+
Args[i].IsByVal = TLArgs[i].isByVal;
93+
Args[i].IsInAlloca = TLArgs[i].isInAlloca;
94+
Args[i].IsReturned = TLArgs[i].isReturned;
95+
Args[i].IsSwiftSelf = TLArgs[i].isSwiftSelf;
96+
Args[i].IsSwiftError = TLArgs[i].isSwiftError;
97+
Args[i].Alignment = TLArgs[i].Alignment;
98+
}
99+
}
100+
60101
struct CallLoweringInfo {
61102
Type *RetTy;
62103
bool RetSExt : 1;

include/llvm/IR/Module.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,10 @@ class Module {
726726
/// @name Utility functions for querying Debug information.
727727
/// @{
728728

729+
/// \brief Returns the Number of Register ParametersDwarf Version by checking
730+
/// module flags.
731+
unsigned getNumberRegisterParameters() const;
732+
729733
/// \brief Returns the Dwarf Version by checking module flags.
730734
unsigned getDwarfVersion() const;
731735

include/llvm/Target/TargetLowering.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@
2525

2626
#include "llvm/ADT/ArrayRef.h"
2727
#include "llvm/ADT/DenseMap.h"
28-
#include "llvm/ADT/SmallVector.h"
2928
#include "llvm/ADT/STLExtras.h"
29+
#include "llvm/ADT/SmallVector.h"
3030
#include "llvm/ADT/StringRef.h"
3131
#include "llvm/CodeGen/DAGCombine.h"
3232
#include "llvm/CodeGen/ISDOpcodes.h"
3333
#include "llvm/CodeGen/MachineValueType.h"
3434
#include "llvm/CodeGen/RuntimeLibcalls.h"
35+
#include "llvm/CodeGen/SelectionDAG.h"
3536
#include "llvm/CodeGen/SelectionDAGNodes.h"
3637
#include "llvm/CodeGen/ValueTypes.h"
3738
#include "llvm/IR/Attributes.h"
@@ -2560,6 +2561,9 @@ class TargetLowering : public TargetLoweringBase {
25602561
};
25612562
typedef std::vector<ArgListEntry> ArgListTy;
25622563

2564+
virtual void markLibCallAttributes(MachineFunction *MF, unsigned CC,
2565+
ArgListTy &Args) const {};
2566+
25632567
/// This structure contains all information that is necessary for lowering
25642568
/// calls. It is passed to TLI::LowerCallTo when the SelectionDAG builder
25652569
/// needs to lower a call, and targets will see this struct in their LowerCall
@@ -2609,6 +2613,20 @@ class TargetLowering : public TargetLoweringBase {
26092613
return *this;
26102614
}
26112615

2616+
// setCallee with target/module-specific attributes
2617+
CallLoweringInfo &setLibCallee(CallingConv::ID CC, Type *ResultType,
2618+
SDValue Target, ArgListTy &&ArgsList) {
2619+
RetTy = ResultType;
2620+
Callee = Target;
2621+
CallConv = CC;
2622+
NumFixedArgs = Args.size();
2623+
Args = std::move(ArgsList);
2624+
2625+
DAG.getTargetLoweringInfo().markLibCallAttributes(
2626+
&(DAG.getMachineFunction()), CC, Args);
2627+
return *this;
2628+
}
2629+
26122630
CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultType,
26132631
SDValue Target, ArgListTy &&ArgsList) {
26142632
RetTy = ResultType;

lib/CodeGen/SelectionDAG/FastISel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,8 @@ bool FastISel::lowerCallTo(const CallInst *CI, MCSymbol *Symbol,
888888
Entry.setAttributes(&CS, ArgI + 1);
889889
Args.push_back(Entry);
890890
}
891+
markFastLibCallAttributes(*MF->getSubtarget().getTargetLowering(), MF,
892+
CS.getCallingConv(), Args);
891893

892894
CallLoweringInfo CLI;
893895
CLI.setCallee(RetTy, FTy, Symbol, std::move(Args), CS, NumArgs);

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,9 +1935,13 @@ SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node,
19351935
InChain = TCChain;
19361936

19371937
TargetLowering::CallLoweringInfo CLI(DAG);
1938-
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
1939-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
1940-
.setTailCall(isTailCall).setSExtResult(isSigned).setZExtResult(!isSigned);
1938+
CLI.setDebugLoc(SDLoc(Node))
1939+
.setChain(InChain)
1940+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
1941+
std::move(Args))
1942+
.setTailCall(isTailCall)
1943+
.setSExtResult(isSigned)
1944+
.setZExtResult(!isSigned);
19411945

19421946
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
19431947

@@ -1970,9 +1974,12 @@ SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, EVT RetVT,
19701974
Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
19711975

19721976
TargetLowering::CallLoweringInfo CLI(DAG);
1973-
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
1974-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
1975-
.setSExtResult(isSigned).setZExtResult(!isSigned);
1977+
CLI.setDebugLoc(dl)
1978+
.setChain(DAG.getEntryNode())
1979+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
1980+
std::move(Args))
1981+
.setSExtResult(isSigned)
1982+
.setZExtResult(!isSigned);
19761983

19771984
std::pair<SDValue,SDValue> CallInfo = TLI.LowerCallTo(CLI);
19781985

@@ -2004,9 +2011,12 @@ SelectionDAGLegalize::ExpandChainLibCall(RTLIB::Libcall LC,
20042011
Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext());
20052012

20062013
TargetLowering::CallLoweringInfo CLI(DAG);
2007-
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
2008-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
2009-
.setSExtResult(isSigned).setZExtResult(!isSigned);
2014+
CLI.setDebugLoc(SDLoc(Node))
2015+
.setChain(InChain)
2016+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
2017+
std::move(Args))
2018+
.setSExtResult(isSigned)
2019+
.setZExtResult(!isSigned);
20102020

20112021
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
20122022

@@ -2099,9 +2109,12 @@ SelectionDAGLegalize::ExpandDivRemLibCall(SDNode *Node,
20992109

21002110
SDLoc dl(Node);
21012111
TargetLowering::CallLoweringInfo CLI(DAG);
2102-
CLI.setDebugLoc(dl).setChain(InChain)
2103-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
2104-
.setSExtResult(isSigned).setZExtResult(!isSigned);
2112+
CLI.setDebugLoc(dl)
2113+
.setChain(InChain)
2114+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
2115+
std::move(Args))
2116+
.setSExtResult(isSigned)
2117+
.setZExtResult(!isSigned);
21052118

21062119
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
21072120

@@ -2210,9 +2223,9 @@ SelectionDAGLegalize::ExpandSinCosLibCall(SDNode *Node,
22102223

22112224
SDLoc dl(Node);
22122225
TargetLowering::CallLoweringInfo CLI(DAG);
2213-
CLI.setDebugLoc(dl).setChain(InChain)
2214-
.setCallee(TLI.getLibcallCallingConv(LC),
2215-
Type::getVoidTy(*DAG.getContext()), Callee, std::move(Args));
2226+
CLI.setDebugLoc(dl).setChain(InChain).setLibCallee(
2227+
TLI.getLibcallCallingConv(LC), Type::getVoidTy(*DAG.getContext()), Callee,
2228+
std::move(Args));
22162229

22172230
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
22182231

@@ -3830,10 +3843,11 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
38303843
TargetLowering::CallLoweringInfo CLI(DAG);
38313844
CLI.setDebugLoc(dl)
38323845
.setChain(Node->getOperand(0))
3833-
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
3834-
DAG.getExternalSymbol("__sync_synchronize",
3835-
TLI.getPointerTy(DAG.getDataLayout())),
3836-
std::move(Args));
3846+
.setLibCallee(
3847+
CallingConv::C, Type::getVoidTy(*DAG.getContext()),
3848+
DAG.getExternalSymbol("__sync_synchronize",
3849+
TLI.getPointerTy(DAG.getDataLayout())),
3850+
std::move(Args));
38373851

38383852
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
38393853

@@ -3870,10 +3884,10 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
38703884
TargetLowering::CallLoweringInfo CLI(DAG);
38713885
CLI.setDebugLoc(dl)
38723886
.setChain(Node->getOperand(0))
3873-
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
3874-
DAG.getExternalSymbol("abort",
3875-
TLI.getPointerTy(DAG.getDataLayout())),
3876-
std::move(Args));
3887+
.setLibCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
3888+
DAG.getExternalSymbol(
3889+
"abort", TLI.getPointerTy(DAG.getDataLayout())),
3890+
std::move(Args));
38773891
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
38783892

38793893
Results.push_back(CallResult.second);

lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,9 +2601,10 @@ void DAGTypeLegalizer::ExpandIntRes_XMULO(SDNode *N,
26012601
SDValue Func = DAG.getExternalSymbol(TLI.getLibcallName(LC), PtrVT);
26022602

26032603
TargetLowering::CallLoweringInfo CLI(DAG);
2604-
CLI.setDebugLoc(dl).setChain(Chain)
2605-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Func, std::move(Args))
2606-
.setSExtResult();
2604+
CLI.setDebugLoc(dl)
2605+
.setChain(Chain)
2606+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Func, std::move(Args))
2607+
.setSExtResult();
26072608

26082609
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
26092610

lib/CodeGen/SelectionDAG/LegalizeTypes.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,9 +1087,12 @@ DAGTypeLegalizer::ExpandChainLibCall(RTLIB::Libcall LC, SDNode *Node,
10871087
Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext());
10881088

10891089
TargetLowering::CallLoweringInfo CLI(DAG);
1090-
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
1091-
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
1092-
.setSExtResult(isSigned).setZExtResult(!isSigned);
1090+
CLI.setDebugLoc(SDLoc(Node))
1091+
.setChain(InChain)
1092+
.setLibCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee,
1093+
std::move(Args))
1094+
.setSExtResult(isSigned)
1095+
.setZExtResult(!isSigned);
10931096

10941097
std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
10951098

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4943,11 +4943,11 @@ SDValue SelectionDAG::getMemcpy(SDValue Chain, const SDLoc &dl, SDValue Dst,
49434943
TargetLowering::CallLoweringInfo CLI(*this);
49444944
CLI.setDebugLoc(dl)
49454945
.setChain(Chain)
4946-
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMCPY),
4947-
Dst.getValueType().getTypeForEVT(*getContext()),
4948-
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMCPY),
4949-
TLI->getPointerTy(getDataLayout())),
4950-
std::move(Args))
4946+
.setLibCallee(TLI->getLibcallCallingConv(RTLIB::MEMCPY),
4947+
Dst.getValueType().getTypeForEVT(*getContext()),
4948+
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMCPY),
4949+
TLI->getPointerTy(getDataLayout())),
4950+
std::move(Args))
49514951
.setDiscardResult()
49524952
.setTailCall(isTailCall);
49534953

@@ -5004,11 +5004,11 @@ SDValue SelectionDAG::getMemmove(SDValue Chain, const SDLoc &dl, SDValue Dst,
50045004
TargetLowering::CallLoweringInfo CLI(*this);
50055005
CLI.setDebugLoc(dl)
50065006
.setChain(Chain)
5007-
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMMOVE),
5008-
Dst.getValueType().getTypeForEVT(*getContext()),
5009-
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMMOVE),
5010-
TLI->getPointerTy(getDataLayout())),
5011-
std::move(Args))
5007+
.setLibCallee(TLI->getLibcallCallingConv(RTLIB::MEMMOVE),
5008+
Dst.getValueType().getTypeForEVT(*getContext()),
5009+
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMMOVE),
5010+
TLI->getPointerTy(getDataLayout())),
5011+
std::move(Args))
50125012
.setDiscardResult()
50135013
.setTailCall(isTailCall);
50145014

@@ -5066,11 +5066,11 @@ SDValue SelectionDAG::getMemset(SDValue Chain, const SDLoc &dl, SDValue Dst,
50665066
TargetLowering::CallLoweringInfo CLI(*this);
50675067
CLI.setDebugLoc(dl)
50685068
.setChain(Chain)
5069-
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMSET),
5070-
Dst.getValueType().getTypeForEVT(*getContext()),
5071-
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMSET),
5072-
TLI->getPointerTy(getDataLayout())),
5073-
std::move(Args))
5069+
.setLibCallee(TLI->getLibcallCallingConv(RTLIB::MEMSET),
5070+
Dst.getValueType().getTypeForEVT(*getContext()),
5071+
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMSET),
5072+
TLI->getPointerTy(getDataLayout())),
5073+
std::move(Args))
50745074
.setDiscardResult()
50755075
.setTailCall(isTailCall);
50765076

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4929,14 +4929,12 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
49294929
report_fatal_error("Unsupported element size");
49304930

49314931
TargetLowering::CallLoweringInfo CLI(DAG);
4932-
CLI.setDebugLoc(sdl)
4933-
.setChain(getRoot())
4934-
.setCallee(TLI.getLibcallCallingConv(LibraryCall),
4935-
Type::getVoidTy(*DAG.getContext()),
4936-
DAG.getExternalSymbol(
4937-
TLI.getLibcallName(LibraryCall),
4938-
TLI.getPointerTy(DAG.getDataLayout())),
4939-
std::move(Args));
4932+
CLI.setDebugLoc(sdl).setChain(getRoot()).setLibCallee(
4933+
TLI.getLibcallCallingConv(LibraryCall),
4934+
Type::getVoidTy(*DAG.getContext()),
4935+
DAG.getExternalSymbol(TLI.getLibcallName(LibraryCall),
4936+
TLI.getPointerTy(DAG.getDataLayout())),
4937+
std::move(Args));
49404938

49414939
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
49424940
DAG.setRoot(CallResult.second);
@@ -5548,7 +5546,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
55485546
TargetLowering::ArgListTy Args;
55495547

55505548
TargetLowering::CallLoweringInfo CLI(DAG);
5551-
CLI.setDebugLoc(sdl).setChain(getRoot()).setCallee(
5549+
CLI.setDebugLoc(sdl).setChain(getRoot()).setLibCallee(
55525550
CallingConv::C, I.getType(),
55535551
DAG.getExternalSymbol(TrapFuncName.data(),
55545552
TLI.getPointerTy(DAG.getDataLayout())),

lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@ TargetLowering::makeLibCall(SelectionDAG &DAG, RTLIB::Libcall LC, EVT RetVT,
138138
Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
139139
TargetLowering::CallLoweringInfo CLI(DAG);
140140
bool signExtend = shouldSignExtendTypeInLibCall(RetVT, isSigned);
141-
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
142-
.setCallee(getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
143-
.setNoReturn(doesNotReturn).setDiscardResult(!isReturnValueUsed)
144-
.setSExtResult(signExtend).setZExtResult(!signExtend);
141+
CLI.setDebugLoc(dl)
142+
.setChain(DAG.getEntryNode())
143+
.setLibCallee(getLibcallCallingConv(LC), RetTy, Callee, std::move(Args))
144+
.setNoReturn(doesNotReturn)
145+
.setDiscardResult(!isReturnValueUsed)
146+
.setSExtResult(signExtend)
147+
.setZExtResult(!signExtend);
145148
return LowerCallTo(CLI);
146149
}
147150

@@ -3808,7 +3811,7 @@ SDValue TargetLowering::LowerToTLSEmulatedModel(const GlobalAddressSDNode *GA,
38083811

38093812
TargetLowering::CallLoweringInfo CLI(DAG);
38103813
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode());
3811-
CLI.setCallee(CallingConv::C, VoidPtrType, EmuTlsGetAddr, std::move(Args));
3814+
CLI.setLibCallee(CallingConv::C, VoidPtrType, EmuTlsGetAddr, std::move(Args));
38123815
std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
38133816

38143817
// TLSADDR will be codegen'ed as call. Inform MFI that function has calls.

lib/IR/Module.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,14 @@ void Module::dropAllReferences() {
465465
GIF.dropAllReferences();
466466
}
467467

468+
unsigned Module::getNumberRegisterParameters() const {
469+
auto *Val =
470+
cast_or_null<ConstantAsMetadata>(getModuleFlag("NumRegisterParameters"));
471+
if (!Val)
472+
return 0;
473+
return cast<ConstantInt>(Val->getValue())->getZExtValue();
474+
}
475+
468476
unsigned Module::getDwarfVersion() const {
469477
auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("Dwarf Version"));
470478
if (!Val)

lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,8 +2124,9 @@ SDValue AArch64TargetLowering::LowerFSINCOS(SDValue Op,
21242124

21252125
StructType *RetTy = StructType::get(ArgTy, ArgTy, nullptr);
21262126
TargetLowering::CallLoweringInfo CLI(DAG);
2127-
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
2128-
.setCallee(CallingConv::Fast, RetTy, Callee, std::move(Args));
2127+
CLI.setDebugLoc(dl)
2128+
.setChain(DAG.getEntryNode())
2129+
.setLibCallee(CallingConv::Fast, RetTy, Callee, std::move(Args));
21292130

21302131
std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
21312132
return CallResult.first;

0 commit comments

Comments
 (0)