From 871a2051f7d49827259d719a97b8cc86163edbd9 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Fri, 3 Feb 2012 00:26:07 +0000 Subject: [PATCH] Narrow test further. Make bot and test happy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149650 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineCalls.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index 84209aa457f..5bdba9c0173 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -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(APTy->getElementType())->isVarArg() && + FT->getNumParams() != cast(APTy->getElementType())->getNumParams()) return false; }