File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
llvm/lib/CodeGen/SelectionDAG Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -9065,8 +9065,15 @@ bool SelectionDAGBuilder::visitMemCmpBCmpCall(const CallInst &I) {
9065
9065
9066
9066
// memcmp(S1,S2,2) != 0 -> (*(short*)LHS != *(short*)RHS) != 0
9067
9067
// memcmp(S1,S2,4) != 0 -> (*(int*)LHS != *(int*)RHS) != 0
9068
- if (!CSize || !isOnlyUsedInZeroEqualityComparison (&I))
9068
+ if (!CSize || !isOnlyUsedInZeroEqualityComparison (&I)) {
9069
+ const Triple& TheTriple = TM.getTargetTriple ();
9070
+ if (TheTriple.isOSAIX ()) {
9071
+ if (Function *F = I.getCalledFunction ()) {
9072
+ F->setName (TheTriple.isArch32Bit () ? " ___memcmp" : " ___memcmp64" );
9073
+ }
9074
+ }
9069
9075
return false ;
9076
+ }
9070
9077
9071
9078
// If the target has a fast compare for the given size, it will return a
9072
9079
// preferred load type for that size. Require that the load VT is legal and
You can’t perform that action at this time.
0 commit comments