Add an MVT::x86mmx type. It will take the place of all current MMX vector types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113261 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2010-09-07 20:03:56 +00:00
parent 979ed44feb
commit d8dd5757e0
6 changed files with 21 additions and 10 deletions

View File

@ -50,17 +50,17 @@ namespace llvm {
v2i8 = 12, // 2 x i8
v4i8 = 13, // 4 x i8
v8i8 = 14, // 8 x i8
v8i8 = 14, // 8 x i8 - MMX type
v16i8 = 15, // 16 x i8
v32i8 = 16, // 32 x i8
v2i16 = 17, // 2 x i16
v4i16 = 18, // 4 x i16
v4i16 = 18, // 4 x i16 - MMX type
v8i16 = 19, // 8 x i16
v16i16 = 20, // 16 x i16
v2i32 = 21, // 2 x i32
v2i32 = 21, // 2 x i32 - MMX type
v4i32 = 22, // 4 x i32
v8i32 = 23, // 8 x i32
v1i64 = 24, // 1 x i64
v1i64 = 24, // 1 x i64 - MMX type
v2i64 = 25, // 2 x i64
v4i64 = 26, // 4 x i64
v8i64 = 27, // 8 x i64
@ -74,11 +74,13 @@ namespace llvm {
FIRST_VECTOR_VALUETYPE = v2i8,
LAST_VECTOR_VALUETYPE = v4f64,
Flag = 33, // This glues nodes together during pre-RA sched
x86mmx = 33, // This is an X86 MMX value
isVoid = 34, // This has no value
Flag = 34, // This glues nodes together during pre-RA sched
LAST_VALUETYPE = 35, // This always remains at the end of the list.
isVoid = 35, // This has no value
LAST_VALUETYPE = 36, // This always remains at the end of the list.
// This is the current maximum for LAST_VALUETYPE.
// EVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
@ -247,6 +249,7 @@ namespace llvm {
case i32 :
case v4i8:
case v2i16: return 32;
case x86mmx:
case f64 :
case i64 :
case v8i8:

View File

@ -49,14 +49,15 @@ def v2i64 : ValueType<128, 25>; // 2 x i64 vector value
def v4i64 : ValueType<256, 26>; // 4 x f64 vector value
def v8i64 : ValueType<512, 27>; // 4 x f64 vector value
def v2f32 : ValueType<64, 28>; // 2 x f32 vector value
def v2f32 : ValueType<64 , 28>; // 2 x f32 vector value
def v4f32 : ValueType<128, 29>; // 4 x f32 vector value
def v8f32 : ValueType<256, 30>; // 8 x f32 vector value
def v2f64 : ValueType<128, 31>; // 2 x f64 vector value
def v4f64 : ValueType<256, 32>; // 4 x f64 vector value
def FlagVT : ValueType<0 , 33>; // Pre-RA sched glue
def isVoid : ValueType<0 , 34>; // Produces no value
def x86mmx : ValueType<0 , 33>; // X86 MMX value
def FlagVT : ValueType<0 , 34>; // Pre-RA sched glue
def isVoid : ValueType<0 , 35>; // Produces no value
def MetadataVT: ValueType<0, 250>; // Metadata

View File

@ -109,6 +109,8 @@ def llvm_empty_ty : LLVMType<OtherVT>; // { }
def llvm_descriptor_ty : LLVMPointerType<llvm_empty_ty>; // { }*
def llvm_metadata_ty : LLVMType<MetadataVT>; // !{...}
def llvm_x86mmx_ty : LLVMType<x86mmx>;
def llvm_v2i8_ty : LLVMType<v2i8>; // 2 x i8
def llvm_v4i8_ty : LLVMType<v4i8>; // 4 x i8
def llvm_v8i8_ty : LLVMType<v8i8>; // 8 x i8

View File

@ -614,6 +614,9 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
// FIXME: In order to prevent SSE instructions being expanded to MMX ones
// with -msoft-float, disable use of MMX as well.
if (!UseSoftFloat && !DisableMMX && Subtarget->hasMMX()) {
addRegisterClass(MVT::x86mmx, X86::VR64RegisterClass, false);
// FIXME: Remove the rest of this stuff.
addRegisterClass(MVT::v8i8, X86::VR64RegisterClass, false);
addRegisterClass(MVT::v4i16, X86::VR64RegisterClass, false);
addRegisterClass(MVT::v2i32, X86::VR64RegisterClass, false);

View File

@ -110,6 +110,7 @@ std::string EVT::getEVTString() const {
case MVT::isVoid: return "isVoid";
case MVT::Other: return "ch";
case MVT::Flag: return "flag";
case MVT::x86mmx: return "x86mmx";
case MVT::v2i8: return "v2i8";
case MVT::v4i8: return "v4i8";
case MVT::v8i8: return "v8i8";

View File

@ -63,6 +63,7 @@ std::string llvm::getEnumName(MVT::SimpleValueType T) {
case MVT::f80: return "MVT::f80";
case MVT::f128: return "MVT::f128";
case MVT::ppcf128: return "MVT::ppcf128";
case MVT::x86mmx: return "MVT::x86mmx";
case MVT::Flag: return "MVT::Flag";
case MVT::isVoid: return "MVT::isVoid";
case MVT::v2i8: return "MVT::v2i8";