diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-16 00:08:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-16 00:08:07 +0000 |
commit | 58665d47aea69875c433fb039c8f10106abc1cee (patch) | |
tree | 21137a4b315c6529b02b2bf6273fe349310433c1 /lib/Analysis | |
parent | 74dc72e89bba8c67d2c9e455bad20f067b180499 (diff) | |
download | external_llvm-58665d47aea69875c433fb039c8f10106abc1cee.zip external_llvm-58665d47aea69875c433fb039c8f10106abc1cee.tar.gz external_llvm-58665d47aea69875c433fb039c8f10106abc1cee.tar.bz2 |
simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index c64b0ea..f911b66 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -379,9 +379,9 @@ 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); + + return ConstantFoldInstOperands(I->getOpcode(), I->getType(), + Ops.data(), Ops.size(), Context, TD); } /// ConstantFoldConstantExpression - Attempt to fold the constant expression @@ -398,9 +398,8 @@ 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); + return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(), + Ops.data(), Ops.size(), Context, TD); } /// ConstantFoldInstOperands - Attempt to constant fold an instruction with the |