diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-09 23:06:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-09 23:06:58 +0000 |
commit | cdfb80de1619a424efbd61b7ded35ee2b870d189 (patch) | |
tree | c7d7f7521bf5c580e400a94a13abfbf8a28453c6 /llvm/lib/Transforms/Utils/CloneFunction.cpp | |
parent | 3f94a132ddb536857b7bda67c26d0326a26738c3 (diff) | |
download | bcm5719-llvm-cdfb80de1619a424efbd61b7ded35ee2b870d189.tar.gz bcm5719-llvm-cdfb80de1619a424efbd61b7ded35ee2b870d189.zip |
fix ConstantFoldCompareInstOperands to take the LHS/RHS as
individual operands instead of taking a temporary array
llvm-svn: 86619
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 61d8b9606a5..24542a5e4a3 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -331,8 +331,8 @@ ConstantFoldMappedInstruction(const Instruction *I) { return 0; // All operands not constant! if (const CmpInst *CI = dyn_cast<CmpInst>(I)) - return ConstantFoldCompareInstOperands(CI->getPredicate(), - &Ops[0], Ops.size(), TD); + return ConstantFoldCompareInstOperands(CI->getPredicate(), Ops[0], Ops[1], + TD); if (const LoadInst *LI = dyn_cast<LoadInst>(I)) if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) |