Skip to content

Commit e9fa3a6

Browse files
Dinar TemirbulatovDinar Temirbulatov
authored andcommitted
Moved LowerToSMERoutines closer to usage.
1 parent a19fa24 commit e9fa3a6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ SDValue AArch64SelectionDAGInfo::EmitStreamingCompatibleMemLibCall(
132132
Args.push_back(SizeEntry);
133133
assert(Symbol->getOpcode() == ISD::ExternalSymbol &&
134134
"Function name is not set");
135-
if (!LowerToSMERoutines)
136-
return SDValue();
137135

138136
TargetLowering::CallLoweringInfo CLI(DAG);
139137
PointerType *RetTy = PointerType::getUnqual(*DAG.getContext());
@@ -154,7 +152,7 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemcpy(
154152
Alignment, isVolatile, DstPtrInfo, SrcPtrInfo);
155153

156154
SMEAttrs Attrs(DAG.getMachineFunction().getFunction());
157-
if (!Attrs.hasNonStreamingInterfaceAndBody())
155+
if (LowerToSMERoutines && !Attrs.hasNonStreamingInterfaceAndBody())
158156
return EmitStreamingCompatibleMemLibCall(DAG, DL, Chain, Dst, Src, Size,
159157
RTLIB::MEMCPY);
160158
return SDValue();
@@ -172,7 +170,7 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset(
172170
Alignment, isVolatile, DstPtrInfo, MachinePointerInfo{});
173171

174172
SMEAttrs Attrs(DAG.getMachineFunction().getFunction());
175-
if (!Attrs.hasNonStreamingInterfaceAndBody())
173+
if (LowerToSMERoutines && !Attrs.hasNonStreamingInterfaceAndBody())
176174
return EmitStreamingCompatibleMemLibCall(DAG, dl, Chain, Dst, Src, Size,
177175
RTLIB::MEMSET);
178176
return SDValue();
@@ -190,7 +188,7 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemmove(
190188
Alignment, isVolatile, DstPtrInfo, SrcPtrInfo);
191189

192190
SMEAttrs Attrs(DAG.getMachineFunction().getFunction());
193-
if (!Attrs.hasNonStreamingInterfaceAndBody())
191+
if (LowerToSMERoutines && !Attrs.hasNonStreamingInterfaceAndBody())
194192
return EmitStreamingCompatibleMemLibCall(DAG, dl, Chain, Dst, Src, Size,
195193
RTLIB::MEMMOVE);
196194
return SDValue();

0 commit comments

Comments
 (0)