@@ -9,8 +9,6 @@ typedef double vd2 __attribute__((ext_vector_type(2)));
9
9
typedef long vl2 __attribute__ ((ext_vector_type(2 )));
10
10
typedef unsigned short vus2 __attribute__ ((ext_vector_type(2 )));
11
11
12
- typedef int vi7 __attribute__ ((ext_vector_type(7 )));
13
-
14
12
// CIR: cir.func {{@.*vector_int_test.*}}
15
13
// LLVM: define void {{@.*vector_int_test.*}}
16
14
void vector_int_test (int x) {
@@ -181,10 +179,6 @@ void test_load() {
181
179
182
180
vi2 b;
183
181
184
- vi7 c = {};
185
- // CIR: %[[#PVECC:]] = cir.alloca !cir.vector<!s32i x 7>
186
- // LLVM: %[[#PVECC:]] = alloca <7 x i32>
187
-
188
182
b = a.wz ;
189
183
// CIR: %[[#LOAD1:]] = cir.load %{{[0-9]+}} : !cir.ptr<!cir.vector<!s32i x 4>>, !cir.vector<!s32i x 4>
190
184
// CIR-NEXT: %[[#SHUFFLE1:]] = cir.vec.shuffle(%[[#LOAD1]], %[[#LOAD1]] : !cir.vector<!s32i x 4>) [#cir.int<3> : !s32i, #cir.int<2> : !s32i] : !cir.vector<!s32i x 2>
@@ -204,21 +198,6 @@ void test_load() {
204
198
// LLVM-NEXT: %[[#EXTRACT1:]] = extractelement <4 x i32> %[[#LOAD8]], i64 2
205
199
// LLVM-NEXT: store i32 %[[#EXTRACT1]], ptr %{{[0-9]+}}, align 4
206
200
207
-
208
- // OpenCL C Specification 6.3.7. Vector Components
209
- // The suffixes .lo (or .even) and .hi (or .odd) for a 3-component vector type
210
- // operate as if the 3-component vector type is a 4-component vector type with
211
- // the value in the w component undefined.
212
- a = c.hi ;
213
-
214
- // CIR-NEXT: %[[#VECC:]] = cir.load %[[#PVECC]] : !cir.ptr<!cir.vector<!s32i x 7>>, !cir.vector<!s32i x 7>
215
- // CIR-NEXT: %[[#HIPART:]] = cir.vec.shuffle(%[[#VECC]], %[[#VECC]] : !cir.vector<!s32i x 7>) [#cir.int<4> : !s32i, #cir.int<5> : !s32i, #cir.int<6> : !s32i, #cir.int<7> : !s32i] : !cir.vector<!s32i x 4>
216
- // CIR-NEXT: cir.store %[[#HIPART]], %{{[0-9]+}} : !cir.vector<!s32i x 4>, !cir.ptr<!cir.vector<!s32i x 4>>
217
-
218
- // LLVM-NEXT: %[[#VECC:]] = load <7 x i32>, ptr %[[#PVECC]], align 32
219
- // LLVM-NEXT: %[[#HIPART:]] = shufflevector <7 x i32> %[[#VECC]], <7 x i32> %[[#VECC]], <4 x i32> <i32 4, i32 5, i32 6, i32 7>
220
- // LLVM-NEXT: store <4 x i32> %[[#HIPART]], ptr %{{[0-9]+}}, align 16
221
-
222
201
}
223
202
224
203
// CIR: cir.func {{@.*test_store.*}}
@@ -232,10 +211,6 @@ void test_store() {
232
211
// CIR-NEXT: %[[#PVECB:]] = cir.alloca !cir.vector<!s32i x 2>
233
212
// LLVM-NEXT: %[[#PVECB:]] = alloca <2 x i32>
234
213
235
- vi7 c = {};
236
- // CIR-NEXT: %[[#PVECC:]] = cir.alloca !cir.vector<!s32i x 7>
237
- // LLVM-NEXT: %[[#PVECC:]] = alloca <7 x i32>
238
-
239
214
a.xy = b;
240
215
// CIR: %[[#LOAD4RHS:]] = cir.load %{{[0-9]+}} : !cir.ptr<!cir.vector<!s32i x 2>>, !cir.vector<!s32i x 2>
241
216
// CIR-NEXT: %[[#LOAD5LHS:]] = cir.load %{{[0-9]+}} : !cir.ptr<!cir.vector<!s32i x 4>>, !cir.vector<!s32i x 4>
@@ -275,20 +250,6 @@ void test_store() {
275
250
// LLVM-NEXT: %[[#RESULT:]] = shufflevector <4 x i32> %[[#VECA]], <4 x i32> %[[#EXTVECB]], <4 x i32> <i32 4, i32 5, i32 2, i32 3>
276
251
// LLVM-NEXT: store <4 x i32> %[[#RESULT]], ptr %[[#PVECA]], align 16
277
252
278
- // c.hi is c[4, 5, 6, 7], in which 7 should be ignored in CIRGen for store
279
- c.hi = a;
280
-
281
- // CIR-NEXT: %[[#VECA:]] = cir.load %[[#PVECA]] : !cir.ptr<!cir.vector<!s32i x 4>>, !cir.vector<!s32i x 4>
282
- // CIR-NEXT: %[[#VECC:]] = cir.load %[[#PVECC]] : !cir.ptr<!cir.vector<!s32i x 7>>, !cir.vector<!s32i x 7>
283
- // CIR-NEXT: %[[#EXTVECA:]] = cir.vec.shuffle(%[[#VECA]], %[[#VECA]] : !cir.vector<!s32i x 4>) [#cir.int<0> : !s32i, #cir.int<1> : !s32i, #cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<-1> : !s32i, #cir.int<-1> : !s32i, #cir.int<-1> : !s32i] : !cir.vector<!s32i x 7>
284
- // CIR-NEXT: %[[#RESULT:]] = cir.vec.shuffle(%[[#VECC]], %[[#EXTVECA]] : !cir.vector<!s32i x 7>) [#cir.int<0> : !s32i, #cir.int<1> : !s32i, #cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<7> : !s32i, #cir.int<8> : !s32i, #cir.int<9> : !s32i] : !cir.vector<!s32i x 7>
285
- // CIR-NEXT: cir.store %[[#RESULT]], %[[#PVECC]] : !cir.vector<!s32i x 7>, !cir.ptr<!cir.vector<!s32i x 7>>
286
-
287
- // LLVM-NEXT: %[[#VECA:]] = load <4 x i32>, ptr %[[#PVECA]], align 16
288
- // LLVM-NEXT: %[[#VECC:]] = load <7 x i32>, ptr %[[#PVECC]], align 32
289
- // LLVM-NEXT: %[[#EXTVECA:]] = shufflevector <4 x i32> %[[#VECA]], <4 x i32> %[[#VECA]], <7 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison>
290
- // LLVM-NEXT: %[[#RESULT:]] = shufflevector <7 x i32> %[[#VECC]], <7 x i32> %[[#EXTVECA]], <7 x i32> <i32 0, i32 1, i32 2, i32 3, i32 7, i32 8, i32 9>
291
- // LLVM-NEXT: store <7 x i32> %[[#RESULT]], ptr %[[#PVECC]], align 32
292
253
}
293
254
294
255
// CIR: cir.func {{@.*test_build_lvalue.*}}
0 commit comments