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
This commit is contained in:
Chris Lattner
2009-11-09 23:06:58 +00:00
parent 38424c9b5d
commit 8f73deaa87
5 changed files with 28 additions and 36 deletions

View File

@@ -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]))