summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineCalls.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-11-29 01:18:23 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-11-29 01:18:23 +0000
commitba78c883d4c89bd807fa7ebea7ac6f22f3503223 (patch)
tree5340b70565359a6183cb2124c81e16934148a9a2 /lib/Transforms/InstCombine/InstCombineCalls.cpp
parent6200611dffd301c49cb19d52eaedff79623adb98 (diff)
downloadllvm-ba78c883d4c89bd807fa7ebea7ac6f22f3503223.tar.gz
llvm-ba78c883d4c89bd807fa7ebea7ac6f22f3503223.tar.bz2
llvm-ba78c883d4c89bd807fa7ebea7ac6f22f3503223.tar.xz
Zap some completely ridiculous code. There's probably a miscompile here, but I don't really want to try to write a testcase involving an invoke returning a pointer to a varargs function...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index e8136ab77f..81dad7e022 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -960,7 +960,7 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) {
PointerType *PTy = cast<PointerType>(Callee->getType());
FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
if (FTy->isVarArg()) {
- int ix = FTy->getNumParams() + (isa<InvokeInst>(Callee) ? 2 : 0);
+ int ix = FTy->getNumParams();
// See if we can optimize any arguments passed through the varargs area of
// the call.
for (CallSite::arg_iterator I = CS.arg_begin()+FTy->getNumParams(),