simplify some code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81961 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-09-16 00:08:07 +00:00
parent 74dc72e89b
commit 58665d47ae

View File

@ -379,7 +379,7 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I, LLVMContext &Context,
return ConstantFoldCompareInstOperands(CI->getPredicate(),
Ops.data(), Ops.size(),
Context, TD);
else
return ConstantFoldInstOperands(I->getOpcode(), I->getType(),
Ops.data(), Ops.size(), Context, TD);
}
@ -398,7 +398,6 @@ Constant *llvm::ConstantFoldConstantExpression(ConstantExpr *CE,
return ConstantFoldCompareInstOperands(CE->getPredicate(),
Ops.data(), Ops.size(),
Context, TD);
else
return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(),
Ops.data(), Ops.size(), Context, TD);
}