diff options
| author | Chris Lattner <sabre@nondot.org> | 2012-02-06 21:56:39 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2012-02-06 21:56:39 +0000 |
| commit | 8213c8af290f42bcdac070f0131d2fdabe76c93f (patch) | |
| tree | 8a1b8f513d5ddf66f08efbc5c1c8bc33f87e4d1a /llvm/lib/VMCore | |
| parent | b03c224e103b2986004d10cc76eaaae35eb702de (diff) | |
| download | bcm5719-llvm-8213c8af290f42bcdac070f0131d2fdabe76c93f.tar.gz bcm5719-llvm-8213c8af290f42bcdac070f0131d2fdabe76c93f.zip | |
Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector.
llvm-svn: 149912
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/ConstantFold.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index f73e7a76d1a..b743287adf3 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/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; |

