Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector.
llvm-svn: 149912
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 0294d2a..318256a 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -495,10 +495,8 @@
if (ConstantInt *C = dyn_cast<ConstantInt>(V))
return ConstantExpr::getNeg(C);
- if (Constant *C = dyn_cast<Constant>(V))
- // FIXME: Remove ConstantVector
- if ((isa<ConstantVector>(C) || isa<ConstantDataVector>(C)) &&
- C->getType()->getVectorElementType()->isIntegerTy())
+ if (ConstantDataVector *C = dyn_cast<ConstantDataVector>(V))
+ if (C->getType()->getElementType()->isIntegerTy())
return ConstantExpr::getNeg(C);
return 0;
@@ -516,10 +514,8 @@
if (ConstantFP *C = dyn_cast<ConstantFP>(V))
return ConstantExpr::getFNeg(C);
- if (Constant *C = dyn_cast<Constant>(V))
- // FIXME: Remove ConstantVector
- if ((isa<ConstantVector>(C) || isa<ConstantDataVector>(C)) &&
- C->getType()->getVectorElementType()->isFloatingPointTy())
+ if (ConstantDataVector *C = dyn_cast<ConstantDataVector>(V))
+ if (C->getType()->getElementType()->isFloatingPointTy())
return ConstantExpr::getFNeg(C);
return 0;