Duncan pointed out that the Extended case in getTypeForMVT could
authorDan Gohman <gohman@apple.com>
Tue, 4 Nov 2008 16:19:44 +0000 (16:19 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 4 Nov 2008 16:19:44 +0000 (16:19 +0000)
be considerably simplified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58703 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/ValueTypes.cpp

index 22449f9040adf08c5be2553f850a51373f790893..0229f155bc97b78ae986d5c3441780d161acb0ee 100644 (file)
@@ -121,13 +121,8 @@ std::string MVT::getMVTString() const {
 const Type *MVT::getTypeForMVT() const {
   switch (V) {
   default:
-    if (isVector())
-      return VectorType::get(getVectorElementType().getTypeForMVT(),
-                             getVectorNumElements());
-    if (isInteger())
-      return IntegerType::get(getSizeInBits());
-    assert(0 && "MVT does not correspond to LLVM type!");
-    return Type::VoidTy;
+    assert(isExtended() && "Type is not extended!");
+    return LLVMTy;
   case MVT::isVoid:  return Type::VoidTy;
   case MVT::i1:      return Type::Int1Ty;
   case MVT::i8:      return Type::Int8Ty;