From 7302d80490feabfc8a01bee0fa698aab55169544 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 6 Feb 2012 21:56:39 +0000 Subject: Remove some dead code and tidy things up now that vectors use ConstantDataVector instead of always using ConstantVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149912 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/ConstantFold.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lib/VMCore') diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index f73e7a7..b743287 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(Cond)) { SmallVector 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(Cond)) { - SmallVector 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(Cond)) { if (isa(V1)) return V1; -- cgit v1.1