File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,19 @@ bool ARMSelectionDAGInfo::isTargetMemoryOpcode(unsigned Opcode) const {
3535 Opcode <= ARMISD::LAST_MEMORY_OPCODE;
3636}
3737
38+ static bool isAEABIFunctionImpl (const TargetLowering &TLI, RTLIB::Libcall LC) {
39+ switch (LC) {
40+ case RTLIB::MEMCPY:
41+ return TLI.getLibcallImpl (LC) == RTLIB::impl___aeabi_memcpy;
42+ case RTLIB::MEMMOVE:
43+ return TLI.getLibcallImpl (LC) == RTLIB::impl___aeabi_memmove;
44+ case RTLIB::MEMSET:
45+ return TLI.getLibcallImpl (LC) == RTLIB::impl___aeabi_memset;
46+ default :
47+ return false ;
48+ }
49+ }
50+
3851// Emit, if possible, a specialized version of the given Libcall. Typically this
3952// means selecting the appropriately aligned version, but we also convert memset
4053// of 0 into memclr.
@@ -47,7 +60,7 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall(
4760
4861 // Only use a specialized AEABI function if the default version of this
4962 // Libcall is an AEABI function.
50- if (std::strncmp ( TLI-> getLibcallName (LC), " __aeabi " , 7 ) != 0 )
63+ if (! isAEABIFunctionImpl (* TLI, LC) )
5164 return SDValue ();
5265
5366 // Translate RTLIB::Libcall to AEABILibcall. We only do this in order to be
You can’t perform that action at this time.
0 commit comments