Narrow test further. Make bot and test happy.
authorJim Grosbach <grosbach@apple.com>
Fri, 3 Feb 2012 00:26:07 +0000 (00:26 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 3 Feb 2012 00:26:07 +0000 (00:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149650 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineCalls.cpp

index 84209aa457f5d3e64943f4e8763f1cb215580603..5bdba9c0173d0b3873146d3ba5f477d5f864de78 100644 (file)
@@ -1108,7 +1108,9 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
     // If both the callee and the cast type are varargs, we still have to make
     // sure the number of fixed parameters are the same or we have the same
     // ABI issues as if we introduce a varargs call.
-    if (FT->getNumParams() !=
+    if (FT->isVarArg() &&
+        cast<FunctionType>(APTy->getElementType())->isVarArg() &&
+        FT->getNumParams() !=
         cast<FunctionType>(APTy->getElementType())->getNumParams())
       return false;
   }