simplify some code
authorChris Lattner <sabre@nondot.org>
Wed, 16 Sep 2009 00:08:07 +0000 (00:08 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 16 Sep 2009 00:08:07 +0000 (00:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81961 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ConstantFolding.cpp

index c64b0ea5d1017fb99becda9e643b842831b034e2..f911b6687429f1298ccb65742f687b6dd2d38cfb 100644 (file)
@@ -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