There is no exp10 on NetBSD.
authorJoerg Sonnenberger <joerg@bec.de>
Sun, 15 Dec 2013 20:36:17 +0000 (20:36 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Sun, 15 Dec 2013 20:36:17 +0000 (20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197348 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/TargetLibraryInfo.cpp
test/Transforms/InstCombine/pow-1.ll

index 753562077f9e797b37cd2c6294140e6d03281bec..2a9fb356528cf202a6775e793b6969b03126c2b3 100644 (file)
@@ -426,6 +426,12 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
     }
   }
 
+  if (T.getOS() == Triple::NetBSD) {
+    TLI.setUnavailable(LibFunc::exp10l);
+    TLI.setUnavailable(LibFunc::exp10);
+    TLI.setUnavailable(LibFunc::exp10f);
+  }
+
   // iprintf and friends are only available on XCore and TCE.
   if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) {
     TLI.setUnavailable(LibFunc::iprintf);
index 08dfa7a1013ebbae722b849c42065bcf7972e0a1..cf6fe8e1f8eb7c0030ed6c4ac78c1c09023794c6 100644 (file)
@@ -5,6 +5,7 @@
 ; RUN: opt -instcombine -S < %s -mtriple=arm-apple-ios7.0 | FileCheck %s --check-prefix=CHECK-EXP10
 ; RUN: opt -instcombine -S < %s -mtriple=x86_64-apple-macosx10.8 | FileCheck %s --check-prefix=CHECK-NO-EXP10
 ; RUN: opt -instcombine -S < %s -mtriple=arm-apple-ios6.0 | FileCheck %s --check-prefix=CHECK-NO-EXP10
+; RUN: opt -instcombine -S < %s -mtriple=x86_64-netbsd | FileCheck %s --check-prefix=CHECK-NO-EXP10
 ; rdar://7251832
 
 ; NOTE: The readonly attribute on the pow call should be preserved