[llvm-commits] [llvm] r148067 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td lib/VMCore/ValueTypes.cpp utils/TableGen/CodeGenTarget.cpp

Pete Cooper peter_cooper at apple.com
Thu Jan 12 15:14:13 PST 2012


Author: pete
Date: Thu Jan 12 17:14:13 2012
New Revision: 148067

URL: http://llvm.org/viewvc/llvm-project?rev=148067&view=rev
Log:
Added MVT::v2f16

Modified:
    llvm/trunk/include/llvm/CodeGen/ValueTypes.h
    llvm/trunk/include/llvm/CodeGen/ValueTypes.td
    llvm/trunk/lib/VMCore/ValueTypes.cpp
    llvm/trunk/utils/TableGen/CodeGenTarget.cpp

Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=148067&r1=148066&r2=148067&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Thu Jan 12 17:14:13 2012
@@ -69,26 +69,27 @@
       v4i64          =  27,   //  4 x i64
       v8i64          =  28,   //  8 x i64
 
-      v2f32          =  29,   //  2 x f32
-      v4f32          =  30,   //  4 x f32
-      v8f32          =  31,   //  8 x f32
-      v2f64          =  32,   //  2 x f64
-      v4f64          =  33,   //  4 x f64
+      v2f16          =  29,   //  2 x f32
+      v2f32          =  30,   //  2 x f32
+      v4f32          =  31,   //  4 x f32
+      v8f32          =  32,   //  8 x f32
+      v2f64          =  33,   //  2 x f64
+      v4f64          =  34,   //  4 x f64
 
       FIRST_VECTOR_VALUETYPE = v2i8,
       LAST_VECTOR_VALUETYPE  = v4f64,
 
-      x86mmx         =  34,   // This is an X86 MMX value
+      x86mmx         =  35,   // This is an X86 MMX value
 
-      Glue           =  35,   // This glues nodes together during pre-RA sched
+      Glue           =  36,   // This glues nodes together during pre-RA sched
 
-      isVoid         =  36,   // This has no value
+      isVoid         =  37,   // This has no value
 
-      Untyped        =  37,   // This value takes a register, but has
+      Untyped        =  38,   // This value takes a register, but has
                               // unspecified type.  The register class
                               // will be determined by the opcode.
 
-      LAST_VALUETYPE =  38,   // This always remains at the end of the list.
+      LAST_VALUETYPE =  39,   // This always remains at the end of the list.
 
       // This is the current maximum for LAST_VALUETYPE.
       // MVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
@@ -204,6 +205,7 @@
       case v2i64:
       case v4i64:
       case v8i64: return i64;
+      case v2f16: return f16;
       case v2f32:
       case v4f32:
       case v8f32: return f32;
@@ -234,6 +236,7 @@
       case v2i16:
       case v2i32:
       case v2i64:
+      case v2f16:
       case v2f32:
       case v2f64: return 2;
       case v1i64: return 1;
@@ -258,7 +261,8 @@
       case f32 :
       case i32 :
       case v4i8:
-      case v2i16: return 32;
+      case v2i16:
+      case v2f16: return 32;
       case x86mmx:
       case f64 :
       case i64 :
@@ -363,6 +367,9 @@
         if (NumElements == 4)  return MVT::v4i64;
         if (NumElements == 8)  return MVT::v8i64;
         break;
+      case MVT::f16:
+        if (NumElements == 2)  return MVT::v2f16;
+        break;
       case MVT::f32:
         if (NumElements == 2)  return MVT::v2f32;
         if (NumElements == 4)  return MVT::v4f32;

Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.td?rev=148067&r1=148066&r2=148067&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Thu Jan 12 17:14:13 2012
@@ -50,16 +50,17 @@
 def v4i64  : ValueType<256, 27>;   //  4 x i64 vector value
 def v8i64  : ValueType<512, 28>;   //  8 x i64 vector value
 
-def v2f32  : ValueType<64 , 29>;   //  2 x f32 vector value
-def v4f32  : ValueType<128, 30>;   //  4 x f32 vector value
-def v8f32  : ValueType<256, 31>;   //  8 x f32 vector value
-def v2f64  : ValueType<128, 32>;   //  2 x f64 vector value
-def v4f64  : ValueType<256, 33>;   //  4 x f64 vector value
-
-def x86mmx : ValueType<64 , 34>;   // X86 MMX value
-def FlagVT : ValueType<0  , 35>;   // Pre-RA sched glue
-def isVoid : ValueType<0  , 36>;   // Produces no value
-def untyped: ValueType<8  , 37>;   // Produces an untyped value
+def v2f16  : ValueType<32 , 29>;   //  2 x f16 vector value
+def v2f32  : ValueType<64 , 30>;   //  2 x f32 vector value
+def v4f32  : ValueType<128, 31>;   //  4 x f32 vector value
+def v8f32  : ValueType<256, 32>;   //  8 x f32 vector value
+def v2f64  : ValueType<128, 33>;   //  2 x f64 vector value
+def v4f64  : ValueType<256, 34>;   //  4 x f64 vector value
+
+def x86mmx : ValueType<64 , 35>;   // X86 MMX value
+def FlagVT : ValueType<0  , 36>;   // Pre-RA sched glue
+def isVoid : ValueType<0  , 37>;   // Produces no value
+def untyped: ValueType<8  , 38>;   // Produces an untyped value
 
 def MetadataVT: ValueType<0, 250>; // Metadata
 

Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ValueTypes.cpp?rev=148067&r1=148066&r2=148067&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ValueTypes.cpp (original)
+++ llvm/trunk/lib/VMCore/ValueTypes.cpp Thu Jan 12 17:14:13 2012
@@ -135,6 +135,7 @@
   case MVT::v4i64:   return "v4i64";
   case MVT::v8i64:   return "v8i64";
   case MVT::v2f32:   return "v2f32";
+  case MVT::v2f16:   return "v2f16";
   case MVT::v4f32:   return "v4f32";
   case MVT::v8f32:   return "v8f32";
   case MVT::v2f64:   return "v2f64";
@@ -182,6 +183,7 @@
   case MVT::v2i64:   return VectorType::get(Type::getInt64Ty(Context), 2);
   case MVT::v4i64:   return VectorType::get(Type::getInt64Ty(Context), 4);
   case MVT::v8i64:   return VectorType::get(Type::getInt64Ty(Context), 8);
+  case MVT::v2f16:   return VectorType::get(Type::getHalfTy(Context), 2);
   case MVT::v2f32:   return VectorType::get(Type::getFloatTy(Context), 2);
   case MVT::v4f32:   return VectorType::get(Type::getFloatTy(Context), 4);
   case MVT::v8f32:   return VectorType::get(Type::getFloatTy(Context), 8);

Modified: llvm/trunk/utils/TableGen/CodeGenTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenTarget.cpp?rev=148067&r1=148066&r2=148067&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenTarget.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenTarget.cpp Thu Jan 12 17:14:13 2012
@@ -83,6 +83,7 @@
   case MVT::v2i64:    return "MVT::v2i64";
   case MVT::v4i64:    return "MVT::v4i64";
   case MVT::v8i64:    return "MVT::v8i64";
+  case MVT::v2f16:    return "MVT::v2f16";
   case MVT::v2f32:    return "MVT::v2f32";
   case MVT::v4f32:    return "MVT::v4f32";
   case MVT::v8f32:    return "MVT::v8f32";





More information about the llvm-commits mailing list