Enable printf() to iprintf() optimization for the TCE target.
authorDuncan Sands <baldrick@free.fr>
Thu, 9 Jun 2011 11:11:45 +0000 (11:11 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 9 Jun 2011 11:11:45 +0000 (11:11 +0000)
Patch by Pekka Jaaskelainen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132774 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/TargetLibraryInfo.cpp

index 4b985b8c65491d60345b800bc702b34d5f095067..709dfd283f98ffd9dd5a4b6ffd5807fca4c3cc78 100644 (file)
@@ -38,8 +38,8 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T) {
     TLI.setUnavailable(LibFunc::memset_pattern16);
   }
 
-  // iprintf and friends are only available on XCore.
-  if (T.getArch() != Triple::xcore) {
+  // iprintf and friends are only available on XCore and TCE.
+  if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) {
     TLI.setUnavailable(LibFunc::iprintf);
     TLI.setUnavailable(LibFunc::siprintf);
     TLI.setUnavailable(LibFunc::fiprintf);