summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-09 23:06:58 +0000
committerChris Lattner <sabre@nondot.org>2009-11-09 23:06:58 +0000
commit8f73deaa8732a556046bf4ac6207be55972e3b74 (patch)
tree7f356907bd336592d93b84daccec136f758799e2 /lib/Transforms/Utils/CloneFunction.cpp
parent38424c9b5d464d262aa05adfc899285f86b43275 (diff)
downloadllvm-8f73deaa8732a556046bf4ac6207be55972e3b74.tar.gz
llvm-8f73deaa8732a556046bf4ac6207be55972e3b74.tar.bz2
llvm-8f73deaa8732a556046bf4ac6207be55972e3b74.tar.xz
fix ConstantFoldCompareInstOperands to take the LHS/RHS as
individual operands instead of taking a temporary array git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--lib/Transforms/Utils/CloneFunction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp
index 61d8b9606a..24542a5e4a 100644
--- a/lib/Transforms/Utils/CloneFunction.cpp
+++ b/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]))