diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-04-15 12:46:56 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-04-15 12:46:56 +0000 |
commit | 9ee17208115482441953127615231c59a2f4d052 (patch) | |
tree | fea1c2465e14ae8c3d89e0cf07588155acf8a23d /lib/Analysis/ConstantFolding.cpp | |
parent | 45d95a1ad5eb72c65db8cc691a10339aa7c9c024 (diff) | |
download | external_llvm-9ee17208115482441953127615231c59a2f4d052.zip external_llvm-9ee17208115482441953127615231c59a2f4d052.tar.gz external_llvm-9ee17208115482441953127615231c59a2f4d052.tar.bz2 |
back out r101364, as it trips the linux nightlybot on some clang C++ tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 0723443..37cda02 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -772,9 +772,9 @@ Constant *llvm::ConstantFoldInstOperands(unsigned Opcode, const Type *DestTy, case Instruction::ICmp: case Instruction::FCmp: assert(0 && "Invalid for compares"); case Instruction::Call: - if (Function *F = dyn_cast<Function>(Ops[NumOps - 1])) + if (Function *F = dyn_cast<Function>(Ops[0])) if (canConstantFoldCallTo(F)) - return ConstantFoldCall(F, Ops, NumOps - 1); + return ConstantFoldCall(F, Ops+1, NumOps-1); return 0; case Instruction::PtrToInt: // If the input is a inttoptr, eliminate the pair. This requires knowing |