remove now-dead code.
authorChris Lattner <sabre@nondot.org>
Tue, 30 Jan 2007 23:29:47 +0000 (23:29 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 30 Jan 2007 23:29:47 +0000 (23:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33678 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/Local.cpp

index 772e09bea35cd6e4788eb0e94081c76f66678039..3eca72a1d010e31d792c9d7e641790155848366a 100644 (file)
@@ -68,20 +68,6 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I, const TargetData *TD) {
     return Result;
   }
 
-  Constant *Op0 = 0, *Op1 = 0;
-  switch (I->getNumOperands()) {
-  default:
-  case 2:
-    Op1 = dyn_cast<Constant>(I->getOperand(1));
-    if (Op1 == 0) return 0;        // Not a constant?, can't fold
-    /* FALL THROUGH */
-  case 1:
-    Op0 = dyn_cast<Constant>(I->getOperand(0));
-    if (Op0 == 0) return 0;        // Not a constant?, can't fold
-    break;
-  case 0: return 0;
-  }
-
   // Scan the operand list, checking to see if they are all constants, if so,
   // hand off to ConstantFoldInstOperands.
   SmallVector<Constant*, 8> Ops;