summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineCalls.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-02-03 00:26:07 +0000
committerJim Grosbach <grosbach@apple.com>2012-02-03 00:26:07 +0000
commit871a2051f7d49827259d719a97b8cc86163edbd9 (patch)
tree3744a3d04216244623a90d0aaa35769618743647 /lib/Transforms/InstCombine/InstCombineCalls.cpp
parent00e403abe384b8f61dd012242d3d81a23541ca25 (diff)
downloadllvm-871a2051f7d49827259d719a97b8cc86163edbd9.tar.gz
llvm-871a2051f7d49827259d719a97b8cc86163edbd9.tar.bz2
llvm-871a2051f7d49827259d719a97b8cc86163edbd9.tar.xz
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
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 84209aa457..5bdba9c017 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<FunctionType>(APTy->getElementType())->isVarArg() &&
+ FT->getNumParams() !=
cast<FunctionType>(APTy->getElementType())->getNumParams())
return false;
}