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 | 7534b468841036ecb5eefd627959ea2444f17dbc (patch) | |
| tree | 2d16f0e282f6c6cd81a33ef874b07c70f85f21a2 /llvm/lib/Transforms | |
| parent | ae9132207fc4783ce66caf56c932055424975f15 (diff) | |
| download | bcm5719-llvm-7534b468841036ecb5eefd627959ea2444f17dbc.tar.gz bcm5719-llvm-7534b468841036ecb5eefd627959ea2444f17dbc.zip | |
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...
llvm-svn: 145347
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index e8136ab77ff..81dad7e022e 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/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(), |

