File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,7 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall(
4747
4848 // Only use a specialized AEABI function if the default version of this
4949 // Libcall is an AEABI function.
50- if (std::strncmp (TLI->getLibcallName (LC), " __aeabi" , 7 ) != 0 )
51- return SDValue ();
52-
50+ //
5351 // Translate RTLIB::Libcall to AEABILibcall. We only do this in order to be
5452 // able to translate memset to memclr and use the value to index the function
5553 // name array.
@@ -61,12 +59,21 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall(
6159 } AEABILibcall;
6260 switch (LC) {
6361 case RTLIB::MEMCPY:
62+ if (TLI->getLibcallImpl (LC) != RTLIB::impl___aeabi_memcpy)
63+ return SDValue ();
64+
6465 AEABILibcall = AEABI_MEMCPY;
6566 break ;
6667 case RTLIB::MEMMOVE:
68+ if (TLI->getLibcallImpl (LC) != RTLIB::impl___aeabi_memmove)
69+ return SDValue ();
70+
6771 AEABILibcall = AEABI_MEMMOVE;
6872 break ;
6973 case RTLIB::MEMSET:
74+ if (TLI->getLibcallImpl (LC) != RTLIB::impl___aeabi_memset)
75+ return SDValue ();
76+
7077 AEABILibcall = AEABI_MEMSET;
7178 if (isNullConstant (Src))
7279 AEABILibcall = AEABI_MEMCLR;
You can’t perform that action at this time.
0 commit comments