aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/ConstantFold.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r--lib/VMCore/ConstantFold.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index f73e7a76d1..b743287adf 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -693,7 +693,6 @@ Constant *llvm::ConstantFoldSelectInstruction(Constant *Cond,
if (Cond->isNullValue()) return V2;
if (Cond->isAllOnesValue()) return V1;
- // FIXME: Remove ConstantVector
// If the condition is a vector constant, fold the result elementwise.
if (ConstantVector *CondV = dyn_cast<ConstantVector>(Cond)) {
SmallVector<Constant*, 16> Result;
@@ -710,21 +709,6 @@ Constant *llvm::ConstantFoldSelectInstruction(Constant *Cond,
if (Result.size() == V1->getType()->getVectorNumElements())
return ConstantVector::get(Result);
}
- if (ConstantDataVector *CondV = dyn_cast<ConstantDataVector>(Cond)) {
- SmallVector<Constant*, 16> Result;
- for (unsigned i = 0, e = V1->getType()->getVectorNumElements(); i != e;++i){
- uint64_t Cond = CondV->getElementAsInteger(i);
-
- Constant *Res = (Cond ? V2 : V1)->getAggregateElement(i);
- if (Res == 0) break;
- Result.push_back(Res);
- }
-
- // If we were able to build the vector, return it.
- if (Result.size() == V1->getType()->getVectorNumElements())
- return ConstantVector::get(Result);
- }
-
if (isa<UndefValue>(Cond)) {
if (isa<UndefValue>(V1)) return V1;