@@ -132,8 +132,6 @@ SDValue AArch64SelectionDAGInfo::EmitStreamingCompatibleMemLibCall(
132
132
Args.push_back (SizeEntry);
133
133
assert (Symbol->getOpcode () == ISD::ExternalSymbol &&
134
134
" Function name is not set" );
135
- if (!LowerToSMERoutines)
136
- return SDValue ();
137
135
138
136
TargetLowering::CallLoweringInfo CLI (DAG);
139
137
PointerType *RetTy = PointerType::getUnqual (*DAG.getContext ());
@@ -154,7 +152,7 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemcpy(
154
152
Alignment, isVolatile, DstPtrInfo, SrcPtrInfo);
155
153
156
154
SMEAttrs Attrs (DAG.getMachineFunction ().getFunction ());
157
- if (!Attrs.hasNonStreamingInterfaceAndBody ())
155
+ if (LowerToSMERoutines && !Attrs.hasNonStreamingInterfaceAndBody ())
158
156
return EmitStreamingCompatibleMemLibCall (DAG, DL, Chain, Dst, Src, Size,
159
157
RTLIB::MEMCPY);
160
158
return SDValue ();
@@ -172,7 +170,7 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset(
172
170
Alignment, isVolatile, DstPtrInfo, MachinePointerInfo{});
173
171
174
172
SMEAttrs Attrs (DAG.getMachineFunction ().getFunction ());
175
- if (!Attrs.hasNonStreamingInterfaceAndBody ())
173
+ if (LowerToSMERoutines && !Attrs.hasNonStreamingInterfaceAndBody ())
176
174
return EmitStreamingCompatibleMemLibCall (DAG, dl, Chain, Dst, Src, Size,
177
175
RTLIB::MEMSET);
178
176
return SDValue ();
@@ -190,7 +188,7 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemmove(
190
188
Alignment, isVolatile, DstPtrInfo, SrcPtrInfo);
191
189
192
190
SMEAttrs Attrs (DAG.getMachineFunction ().getFunction ());
193
- if (!Attrs.hasNonStreamingInterfaceAndBody ())
191
+ if (LowerToSMERoutines && !Attrs.hasNonStreamingInterfaceAndBody ())
194
192
return EmitStreamingCompatibleMemLibCall (DAG, dl, Chain, Dst, Src, Size,
195
193
RTLIB::MEMMOVE);
196
194
return SDValue ();
0 commit comments