Skip to content

Commit 1a9195d

Browse files
committed
[SVE][MVT] Fixed-length vector MVT ranges
* Reordered MVT simple types to group scalable vector types together. * New range functions in MachineValueType.h to only iterate over the fixed-length int/fp vector types. * Stopped backends which don't support scalable vector types from iterating over scalable types. Reviewers: sdesmalen, greened Reviewed By: greened Differential Revision: https://reviews.llvm.org/D66339 llvm-svn: 372099
1 parent be2487a commit 1a9195d

18 files changed

+214
-179
lines changed

llvm/include/llvm/CodeGen/ValueTypes.td

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -87,65 +87,65 @@ def v32i64 : ValueType<2048,61>; // 32 x i64 vector value
8787

8888
def v1i128 : ValueType<128, 62>; // 1 x i128 vector value
8989

90-
def nxv1i1 : ValueType<1, 63>; // n x 1 x i1 vector value
91-
def nxv2i1 : ValueType<2, 64>; // n x 2 x i1 vector value
92-
def nxv4i1 : ValueType<4, 65>; // n x 4 x i1 vector value
93-
def nxv8i1 : ValueType<8, 66>; // n x 8 x i1 vector value
94-
def nxv16i1 : ValueType<16, 67>; // n x 16 x i1 vector value
95-
def nxv32i1 : ValueType<32, 68>; // n x 32 x i1 vector value
96-
97-
def nxv1i8 : ValueType<8, 69>; // n x 1 x i8 vector value
98-
def nxv2i8 : ValueType<16, 70>; // n x 2 x i8 vector value
99-
def nxv4i8 : ValueType<32, 71>; // n x 4 x i8 vector value
100-
def nxv8i8 : ValueType<64, 72>; // n x 8 x i8 vector value
101-
def nxv16i8 : ValueType<128, 73>; // n x 16 x i8 vector value
102-
def nxv32i8 : ValueType<256, 74>; // n x 32 x i8 vector value
103-
104-
def nxv1i16 : ValueType<16, 75>; // n x 1 x i16 vector value
105-
def nxv2i16 : ValueType<32, 76>; // n x 2 x i16 vector value
106-
def nxv4i16 : ValueType<64, 77>; // n x 4 x i16 vector value
107-
def nxv8i16 : ValueType<128, 78>; // n x 8 x i16 vector value
108-
def nxv16i16: ValueType<256, 79>; // n x 16 x i16 vector value
109-
def nxv32i16: ValueType<512, 80>; // n x 32 x i16 vector value
110-
111-
def nxv1i32 : ValueType<32, 81>; // n x 1 x i32 vector value
112-
def nxv2i32 : ValueType<64, 82>; // n x 2 x i32 vector value
113-
def nxv4i32 : ValueType<128, 83>; // n x 4 x i32 vector value
114-
def nxv8i32 : ValueType<256, 84>; // n x 8 x i32 vector value
115-
def nxv16i32: ValueType<512, 85>; // n x 16 x i32 vector value
116-
def nxv32i32: ValueType<1024,86>; // n x 32 x i32 vector value
117-
118-
def nxv1i64 : ValueType<64, 87>; // n x 1 x i64 vector value
119-
def nxv2i64 : ValueType<128, 88>; // n x 2 x i64 vector value
120-
def nxv4i64 : ValueType<256, 89>; // n x 4 x i64 vector value
121-
def nxv8i64 : ValueType<512, 90>; // n x 8 x i64 vector value
122-
def nxv16i64: ValueType<1024,91>; // n x 16 x i64 vector value
123-
def nxv32i64: ValueType<2048,92>; // n x 32 x i64 vector value
124-
125-
def v2f16 : ValueType<32 , 93>; // 2 x f16 vector value
126-
def v3f16 : ValueType<48 , 94>; // 3 x f16 vector value
127-
def v4f16 : ValueType<64 , 95>; // 4 x f16 vector value
128-
def v8f16 : ValueType<128, 96>; // 8 x f16 vector value
129-
def v16f16 : ValueType<256, 97>; // 8 x f16 vector value
130-
def v32f16 : ValueType<512, 98>; // 8 x f16 vector value
131-
def v1f32 : ValueType<32 , 99>; // 1 x f32 vector value
132-
def v2f32 : ValueType<64 , 100>; // 2 x f32 vector value
133-
def v3f32 : ValueType<96 , 101>; // 3 x f32 vector value
134-
def v4f32 : ValueType<128, 102>; // 4 x f32 vector value
135-
def v5f32 : ValueType<160, 103>; // 5 x f32 vector value
136-
def v8f32 : ValueType<256, 104>; // 8 x f32 vector value
137-
def v16f32 : ValueType<512, 105>; // 16 x f32 vector value
138-
def v32f32 : ValueType<1024, 106>; // 32 x f32 vector value
139-
def v64f32 : ValueType<2048, 107>; // 64 x f32 vector value
140-
def v128f32 : ValueType<4096, 108>; // 128 x f32 vector value
141-
def v256f32 : ValueType<8182, 109>; // 256 x f32 vector value
142-
def v512f32 : ValueType<16384, 110>; // 512 x f32 vector value
143-
def v1024f32 : ValueType<32768, 111>; // 1024 x f32 vector value
144-
def v2048f32 : ValueType<65536, 112>; // 2048 x f32 vector value
145-
def v1f64 : ValueType<64, 113>; // 1 x f64 vector value
146-
def v2f64 : ValueType<128, 114>; // 2 x f64 vector value
147-
def v4f64 : ValueType<256, 115>; // 4 x f64 vector value
148-
def v8f64 : ValueType<512, 116>; // 8 x f64 vector value
90+
def v2f16 : ValueType<32 , 63>; // 2 x f16 vector value
91+
def v3f16 : ValueType<48 , 64>; // 3 x f16 vector value
92+
def v4f16 : ValueType<64 , 65>; // 4 x f16 vector value
93+
def v8f16 : ValueType<128, 66>; // 8 x f16 vector value
94+
def v16f16 : ValueType<256, 67>; // 8 x f16 vector value
95+
def v32f16 : ValueType<512, 68>; // 8 x f16 vector value
96+
def v1f32 : ValueType<32 , 69>; // 1 x f32 vector value
97+
def v2f32 : ValueType<64 , 70>; // 2 x f32 vector value
98+
def v3f32 : ValueType<96 , 71>; // 3 x f32 vector value
99+
def v4f32 : ValueType<128, 72>; // 4 x f32 vector value
100+
def v5f32 : ValueType<160, 73>; // 5 x f32 vector value
101+
def v8f32 : ValueType<256, 74>; // 8 x f32 vector value
102+
def v16f32 : ValueType<512, 75>; // 16 x f32 vector value
103+
def v32f32 : ValueType<1024, 76>; // 32 x f32 vector value
104+
def v64f32 : ValueType<2048, 77>; // 64 x f32 vector value
105+
def v128f32 : ValueType<4096, 78>; // 128 x f32 vector value
106+
def v256f32 : ValueType<8182, 79>; // 256 x f32 vector value
107+
def v512f32 : ValueType<16384, 80>; // 512 x f32 vector value
108+
def v1024f32 : ValueType<32768, 81>; // 1024 x f32 vector value
109+
def v2048f32 : ValueType<65536, 82>; // 2048 x f32 vector value
110+
def v1f64 : ValueType<64, 83>; // 1 x f64 vector value
111+
def v2f64 : ValueType<128, 84>; // 2 x f64 vector value
112+
def v4f64 : ValueType<256, 85>; // 4 x f64 vector value
113+
def v8f64 : ValueType<512, 86>; // 8 x f64 vector value
114+
115+
def nxv1i1 : ValueType<1, 87>; // n x 1 x i1 vector value
116+
def nxv2i1 : ValueType<2, 88>; // n x 2 x i1 vector value
117+
def nxv4i1 : ValueType<4, 89>; // n x 4 x i1 vector value
118+
def nxv8i1 : ValueType<8, 90>; // n x 8 x i1 vector value
119+
def nxv16i1 : ValueType<16, 91>; // n x 16 x i1 vector value
120+
def nxv32i1 : ValueType<32, 92>; // n x 32 x i1 vector value
121+
122+
def nxv1i8 : ValueType<8, 93>; // n x 1 x i8 vector value
123+
def nxv2i8 : ValueType<16, 94>; // n x 2 x i8 vector value
124+
def nxv4i8 : ValueType<32, 95>; // n x 4 x i8 vector value
125+
def nxv8i8 : ValueType<64, 96>; // n x 8 x i8 vector value
126+
def nxv16i8 : ValueType<128, 97>; // n x 16 x i8 vector value
127+
def nxv32i8 : ValueType<256, 98>; // n x 32 x i8 vector value
128+
129+
def nxv1i16 : ValueType<16, 99>; // n x 1 x i16 vector value
130+
def nxv2i16 : ValueType<32, 100>; // n x 2 x i16 vector value
131+
def nxv4i16 : ValueType<64, 101>; // n x 4 x i16 vector value
132+
def nxv8i16 : ValueType<128, 102>; // n x 8 x i16 vector value
133+
def nxv16i16: ValueType<256, 103>; // n x 16 x i16 vector value
134+
def nxv32i16: ValueType<512, 104>; // n x 32 x i16 vector value
135+
136+
def nxv1i32 : ValueType<32, 105>; // n x 1 x i32 vector value
137+
def nxv2i32 : ValueType<64, 106>; // n x 2 x i32 vector value
138+
def nxv4i32 : ValueType<128, 107>; // n x 4 x i32 vector value
139+
def nxv8i32 : ValueType<256, 108>; // n x 8 x i32 vector value
140+
def nxv16i32: ValueType<512, 109>; // n x 16 x i32 vector value
141+
def nxv32i32: ValueType<1024,110>; // n x 32 x i32 vector value
142+
143+
def nxv1i64 : ValueType<64, 111>; // n x 1 x i64 vector value
144+
def nxv2i64 : ValueType<128, 112>; // n x 2 x i64 vector value
145+
def nxv4i64 : ValueType<256, 113>; // n x 4 x i64 vector value
146+
def nxv8i64 : ValueType<512, 114>; // n x 8 x i64 vector value
147+
def nxv16i64: ValueType<1024,115>; // n x 16 x i64 vector value
148+
def nxv32i64: ValueType<2048,116>; // n x 32 x i64 vector value
149149

150150
def nxv2f16 : ValueType<32 , 117>; // n x 2 x f16 vector value
151151
def nxv4f16 : ValueType<64 , 118>; // n x 4 x f16 vector value

llvm/include/llvm/Support/MachineValueType.h

Lines changed: 114 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -112,72 +112,77 @@ namespace llvm {
112112

113113
v1i128 = 62, // 1 x i128
114114

115-
// Scalable integer types
116-
nxv1i1 = 63, // n x 1 x i1
117-
nxv2i1 = 64, // n x 2 x i1
118-
nxv4i1 = 65, // n x 4 x i1
119-
nxv8i1 = 66, // n x 8 x i1
120-
nxv16i1 = 67, // n x 16 x i1
121-
nxv32i1 = 68, // n x 32 x i1
122-
123-
nxv1i8 = 69, // n x 1 x i8
124-
nxv2i8 = 70, // n x 2 x i8
125-
nxv4i8 = 71, // n x 4 x i8
126-
nxv8i8 = 72, // n x 8 x i8
127-
nxv16i8 = 73, // n x 16 x i8
128-
nxv32i8 = 74, // n x 32 x i8
129-
130-
nxv1i16 = 75, // n x 1 x i16
131-
nxv2i16 = 76, // n x 2 x i16
132-
nxv4i16 = 77, // n x 4 x i16
133-
nxv8i16 = 78, // n x 8 x i16
134-
nxv16i16 = 79, // n x 16 x i16
135-
nxv32i16 = 80, // n x 32 x i16
136-
137-
nxv1i32 = 81, // n x 1 x i32
138-
nxv2i32 = 82, // n x 2 x i32
139-
nxv4i32 = 83, // n x 4 x i32
140-
nxv8i32 = 84, // n x 8 x i32
141-
nxv16i32 = 85, // n x 16 x i32
142-
nxv32i32 = 86, // n x 32 x i32
143-
144-
nxv1i64 = 87, // n x 1 x i64
145-
nxv2i64 = 88, // n x 2 x i64
146-
nxv4i64 = 89, // n x 4 x i64
147-
nxv8i64 = 90, // n x 8 x i64
148-
nxv16i64 = 91, // n x 16 x i64
149-
nxv32i64 = 92, // n x 32 x i64
150-
151-
FIRST_INTEGER_VECTOR_VALUETYPE = v1i1,
152-
LAST_INTEGER_VECTOR_VALUETYPE = nxv32i64,
153-
154-
FIRST_INTEGER_SCALABLE_VALUETYPE = nxv1i1,
155-
LAST_INTEGER_SCALABLE_VALUETYPE = nxv32i64,
156-
157-
v2f16 = 93, // 2 x f16
158-
v3f16 = 94, // 3 x f16
159-
v4f16 = 95, // 4 x f16
160-
v8f16 = 96, // 8 x f16
161-
v16f16 = 97, // 16 x f16
162-
v32f16 = 98, // 32 x f16
163-
v1f32 = 99, // 1 x f32
164-
v2f32 = 100, // 2 x f32
165-
v3f32 = 101, // 3 x f32
166-
v4f32 = 102, // 4 x f32
167-
v5f32 = 103, // 5 x f32
168-
v8f32 = 104, // 8 x f32
169-
v16f32 = 105, // 16 x f32
170-
v32f32 = 106, // 32 x f32
171-
v64f32 = 107, // 64 x f32
172-
v128f32 = 108, // 128 x f32
173-
v256f32 = 109, // 256 x f32
174-
v512f32 = 110, // 512 x f32
175-
v1024f32 = 111, // 1024 x f32
176-
v2048f32 = 112, // 2048 x f32
177-
v1f64 = 113, // 1 x f64
178-
v2f64 = 114, // 2 x f64
179-
v4f64 = 115, // 4 x f64
180-
v8f64 = 116, // 8 x f64
115+
FIRST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE = v1i1,
116+
LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE = v1i128,
117+
118+
v2f16 = 63, // 2 x f16
119+
v3f16 = 64, // 3 x f16
120+
v4f16 = 65, // 4 x f16
121+
v8f16 = 66, // 8 x f16
122+
v16f16 = 67, // 16 x f16
123+
v32f16 = 68, // 32 x f16
124+
v1f32 = 69, // 1 x f32
125+
v2f32 = 70, // 2 x f32
126+
v3f32 = 71, // 3 x f32
127+
v4f32 = 72, // 4 x f32
128+
v5f32 = 73, // 5 x f32
129+
v8f32 = 74, // 8 x f32
130+
v16f32 = 75, // 16 x f32
131+
v32f32 = 76, // 32 x f32
132+
v64f32 = 77, // 64 x f32
133+
v128f32 = 78, // 128 x f32
134+
v256f32 = 79, // 256 x f32
135+
v512f32 = 80, // 512 x f32
136+
v1024f32 = 81, // 1024 x f32
137+
v2048f32 = 82, // 2048 x f32
138+
v1f64 = 83, // 1 x f64
139+
v2f64 = 84, // 2 x f64
140+
v4f64 = 85, // 4 x f64
141+
v8f64 = 86, // 8 x f64
142+
143+
FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE = v2f16,
144+
LAST_FP_FIXEDLEN_VECTOR_VALUETYPE = v8f64,
145+
146+
FIRST_FIXEDLEN_VECTOR_VALUETYPE = v1i1,
147+
LAST_FIXEDLEN_VECTOR_VALUETYPE = v8f64,
148+
149+
nxv1i1 = 87, // n x 1 x i1
150+
nxv2i1 = 88, // n x 2 x i1
151+
nxv4i1 = 89, // n x 4 x i1
152+
nxv8i1 = 90, // n x 8 x i1
153+
nxv16i1 = 91, // n x 16 x i1
154+
nxv32i1 = 92, // n x 32 x i1
155+
156+
nxv1i8 = 93, // n x 1 x i8
157+
nxv2i8 = 94, // n x 2 x i8
158+
nxv4i8 = 95, // n x 4 x i8
159+
nxv8i8 = 96, // n x 8 x i8
160+
nxv16i8 = 97, // n x 16 x i8
161+
nxv32i8 = 98, // n x 32 x i8
162+
163+
nxv1i16 = 99, // n x 1 x i16
164+
nxv2i16 = 100, // n x 2 x i16
165+
nxv4i16 = 101, // n x 4 x i16
166+
nxv8i16 = 102, // n x 8 x i16
167+
nxv16i16 = 103, // n x 16 x i16
168+
nxv32i16 = 104, // n x 32 x i16
169+
170+
nxv1i32 = 105, // n x 1 x i32
171+
nxv2i32 = 106, // n x 2 x i32
172+
nxv4i32 = 107, // n x 4 x i32
173+
nxv8i32 = 108, // n x 8 x i32
174+
nxv16i32 = 109, // n x 16 x i32
175+
nxv32i32 = 110, // n x 32 x i32
176+
177+
nxv1i64 = 111, // n x 1 x i64
178+
nxv2i64 = 112, // n x 2 x i64
179+
nxv4i64 = 113, // n x 4 x i64
180+
nxv8i64 = 114, // n x 8 x i64
181+
nxv16i64 = 115, // n x 16 x i64
182+
nxv32i64 = 116, // n x 32 x i64
183+
184+
FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE = nxv1i1,
185+
LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE = nxv32i64,
181186

182187
nxv2f16 = 117, // n x 2 x f16
183188
nxv4f16 = 118, // n x 4 x f16
@@ -192,11 +197,11 @@ namespace llvm {
192197
nxv4f64 = 127, // n x 4 x f64
193198
nxv8f64 = 128, // n x 8 x f64
194199

195-
FIRST_FP_VECTOR_VALUETYPE = v2f16,
196-
LAST_FP_VECTOR_VALUETYPE = nxv8f64,
200+
FIRST_FP_SCALABLE_VECTOR_VALUETYPE = nxv2f16,
201+
LAST_FP_SCALABLE_VECTOR_VALUETYPE = nxv8f64,
197202

198-
FIRST_FP_SCALABLE_VALUETYPE = nxv2f16,
199-
LAST_FP_SCALABLE_VALUETYPE = nxv8f64,
203+
FIRST_SCALABLE_VECTOR_VALUETYPE = nxv1i1,
204+
LAST_SCALABLE_VECTOR_VALUETYPE = nxv8f64,
200205

201206
FIRST_VECTOR_VALUETYPE = v1i1,
202207
LAST_VECTOR_VALUETYPE = nxv8f64,
@@ -278,16 +283,20 @@ namespace llvm {
278283
bool isFloatingPoint() const {
279284
return ((SimpleTy >= MVT::FIRST_FP_VALUETYPE &&
280285
SimpleTy <= MVT::LAST_FP_VALUETYPE) ||
281-
(SimpleTy >= MVT::FIRST_FP_VECTOR_VALUETYPE &&
282-
SimpleTy <= MVT::LAST_FP_VECTOR_VALUETYPE));
286+
(SimpleTy >= MVT::FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE &&
287+
SimpleTy <= MVT::LAST_FP_FIXEDLEN_VECTOR_VALUETYPE) ||
288+
(SimpleTy >= MVT::FIRST_FP_SCALABLE_VECTOR_VALUETYPE &&
289+
SimpleTy <= MVT::LAST_FP_SCALABLE_VECTOR_VALUETYPE));
283290
}
284291

285292
/// Return true if this is an integer or a vector integer type.
286293
bool isInteger() const {
287294
return ((SimpleTy >= MVT::FIRST_INTEGER_VALUETYPE &&
288295
SimpleTy <= MVT::LAST_INTEGER_VALUETYPE) ||
289-
(SimpleTy >= MVT::FIRST_INTEGER_VECTOR_VALUETYPE &&
290-
SimpleTy <= MVT::LAST_INTEGER_VECTOR_VALUETYPE));
296+
(SimpleTy >= MVT::FIRST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE &&
297+
SimpleTy <= MVT::LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE) ||
298+
(SimpleTy >= MVT::FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE &&
299+
SimpleTy <= MVT::LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE));
291300
}
292301

293302
/// Return true if this is an integer, not including vectors.
@@ -305,10 +314,13 @@ namespace llvm {
305314
/// Return true if this is a vector value type where the
306315
/// runtime length is machine dependent
307316
bool isScalableVector() const {
308-
return ((SimpleTy >= MVT::FIRST_INTEGER_SCALABLE_VALUETYPE &&
309-
SimpleTy <= MVT::LAST_INTEGER_SCALABLE_VALUETYPE) ||
310-
(SimpleTy >= MVT::FIRST_FP_SCALABLE_VALUETYPE &&
311-
SimpleTy <= MVT::LAST_FP_SCALABLE_VALUETYPE));
317+
return (SimpleTy >= MVT::FIRST_SCALABLE_VECTOR_VALUETYPE &&
318+
SimpleTy <= MVT::LAST_SCALABLE_VECTOR_VALUETYPE);
319+
}
320+
321+
bool isFixedLengthVector() const {
322+
return (SimpleTy >= MVT::FIRST_FIXEDLEN_VECTOR_VALUETYPE &&
323+
SimpleTy <= MVT::LAST_FIXEDLEN_VECTOR_VALUETYPE);
312324
}
313325

314326
/// Return true if this is a 16-bit vector type.
@@ -1104,26 +1116,40 @@ namespace llvm {
11041116
(MVT::SimpleValueType)(MVT::LAST_VECTOR_VALUETYPE + 1));
11051117
}
11061118

1107-
static mvt_range integer_vector_valuetypes() {
1119+
static mvt_range fixedlen_vector_valuetypes() {
1120+
return mvt_range(
1121+
MVT::FIRST_FIXEDLEN_VECTOR_VALUETYPE,
1122+
(MVT::SimpleValueType)(MVT::LAST_FIXEDLEN_VECTOR_VALUETYPE + 1));
1123+
}
1124+
1125+
static mvt_range scalable_vector_valuetypes() {
11081126
return mvt_range(
1109-
MVT::FIRST_INTEGER_VECTOR_VALUETYPE,
1110-
(MVT::SimpleValueType)(MVT::LAST_INTEGER_VECTOR_VALUETYPE + 1));
1127+
MVT::FIRST_SCALABLE_VECTOR_VALUETYPE,
1128+
(MVT::SimpleValueType)(MVT::LAST_SCALABLE_VECTOR_VALUETYPE + 1));
11111129
}
11121130

1113-
static mvt_range fp_vector_valuetypes() {
1131+
static mvt_range integer_fixedlen_vector_valuetypes() {
11141132
return mvt_range(
1115-
MVT::FIRST_FP_VECTOR_VALUETYPE,
1116-
(MVT::SimpleValueType)(MVT::LAST_FP_VECTOR_VALUETYPE + 1));
1133+
MVT::FIRST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE,
1134+
(MVT::SimpleValueType)(MVT::LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE + 1));
1135+
}
1136+
1137+
static mvt_range fp_fixedlen_vector_valuetypes() {
1138+
return mvt_range(
1139+
MVT::FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE,
1140+
(MVT::SimpleValueType)(MVT::LAST_FP_FIXEDLEN_VECTOR_VALUETYPE + 1));
11171141
}
11181142

11191143
static mvt_range integer_scalable_vector_valuetypes() {
1120-
return mvt_range(MVT::FIRST_INTEGER_SCALABLE_VALUETYPE,
1121-
(MVT::SimpleValueType)(MVT::LAST_INTEGER_SCALABLE_VALUETYPE + 1));
1144+
return mvt_range(
1145+
MVT::FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE,
1146+
(MVT::SimpleValueType)(MVT::LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE + 1));
11221147
}
11231148

11241149
static mvt_range fp_scalable_vector_valuetypes() {
1125-
return mvt_range(MVT::FIRST_FP_SCALABLE_VALUETYPE,
1126-
(MVT::SimpleValueType)(MVT::LAST_FP_SCALABLE_VALUETYPE + 1));
1150+
return mvt_range(
1151+
MVT::FIRST_FP_SCALABLE_VECTOR_VALUETYPE,
1152+
(MVT::SimpleValueType)(MVT::LAST_FP_SCALABLE_VECTOR_VALUETYPE + 1));
11271153
}
11281154
/// @}
11291155
};

llvm/lib/CodeGen/TargetLoweringBase.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,8 @@ void TargetLoweringBase::computeRegisterProperties(
12661266
case TypePromoteInteger:
12671267
// Try to promote the elements of integer vectors. If no legal
12681268
// promotion was found, fall through to the widen-vector method.
1269-
for (unsigned nVT = i + 1; nVT <= MVT::LAST_INTEGER_VECTOR_VALUETYPE; ++nVT) {
1269+
for (unsigned nVT = i + 1;
1270+
nVT <= MVT::LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE; ++nVT) {
12701271
MVT SVT = (MVT::SimpleValueType) nVT;
12711272
// Promote vectors of integers to vectors with the same number
12721273
// of elements, with a wider element type.

0 commit comments

Comments
 (0)