[PATCH] D65834: TLI: Darwin sometimes does not support _bcmp, so do not emit it for Darwin

Alex Lorenz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 17:06:26 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL368113: TLI: darwin does not support _bcmp (authored by arphaman, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D65834?vs=213747&id=213753#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65834/new/

https://reviews.llvm.org/D65834

Files:
  llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
  llvm/trunk/test/Transforms/InferFunctionAttrs/annotate.ll


Index: llvm/trunk/test/Transforms/InferFunctionAttrs/annotate.ll
===================================================================
--- llvm/trunk/test/Transforms/InferFunctionAttrs/annotate.ll
+++ llvm/trunk/test/Transforms/InferFunctionAttrs/annotate.ll
@@ -241,8 +241,8 @@
 ; CHECK: declare i64 @atoll(i8* nocapture) [[G2]]
 declare i64 @atoll(i8*)
 
-; CHECK-DARWIN: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
 ; CHECK-LINUX: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
+; CHECK-DARWIN-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
 ; CHECK-UNKNOWN-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
 ; CHECK-NVPTX-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
 declare i32 @bcmp(i8*, i8*, i64)
Index: llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
===================================================================
--- llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
+++ llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
@@ -58,7 +58,7 @@
     return TT.isGNUEnvironment() || TT.isMusl();
   // Both NetBSD and OpenBSD are planning to remove the function. Windows does
   // not have it.
-  return TT.isOSFreeBSD() || TT.isOSSolaris() || TT.isOSDarwin();
+  return TT.isOSFreeBSD() || TT.isOSSolaris();
 }
 
 /// Initialize the set of available library functions based on the specified


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65834.213753.patch
Type: text/x-patch
Size: 1371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190807/bb9cfc1c/attachment.bin>


More information about the llvm-commits mailing list