diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-11-29 01:18:23 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-11-29 01:18:23 +0000 |
commit | ba78c883d4c89bd807fa7ebea7ac6f22f3503223 (patch) | |
tree | 5340b70565359a6183cb2124c81e16934148a9a2 | |
parent | 6200611dffd301c49cb19d52eaedff79623adb98 (diff) | |
download | external_llvm-ba78c883d4c89bd807fa7ebea7ac6f22f3503223.zip external_llvm-ba78c883d4c89bd807fa7ebea7ac6f22f3503223.tar.gz external_llvm-ba78c883d4c89bd807fa7ebea7ac6f22f3503223.tar.bz2 |
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
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index e8136ab..81dad7e 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(), |