diff --git a/llvm/include/llvm/CodeGen/ValueTypes.td b/llvm/include/llvm/CodeGen/ValueTypes.td --- a/llvm/include/llvm/CodeGen/ValueTypes.td +++ b/llvm/include/llvm/CodeGen/ValueTypes.td @@ -122,62 +122,87 @@ def v8f64 : ValueType<512, 94>; // 8 x f64 vector value def v16f64 : ValueType<1024, 95>; // 16 x f64 vector value -def nxv1i1 : ValueType<1, 96>; // n x 1 x i1 vector value -def nxv2i1 : ValueType<2, 97>; // n x 2 x i1 vector value -def nxv4i1 : ValueType<4, 98>; // n x 4 x i1 vector value -def nxv8i1 : ValueType<8, 99>; // n x 8 x i1 vector value -def nxv16i1 : ValueType<16, 100>; // n x 16 x i1 vector value -def nxv32i1 : ValueType<32, 101>; // n x 32 x i1 vector value - -def nxv1i8 : ValueType<8, 102>; // n x 1 x i8 vector value -def nxv2i8 : ValueType<16, 103>; // n x 2 x i8 vector value -def nxv4i8 : ValueType<32, 104>; // n x 4 x i8 vector value -def nxv8i8 : ValueType<64, 105>; // n x 8 x i8 vector value -def nxv16i8 : ValueType<128, 106>; // n x 16 x i8 vector value -def nxv32i8 : ValueType<256, 107>; // n x 32 x i8 vector value - -def nxv1i16 : ValueType<16, 108>; // n x 1 x i16 vector value -def nxv2i16 : ValueType<32, 109>; // n x 2 x i16 vector value -def nxv4i16 : ValueType<64, 110>; // n x 4 x i16 vector value -def nxv8i16 : ValueType<128, 111>; // n x 8 x i16 vector value -def nxv16i16: ValueType<256, 112>; // n x 16 x i16 vector value -def nxv32i16: ValueType<512, 113>; // n x 32 x i16 vector value - -def nxv1i32 : ValueType<32, 114>; // n x 1 x i32 vector value -def nxv2i32 : ValueType<64, 115>; // n x 2 x i32 vector value -def nxv4i32 : ValueType<128, 116>; // n x 4 x i32 vector value -def nxv8i32 : ValueType<256, 117>; // n x 8 x i32 vector value -def nxv16i32: ValueType<512, 118>; // n x 16 x i32 vector value -def nxv32i32: ValueType<1024,119>; // n x 32 x i32 vector value - -def nxv1i64 : ValueType<64, 120>; // n x 1 x i64 vector value -def nxv2i64 : ValueType<128, 121>; // n x 2 x i64 vector value -def nxv4i64 : ValueType<256, 122>; // n x 4 x i64 vector value -def nxv8i64 : ValueType<512, 123>; // n x 8 x i64 vector value -def nxv16i64: ValueType<1024,124>; // n x 16 x i64 vector value -def nxv32i64: ValueType<2048,125>; // n x 32 x i64 vector value - -def nxv2f16 : ValueType<32 , 126>; // n x 2 x f16 vector value -def nxv4f16 : ValueType<64 , 127>; // n x 4 x f16 vector value -def nxv8f16 : ValueType<128, 128>; // n x 8 x f16 vector value -def nxv2bf16 : ValueType<32 , 129>; // n x 2 x bf16 vector value -def nxv4bf16 : ValueType<64 , 130>; // n x 4 x bf16 vector value -def nxv8bf16 : ValueType<128, 131>; // n x 8 x bf16 vector value -def nxv1f32 : ValueType<32 , 132>; // n x 1 x f32 vector value -def nxv2f32 : ValueType<64 , 133>; // n x 2 x f32 vector value -def nxv4f32 : ValueType<128, 134>; // n x 4 x f32 vector value -def nxv8f32 : ValueType<256, 135>; // n x 8 x f32 vector value -def nxv16f32 : ValueType<512, 136>; // n x 16 x f32 vector value -def nxv1f64 : ValueType<64, 137>; // n x 1 x f64 vector value -def nxv2f64 : ValueType<128, 138>; // n x 2 x f64 vector value -def nxv4f64 : ValueType<256, 139>; // n x 4 x f64 vector value -def nxv8f64 : ValueType<512, 140>; // n x 8 x f64 vector value - -def x86mmx : ValueType<64 , 141>; // X86 MMX value -def FlagVT : ValueType<0 , 142>; // Pre-RA sched glue -def isVoid : ValueType<0 , 143>; // Produces no value -def untyped: ValueType<8 , 144>; // Produces an untyped value -def exnref : ValueType<0 , 145>; // WebAssembly's exnref type +def nxv1i1 : ValueType<1, 96>; // n x 1 x i1 vector value +def nxv2i1 : ValueType<2, 97>; // n x 2 x i1 vector value +def nxv4i1 : ValueType<4, 98>; // n x 4 x i1 vector value +def nxv8i1 : ValueType<8, 99>; // n x 8 x i1 vector value +def nxv16i1 : ValueType<16, 100>; // n x 16 x i1 vector value +def nxv32i1 : ValueType<32, 101>; // n x 32 x i1 vector value +def nxv64i1 : ValueType<64, 102>; // n x 64 x i1 vector value +def nxv128i1 : ValueType<128, 103>; // n x 128 x i1 vector value +def nxv256i1 : ValueType<256, 104>; // n x 256 x i1 vector value +def nxv512i1 : ValueType<512, 105>; // n x 512 x i1 vector value + +def nxv1i8 : ValueType<8, 106>; // n x 1 x i8 vector value +def nxv2i8 : ValueType<16, 107>; // n x 2 x i8 vector value +def nxv4i8 : ValueType<32, 108>; // n x 4 x i8 vector value +def nxv8i8 : ValueType<64, 109>; // n x 8 x i8 vector value +def nxv16i8 : ValueType<128, 110>; // n x 16 x i8 vector value +def nxv32i8 : ValueType<256, 111>; // n x 32 x i8 vector value +def nxv64i8 : ValueType<512, 112>; // n x 64 x i8 vector value +def nxv128i8 : ValueType<1024, 113>; // n x 128 x i8 vector value +def nxv256i8 : ValueType<2048, 114>; // n x 256 x i8 vector value +def nxv512i8 : ValueType<4096, 115>; // n x 512 x i8 vector value + +def nxv1i16 : ValueType<16, 116>; // n x 1 x i16 vector value +def nxv2i16 : ValueType<32, 117>; // n x 2 x i16 vector value +def nxv4i16 : ValueType<64, 118>; // n x 4 x i16 vector value +def nxv8i16 : ValueType<128, 119>; // n x 8 x i16 vector value +def nxv16i16 : ValueType<256, 120>; // n x 16 x i16 vector value +def nxv32i16 : ValueType<512, 121>; // n x 32 x i16 vector value +def nxv64i16 : ValueType<1024, 122>; // n x 64 x i16 vector value +def nxv128i16 : ValueType<2048, 123>; // n x 128 x i16 vector value +def nxv256i16 : ValueType<4096, 124>; // n x 256 x i16 vector value + +def nxv1i32 : ValueType<32, 125>; // n x 1 x i32 vector value +def nxv2i32 : ValueType<64, 126>; // n x 2 x i32 vector value +def nxv4i32 : ValueType<128, 127>; // n x 4 x i32 vector value +def nxv8i32 : ValueType<256, 128>; // n x 8 x i32 vector value +def nxv16i32 : ValueType<512, 129>; // n x 16 x i32 vector value +def nxv32i32 : ValueType<1024, 130>; // n x 32 x i32 vector value +def nxv64i32 : ValueType<2048, 131>; // n x 64 x i32 vector value +def nxv128i32 : ValueType<4096, 132>; // n x 128 x i32 vector value + +def nxv1i64 : ValueType<64, 133>; // n x 1 x i64 vector value +def nxv2i64 : ValueType<128, 134>; // n x 2 x i64 vector value +def nxv4i64 : ValueType<256, 135>; // n x 4 x i64 vector value +def nxv8i64 : ValueType<512, 136>; // n x 8 x i64 vector value +def nxv16i64 : ValueType<1024, 137>; // n x 16 x i64 vector value +def nxv32i64 : ValueType<2048, 138>; // n x 32 x i64 vector value +def nxv64i64 : ValueType<4096, 139>; // n x 64 x i64 vector value + +def nxv2f16 : ValueType<32, 140>; // n x 2 x f16 vector value +def nxv4f16 : ValueType<64, 141>; // n x 4 x f16 vector value +def nxv8f16 : ValueType<128, 142>; // n x 8 x f16 vector value +def nxv16f16 : ValueType<256, 143>; // n x 16 x f16 vector value +def nxv32f16 : ValueType<512, 144>; // n x 32 x f16 vector value +def nxv64f16 : ValueType<1024, 145>; // n x 64 x f16 vector value +def nxv128f16 : ValueType<2048, 146>; // n x 128 x f16 vector value +def nxv256f16 : ValueType<4096, 147>; // n x 256 x f16 vector value +def nxv2bf16 : ValueType<32, 148>; // n x 2 x bf16 vector value +def nxv4bf16 : ValueType<64, 149>; // n x 4 x bf16 vector value +def nxv8bf16 : ValueType<128, 150>; // n x 8 x bf16 vector value +def nxv1f32 : ValueType<32, 151>; // n x 1 x f32 vector value +def nxv2f32 : ValueType<64, 152>; // n x 2 x f32 vector value +def nxv4f32 : ValueType<128, 153>; // n x 4 x f32 vector value +def nxv8f32 : ValueType<256, 154>; // n x 8 x f32 vector value +def nxv16f32 : ValueType<512, 155>; // n x 16 x f32 vector value +def nxv32f32 : ValueType<1024, 156>; // n x 32 x f32 vector value +def nxv64f32 : ValueType<2048, 157>; // n x 64 x f32 vector value +def nxv128f32 : ValueType<4096, 158>; // n x 128 x f32 vector value +def nxv1f64 : ValueType<64, 159>; // n x 1 x f64 vector value +def nxv2f64 : ValueType<128, 160>; // n x 2 x f64 vector value +def nxv4f64 : ValueType<256, 161>; // n x 4 x f64 vector value +def nxv8f64 : ValueType<512, 162>; // n x 8 x f64 vector value +def nxv16f64 : ValueType<1024, 163>; // n x 16 x f64 vector value +def nxv32f64 : ValueType<2048, 164>; // n x 32 x f64 vector value +def nxv64f64 : ValueType<4096, 165>; // n x 64 x f64 vector value + +def x86mmx : ValueType<64 , 166>; // X86 MMX value +def FlagVT : ValueType<0 , 167>; // Pre-RA sched glue +def isVoid : ValueType<0 , 168>; // Produces no value +def untyped: ValueType<8 , 169>; // Produces an untyped value +def exnref : ValueType<0 , 170>; // WebAssembly's exnref type def token : ValueType<0 , 248>; // TokenTy def MetadataVT: ValueType<0, 249>; // Metadata diff --git a/llvm/include/llvm/Support/MachineValueType.h b/llvm/include/llvm/Support/MachineValueType.h --- a/llvm/include/llvm/Support/MachineValueType.h +++ b/llvm/include/llvm/Support/MachineValueType.h @@ -155,88 +155,114 @@ FIRST_FIXEDLEN_VECTOR_VALUETYPE = v1i1, LAST_FIXEDLEN_VECTOR_VALUETYPE = v16f64, - nxv1i1 = 96, // n x 1 x i1 - nxv2i1 = 97, // n x 2 x i1 - nxv4i1 = 98, // n x 4 x i1 - nxv8i1 = 99, // n x 8 x i1 - nxv16i1 = 100, // n x 16 x i1 - nxv32i1 = 101, // n x 32 x i1 - - nxv1i8 = 102, // n x 1 x i8 - nxv2i8 = 103, // n x 2 x i8 - nxv4i8 = 104, // n x 4 x i8 - nxv8i8 = 105, // n x 8 x i8 - nxv16i8 = 106, // n x 16 x i8 - nxv32i8 = 107, // n x 32 x i8 - - nxv1i16 = 108, // n x 1 x i16 - nxv2i16 = 109, // n x 2 x i16 - nxv4i16 = 110, // n x 4 x i16 - nxv8i16 = 111, // n x 8 x i16 - nxv16i16 = 112, // n x 16 x i16 - nxv32i16 = 113, // n x 32 x i16 - - nxv1i32 = 114, // n x 1 x i32 - nxv2i32 = 115, // n x 2 x i32 - nxv4i32 = 116, // n x 4 x i32 - nxv8i32 = 117, // n x 8 x i32 - nxv16i32 = 118, // n x 16 x i32 - nxv32i32 = 119, // n x 32 x i32 - - nxv1i64 = 120, // n x 1 x i64 - nxv2i64 = 121, // n x 2 x i64 - nxv4i64 = 122, // n x 4 x i64 - nxv8i64 = 123, // n x 8 x i64 - nxv16i64 = 124, // n x 16 x i64 - nxv32i64 = 125, // n x 32 x i64 + + nxv1i1 = 96, // n x 1 x i1 + nxv2i1 = 97, // n x 2 x i1 + nxv4i1 = 98, // n x 4 x i1 + nxv8i1 = 99, // n x 8 x i1 + nxv16i1 = 100, // n x 16 x i1 + nxv32i1 = 101, // n x 32 x i1 + nxv64i1 = 102, // n x 64 x i1 + nxv128i1 = 103, // n x 128 x i1 + nxv256i1 = 104, // n x 256 x i1 + nxv512i1 = 105, // n x 512 x i1 + + nxv1i8 = 106, // n x 1 x i8 + nxv2i8 = 107, // n x 2 x i8 + nxv4i8 = 108, // n x 4 x i8 + nxv8i8 = 109, // n x 8 x i8 + nxv16i8 = 110, // n x 16 x i8 + nxv32i8 = 111, // n x 32 x i8 + nxv64i8 = 112, // n x 64 x i8 + nxv128i8 = 113, // n x 128 x i8 + nxv256i8 = 114, // n x 256 x i8 + nxv512i8 = 115, // n x 512 x i8 + + nxv1i16 = 116, // n x 1 x i16 + nxv2i16 = 117, // n x 2 x i16 + nxv4i16 = 118, // n x 4 x i16 + nxv8i16 = 119, // n x 8 x i16 + nxv16i16 = 120, // n x 16 x i16 + nxv32i16 = 121, // n x 32 x i16 + nxv64i16 = 122, // n x 64 x i16 + nxv128i16 = 123, // n x 128 x i16 + nxv256i16 = 124, // n x 256 x i16 + + nxv1i32 = 125, // n x 1 x i32 + nxv2i32 = 126, // n x 2 x i32 + nxv4i32 = 127, // n x 4 x i32 + nxv8i32 = 128, // n x 8 x i32 + nxv16i32 = 129, // n x 16 x i32 + nxv32i32 = 130, // n x 32 x i32 + nxv64i32 = 131, // n x 64 x i32 + nxv128i32 = 132, // n x 128 x i32 + + nxv1i64 = 133, // n x 1 x i64 + nxv2i64 = 134, // n x 2 x i64 + nxv4i64 = 135, // n x 4 x i64 + nxv8i64 = 136, // n x 8 x i64 + nxv16i64 = 137, // n x 16 x i64 + nxv32i64 = 138, // n x 32 x i64 + nxv64i64 = 139, // n x 64 x i64 FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE = nxv1i1, - LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE = nxv32i64, - - nxv2f16 = 126, // n x 2 x f16 - nxv4f16 = 127, // n x 4 x f16 - nxv8f16 = 128, // n x 8 x f16 - nxv2bf16 = 129, // n x 2 x bf16 - nxv4bf16 = 130, // n x 4 x bf16 - nxv8bf16 = 131, // n x 8 x bf16 - nxv1f32 = 132, // n x 1 x f32 - nxv2f32 = 133, // n x 2 x f32 - nxv4f32 = 134, // n x 4 x f32 - nxv8f32 = 135, // n x 8 x f32 - nxv16f32 = 136, // n x 16 x f32 - nxv1f64 = 137, // n x 1 x f64 - nxv2f64 = 138, // n x 2 x f64 - nxv4f64 = 139, // n x 4 x f64 - nxv8f64 = 140, // n x 8 x f64 + LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE = nxv64i64, + + nxv2f16 = 140, // n x 2 x f16 + nxv4f16 = 141, // n x 4 x f16 + nxv8f16 = 142, // n x 8 x f16 + nxv16f16 = 143, // n x 16 x f16 + nxv32f16 = 144, // n x 32 x f16 + nxv64f16 = 145, // n x 64 x f16 + nxv128f16 = 146, // n x 128 x f16 + nxv256f16 = 147, // n x 256 x f16 + nxv2bf16 = 148, // n x 2 x bf16 + nxv4bf16 = 149, // n x 4 x bf16 + nxv8bf16 = 150, // n x 8 x bf16 + nxv1f32 = 151, // n x 1 x f32 + nxv2f32 = 152, // n x 2 x f32 + nxv4f32 = 153, // n x 4 x f32 + nxv8f32 = 154, // n x 8 x f32 + nxv16f32 = 155, // n x 16 x f32 + nxv32f32 = 156, // n x 32 x f32 + nxv64f32 = 157, // n x 64 x f32 + nxv128f32 = 158, // n x 128 x f32 + nxv1f64 = 159, // n x 1 x f64 + nxv2f64 = 160, // n x 2 x f64 + nxv4f64 = 161, // n x 4 x f64 + nxv8f64 = 162, // n x 8 x f64 + nxv16f64 = 163, // n x 16 x f64 + nxv32f64 = 164, // n x 32 x f64 + nxv64f64 = 165, // n x 64 x f64 FIRST_FP_SCALABLE_VECTOR_VALUETYPE = nxv2f16, - LAST_FP_SCALABLE_VECTOR_VALUETYPE = nxv8f64, + LAST_FP_SCALABLE_VECTOR_VALUETYPE = nxv64f64, FIRST_SCALABLE_VECTOR_VALUETYPE = nxv1i1, - LAST_SCALABLE_VECTOR_VALUETYPE = nxv8f64, + LAST_SCALABLE_VECTOR_VALUETYPE = nxv64f64, FIRST_VECTOR_VALUETYPE = v1i1, - LAST_VECTOR_VALUETYPE = nxv8f64, + LAST_VECTOR_VALUETYPE = nxv64f64, - x86mmx = 141, // This is an X86 MMX value + x86mmx = 166, // This is an X86 MMX value - Glue = 142, // This glues nodes together during pre-RA sched + Glue = 167, // This glues nodes together during pre-RA sched - isVoid = 143, // This has no value + isVoid = 168, // This has no value - Untyped = 144, // This value takes a register, but has + Untyped = 169, // This value takes a register, but has // unspecified type. The register class // will be determined by the opcode. - exnref = 145, // WebAssembly's exnref type + exnref = 170, // WebAssembly's exnref type FIRST_VALUETYPE = 1, // This is always the beginning of the list. - LAST_VALUETYPE = 146, // This always remains at the end of the list. + LAST_VALUETYPE = 171, // 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 // This value must be a multiple of 32. - MAX_ALLOWED_VALUETYPE = 160, + MAX_ALLOWED_VALUETYPE = 192, // A value of type llvm::TokenTy token = 248, @@ -456,7 +482,11 @@ case nxv4i1: case nxv8i1: case nxv16i1: - case nxv32i1: return i1; + case nxv32i1: + case nxv64i1: + case nxv128i1: + case nxv256i1: + case nxv512i1: return i1; case v1i8: case v2i8: case v4i8: @@ -471,7 +501,11 @@ case nxv4i8: case nxv8i8: case nxv16i8: - case nxv32i8: return i8; + case nxv32i8: + case nxv64i8: + case nxv128i8: + case nxv256i8: + case nxv512i8: return i8; case v1i16: case v2i16: case v3i16: @@ -486,7 +520,10 @@ case nxv4i16: case nxv8i16: case nxv16i16: - case nxv32i16: return i16; + case nxv32i16: + case nxv64i16: + case nxv128i16: + case nxv256i16: return i16; case v1i32: case v2i32: case v3i32: @@ -506,7 +543,9 @@ case nxv4i32: case nxv8i32: case nxv16i32: - case nxv32i32: return i32; + case nxv32i32: + case nxv64i32: + case nxv128i32: return i32; case v1i64: case v2i64: case v4i64: @@ -518,7 +557,8 @@ case nxv4i64: case nxv8i64: case nxv16i64: - case nxv32i64: return i64; + case nxv32i64: + case nxv64i64: return i64; case v1i128: return i128; case v2f16: case v3f16: @@ -528,7 +568,12 @@ case v32f16: case nxv2f16: case nxv4f16: - case nxv8f16: return f16; + case nxv8f16: + case nxv16f16: + case nxv32f16: + case nxv64f16: + case nxv128f16: + case nxv256f16: return f16; case v2bf16: case v3bf16: case v4bf16: @@ -556,7 +601,10 @@ case nxv2f32: case nxv4f32: case nxv8f32: - case nxv16f32: return f32; + case nxv16f32: + case nxv32f32: + case nxv64f32: + case nxv128f32: return f32; case v1f64: case v2f64: case v4f64: @@ -565,7 +613,10 @@ case nxv1f64: case nxv2f64: case nxv4f64: - case nxv8f64: return f64; + case nxv8f64: + case nxv16f64: + case nxv32f64: + case nxv64f64: return f64; } } @@ -580,21 +631,41 @@ case v1024f32: return 1024; case v512i1: case v512i32: - case v512f32: return 512; + case v512f32: + case nxv512i1: + case nxv512i8: return 512; case v256i1: case v256i8: case v256i32: - case v256f32: return 256; + case v256f32: + case nxv256i1: + case nxv256i8: + case nxv256i16: + case nxv256f16: return 256; case v128i1: case v128i8: case v128i16: case v128i32: - case v128f32: return 128; + case v128f32: + case nxv128i1: + case nxv128i8: + case nxv128i16: + case nxv128i32: + case nxv128f16: + case nxv128f32: return 128; case v64i1: case v64i8: case v64i16: case v64i32: - case v64f32: return 64; + case v64f32: + case nxv64i1: + case nxv64i8: + case nxv64i16: + case nxv64i32: + case nxv64i64: + case nxv64f16: + case nxv64f32: + case nxv64f64: return 64; case v32i1: case v32i8: case v32i16: @@ -607,7 +678,10 @@ case nxv32i8: case nxv32i16: case nxv32i32: - case nxv32i64: return 32; + case nxv32i64: + case nxv32f16: + case nxv32f32: + case nxv32f64: return 32; case v16i1: case v16i8: case v16i16: @@ -622,7 +696,9 @@ case nxv16i16: case nxv16i32: case nxv16i64: - case nxv16f32: return 16; + case nxv16f16: + case nxv16f32: + case nxv16f64: return 16; case v8i1: case v8i8: case v8i16: @@ -787,6 +863,7 @@ case v4bf16: case v2f32: case v1f64: return TypeSize::Fixed(64); + case nxv64i1: case nxv8i8: case nxv4i16: case nxv2i32: @@ -811,6 +888,7 @@ case v8bf16: case v4f32: case v2f64: return TypeSize::Fixed(128); + case nxv128i1: case nxv16i8: case nxv8i16: case nxv4i32: @@ -830,10 +908,12 @@ case v16bf16: case v8f32: case v4f64: return TypeSize::Fixed(256); + case nxv256i1: case nxv32i8: case nxv16i16: case nxv8i32: case nxv4i64: + case nxv16f16: case nxv8f32: case nxv4f64: return TypeSize::Scalable(256); case v512i1: @@ -845,9 +925,12 @@ case v32bf16: case v16f32: case v8f64: return TypeSize::Fixed(512); + case nxv512i1: + case nxv64i8: case nxv32i16: case nxv16i32: case nxv8i64: + case nxv32f16: case nxv16f32: case nxv8f64: return TypeSize::Scalable(512); case v1024i1: @@ -857,16 +940,34 @@ case v16i64: case v16f64: case v32f32: return TypeSize::Fixed(1024); + case nxv128i8: + case nxv64i16: case nxv32i32: - case nxv16i64: return TypeSize::Scalable(1024); + case nxv16i64: + case nxv64f16: + case nxv32f32: + case nxv16f64: return TypeSize::Scalable(1024); case v256i8: case v128i16: case v64i32: case v32i64: case v64f32: return TypeSize::Fixed(2048); - case nxv32i64: return TypeSize::Scalable(2048); + case nxv256i8: + case nxv128i16: + case nxv64i32: + case nxv32i64: + case nxv128f16: + case nxv64f32: + case nxv32f64: return TypeSize::Scalable(2048); case v128i32: case v128f32: return TypeSize::Fixed(4096); + case nxv512i8: + case nxv256i16: + case nxv128i32: + case nxv64i64: + case nxv256f16: + case nxv128f32: + case nxv64f64: return TypeSize::Scalable(4096); case v256i32: case v256f32: return TypeSize::Fixed(8192); case v512i32: @@ -1086,6 +1187,10 @@ if (NumElements == 8) return MVT::nxv8i1; if (NumElements == 16) return MVT::nxv16i1; if (NumElements == 32) return MVT::nxv32i1; + if (NumElements == 64) return MVT::nxv64i1; + if (NumElements == 128) return MVT::nxv128i1; + if (NumElements == 256) return MVT::nxv256i1; + if (NumElements == 512) return MVT::nxv512i1; break; case MVT::i8: if (NumElements == 1) return MVT::nxv1i8; @@ -1094,6 +1199,10 @@ if (NumElements == 8) return MVT::nxv8i8; if (NumElements == 16) return MVT::nxv16i8; if (NumElements == 32) return MVT::nxv32i8; + if (NumElements == 64) return MVT::nxv64i8; + if (NumElements == 128) return MVT::nxv128i8; + if (NumElements == 256) return MVT::nxv256i8; + if (NumElements == 512) return MVT::nxv512i8; break; case MVT::i16: if (NumElements == 1) return MVT::nxv1i16; @@ -1102,6 +1211,9 @@ if (NumElements == 8) return MVT::nxv8i16; if (NumElements == 16) return MVT::nxv16i16; if (NumElements == 32) return MVT::nxv32i16; + if (NumElements == 64) return MVT::nxv64i16; + if (NumElements == 128) return MVT::nxv128i16; + if (NumElements == 256) return MVT::nxv256i16; break; case MVT::i32: if (NumElements == 1) return MVT::nxv1i32; @@ -1110,6 +1222,8 @@ if (NumElements == 8) return MVT::nxv8i32; if (NumElements == 16) return MVT::nxv16i32; if (NumElements == 32) return MVT::nxv32i32; + if (NumElements == 64) return MVT::nxv64i32; + if (NumElements == 128) return MVT::nxv128i32; break; case MVT::i64: if (NumElements == 1) return MVT::nxv1i64; @@ -1118,11 +1232,17 @@ if (NumElements == 8) return MVT::nxv8i64; if (NumElements == 16) return MVT::nxv16i64; if (NumElements == 32) return MVT::nxv32i64; + if (NumElements == 64) return MVT::nxv64i64; break; case MVT::f16: if (NumElements == 2) return MVT::nxv2f16; if (NumElements == 4) return MVT::nxv4f16; if (NumElements == 8) return MVT::nxv8f16; + if (NumElements == 16) return MVT::nxv16f16; + if (NumElements == 32) return MVT::nxv32f16; + if (NumElements == 64) return MVT::nxv64f16; + if (NumElements == 128) return MVT::nxv128f16; + if (NumElements == 256) return MVT::nxv256f16; break; case MVT::bf16: if (NumElements == 2) return MVT::nxv2bf16; @@ -1135,12 +1255,18 @@ if (NumElements == 4) return MVT::nxv4f32; if (NumElements == 8) return MVT::nxv8f32; if (NumElements == 16) return MVT::nxv16f32; + if (NumElements == 32) return MVT::nxv32f32; + if (NumElements == 64) return MVT::nxv64f32; + if (NumElements == 128) return MVT::nxv128f32; break; case MVT::f64: if (NumElements == 1) return MVT::nxv1f64; if (NumElements == 2) return MVT::nxv2f64; if (NumElements == 4) return MVT::nxv4f64; if (NumElements == 8) return MVT::nxv8f64; + if (NumElements == 16) return MVT::nxv16f64; + if (NumElements == 32) return MVT::nxv32f64; + if (NumElements == 64) return MVT::nxv64f64; break; } return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE); diff --git a/llvm/lib/CodeGen/ValueTypes.cpp b/llvm/lib/CodeGen/ValueTypes.cpp --- a/llvm/lib/CodeGen/ValueTypes.cpp +++ b/llvm/lib/CodeGen/ValueTypes.cpp @@ -361,6 +361,14 @@ return ScalableVectorType::get(Type::getInt1Ty(Context), 16); case MVT::nxv32i1: return ScalableVectorType::get(Type::getInt1Ty(Context), 32); + case MVT::nxv64i1: + return ScalableVectorType::get(Type::getInt1Ty(Context), 64); + case MVT::nxv128i1: + return ScalableVectorType::get(Type::getInt1Ty(Context), 128); + case MVT::nxv256i1: + return ScalableVectorType::get(Type::getInt1Ty(Context), 256); + case MVT::nxv512i1: + return ScalableVectorType::get(Type::getInt1Ty(Context), 512); case MVT::nxv1i8: return ScalableVectorType::get(Type::getInt8Ty(Context), 1); case MVT::nxv2i8: @@ -373,6 +381,14 @@ return ScalableVectorType::get(Type::getInt8Ty(Context), 16); case MVT::nxv32i8: return ScalableVectorType::get(Type::getInt8Ty(Context), 32); + case MVT::nxv64i8: + return ScalableVectorType::get(Type::getInt8Ty(Context), 64); + case MVT::nxv128i8: + return ScalableVectorType::get(Type::getInt8Ty(Context), 128); + case MVT::nxv256i8: + return ScalableVectorType::get(Type::getInt8Ty(Context), 256); + case MVT::nxv512i8: + return ScalableVectorType::get(Type::getInt8Ty(Context), 512); case MVT::nxv1i16: return ScalableVectorType::get(Type::getInt16Ty(Context), 1); case MVT::nxv2i16: @@ -385,6 +401,12 @@ return ScalableVectorType::get(Type::getInt16Ty(Context), 16); case MVT::nxv32i16: return ScalableVectorType::get(Type::getInt16Ty(Context), 32); + case MVT::nxv64i16: + return ScalableVectorType::get(Type::getInt16Ty(Context), 64); + case MVT::nxv128i16: + return ScalableVectorType::get(Type::getInt16Ty(Context), 128); + case MVT::nxv256i16: + return ScalableVectorType::get(Type::getInt16Ty(Context), 256); case MVT::nxv1i32: return ScalableVectorType::get(Type::getInt32Ty(Context), 1); case MVT::nxv2i32: @@ -397,6 +419,10 @@ return ScalableVectorType::get(Type::getInt32Ty(Context), 16); case MVT::nxv32i32: return ScalableVectorType::get(Type::getInt32Ty(Context), 32); + case MVT::nxv64i32: + return ScalableVectorType::get(Type::getInt32Ty(Context), 64); + case MVT::nxv128i32: + return ScalableVectorType::get(Type::getInt32Ty(Context), 128); case MVT::nxv1i64: return ScalableVectorType::get(Type::getInt64Ty(Context), 1); case MVT::nxv2i64: @@ -409,12 +435,24 @@ return ScalableVectorType::get(Type::getInt64Ty(Context), 16); case MVT::nxv32i64: return ScalableVectorType::get(Type::getInt64Ty(Context), 32); + case MVT::nxv64i64: + return ScalableVectorType::get(Type::getInt64Ty(Context), 64); case MVT::nxv2f16: return ScalableVectorType::get(Type::getHalfTy(Context), 2); case MVT::nxv4f16: return ScalableVectorType::get(Type::getHalfTy(Context), 4); case MVT::nxv8f16: return ScalableVectorType::get(Type::getHalfTy(Context), 8); + case MVT::nxv16f16: + return ScalableVectorType::get(Type::getHalfTy(Context), 16); + case MVT::nxv32f16: + return ScalableVectorType::get(Type::getHalfTy(Context), 32); + case MVT::nxv64f16: + return ScalableVectorType::get(Type::getHalfTy(Context), 64); + case MVT::nxv128f16: + return ScalableVectorType::get(Type::getHalfTy(Context), 128); + case MVT::nxv256f16: + return ScalableVectorType::get(Type::getHalfTy(Context), 256); case MVT::nxv2bf16: return ScalableVectorType::get(Type::getBFloatTy(Context), 2); case MVT::nxv4bf16: @@ -431,6 +469,12 @@ return ScalableVectorType::get(Type::getFloatTy(Context), 8); case MVT::nxv16f32: return ScalableVectorType::get(Type::getFloatTy(Context), 16); + case MVT::nxv32f32: + return ScalableVectorType::get(Type::getFloatTy(Context), 32); + case MVT::nxv64f32: + return ScalableVectorType::get(Type::getFloatTy(Context), 64); + case MVT::nxv128f32: + return ScalableVectorType::get(Type::getFloatTy(Context), 128); case MVT::nxv1f64: return ScalableVectorType::get(Type::getDoubleTy(Context), 1); case MVT::nxv2f64: @@ -439,6 +483,12 @@ return ScalableVectorType::get(Type::getDoubleTy(Context), 4); case MVT::nxv8f64: return ScalableVectorType::get(Type::getDoubleTy(Context), 8); + case MVT::nxv16f64: + return ScalableVectorType::get(Type::getDoubleTy(Context), 16); + case MVT::nxv32f64: + return ScalableVectorType::get(Type::getDoubleTy(Context), 32); + case MVT::nxv64f64: + return ScalableVectorType::get(Type::getDoubleTy(Context), 64); case MVT::Metadata: return Type::getMetadataTy(Context); } } diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -748,7 +748,8 @@ IIT_SUBDIVIDE4_ARG = 45, IIT_VEC_OF_BITCASTS_TO_INT = 46, IIT_V128 = 47, - IIT_BF16 = 48 + IIT_V256 = 48, + IIT_BF16 = 49 }; static void DecodeIITType(unsigned &NextElt, ArrayRef Infos, @@ -842,6 +843,10 @@ OutputTable.push_back(IITDescriptor::getVector(128, IsScalableVector)); DecodeIITType(NextElt, Infos, Info, OutputTable); return; + case IIT_V256: + OutputTable.push_back(IITDescriptor::getVector(256, IsScalableVector)); + DecodeIITType(NextElt, Infos, Info, OutputTable); + return; case IIT_V512: OutputTable.push_back(IITDescriptor::getVector(512, IsScalableVector)); DecodeIITType(NextElt, Infos, Info, OutputTable); diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -164,31 +164,52 @@ case MVT::nxv8i1: return "MVT::nxv8i1"; case MVT::nxv16i1: return "MVT::nxv16i1"; case MVT::nxv32i1: return "MVT::nxv32i1"; + case MVT::nxv64i1: return "MVT::nxv64i1"; + case MVT::nxv128i1: return "MVT::nxv128i1"; + case MVT::nxv256i1: return "MVT::nxv256i1"; + case MVT::nxv512i1: return "MVT::nxv512i1"; case MVT::nxv1i8: return "MVT::nxv1i8"; case MVT::nxv2i8: return "MVT::nxv2i8"; case MVT::nxv4i8: return "MVT::nxv4i8"; case MVT::nxv8i8: return "MVT::nxv8i8"; case MVT::nxv16i8: return "MVT::nxv16i8"; case MVT::nxv32i8: return "MVT::nxv32i8"; + case MVT::nxv64i8: return "MVT::nxv64i8"; + case MVT::nxv128i8: return "MVT::nxv128i8"; + case MVT::nxv256i8: return "MVT::nxv256i8"; + case MVT::nxv512i8: return "MVT::nxv512i8"; case MVT::nxv1i16: return "MVT::nxv1i16"; case MVT::nxv2i16: return "MVT::nxv2i16"; case MVT::nxv4i16: return "MVT::nxv4i16"; case MVT::nxv8i16: return "MVT::nxv8i16"; case MVT::nxv16i16: return "MVT::nxv16i16"; case MVT::nxv32i16: return "MVT::nxv32i16"; + case MVT::nxv64i16: return "MVT::nxv64i16"; + case MVT::nxv128i16:return "MVT::nxv128i16"; + case MVT::nxv256i16:return "MVT::nxv256i16"; case MVT::nxv1i32: return "MVT::nxv1i32"; case MVT::nxv2i32: return "MVT::nxv2i32"; case MVT::nxv4i32: return "MVT::nxv4i32"; case MVT::nxv8i32: return "MVT::nxv8i32"; case MVT::nxv16i32: return "MVT::nxv16i32"; + case MVT::nxv32i32: return "MVT::nxv32i32"; + case MVT::nxv64i32: return "MVT::nxv64i32"; + case MVT::nxv128i32:return "MVT::nxv128i32"; case MVT::nxv1i64: return "MVT::nxv1i64"; case MVT::nxv2i64: return "MVT::nxv2i64"; case MVT::nxv4i64: return "MVT::nxv4i64"; case MVT::nxv8i64: return "MVT::nxv8i64"; case MVT::nxv16i64: return "MVT::nxv16i64"; + case MVT::nxv32i64: return "MVT::nxv32i64"; + case MVT::nxv64i64: return "MVT::nxv64i64"; case MVT::nxv2f16: return "MVT::nxv2f16"; case MVT::nxv4f16: return "MVT::nxv4f16"; case MVT::nxv8f16: return "MVT::nxv8f16"; + case MVT::nxv16f16: return "MVT::nxv16f16"; + case MVT::nxv32f16: return "MVT::nxv32f16"; + case MVT::nxv64f16: return "MVT::nxv64f16"; + case MVT::nxv128f16:return "MVT::nxv128f16"; + case MVT::nxv256f16:return "MVT::nxv256f16"; case MVT::nxv2bf16: return "MVT::nxv2bf16"; case MVT::nxv4bf16: return "MVT::nxv4bf16"; case MVT::nxv8bf16: return "MVT::nxv8bf16"; @@ -197,10 +218,16 @@ case MVT::nxv4f32: return "MVT::nxv4f32"; case MVT::nxv8f32: return "MVT::nxv8f32"; case MVT::nxv16f32: return "MVT::nxv16f32"; + case MVT::nxv32f32: return "MVT::nxv32f32"; + case MVT::nxv64f32: return "MVT::nxv64f32"; + case MVT::nxv128f32:return "MVT::nxv128f32"; case MVT::nxv1f64: return "MVT::nxv1f64"; case MVT::nxv2f64: return "MVT::nxv2f64"; case MVT::nxv4f64: return "MVT::nxv4f64"; case MVT::nxv8f64: return "MVT::nxv8f64"; + case MVT::nxv16f64: return "MVT::nxv16f64"; + case MVT::nxv32f64: return "MVT::nxv32f64"; + case MVT::nxv64f64: return "MVT::nxv64f64"; case MVT::token: return "MVT::token"; case MVT::Metadata: return "MVT::Metadata"; case MVT::iPTR: return "MVT::iPTR"; diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp --- a/llvm/utils/TableGen/IntrinsicEmitter.cpp +++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp @@ -246,7 +246,8 @@ IIT_SUBDIVIDE4_ARG = 45, IIT_VEC_OF_BITCASTS_TO_INT = 46, IIT_V128 = 47, - IIT_BF16 = 48 + IIT_V256 = 48, + IIT_BF16 = 49 }; static void EncodeFixedValueType(MVT::SimpleValueType VT, @@ -384,6 +385,7 @@ case 32: Sig.push_back(IIT_V32); break; case 64: Sig.push_back(IIT_V64); break; case 128: Sig.push_back(IIT_V128); break; + case 256: Sig.push_back(IIT_V256); break; case 512: Sig.push_back(IIT_V512); break; case 1024: Sig.push_back(IIT_V1024); break; }