Skip to content

Commit ac27a18

Browse files
committed
[CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910)
as title. --------- Co-authored-by: Guojin He <[email protected]>
1 parent 2ca12fe commit ac27a18

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

clang/test/CIR/CodeGen/AArch64/neon-misc.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ uint8_t test_vget_lane_u8(uint8x8_t a) {
261261
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u8i x 8>
262262

263263
// LLVM: define dso_local i8 @test_vget_lane_u8(<8 x i8> [[ARG:%.*]])
264+
<<<<<<< HEAD
264265
// LLVM: alloca <8 x i8>
266+
=======
267+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
265268
// LLVM: [[ARG_SAVE:%.*]] = alloca <8 x i8>, i64 1, align 8
266269
// LLVM: store <8 x i8> [[ARG]], ptr [[ARG_SAVE]], align 8
267270
// LLVM: [[TMP:%.*]] = load <8 x i8>, ptr [[ARG_SAVE:%.*]], align 8
@@ -279,7 +282,10 @@ uint8_t test_vgetq_lane_u8(uint8x16_t a) {
279282
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u8i x 16>
280283

281284
// LLVM: define dso_local i8 @test_vgetq_lane_u8(<16 x i8> [[ARG:%.*]])
285+
<<<<<<< HEAD
282286
// LLVM: alloca <16 x i8>
287+
=======
288+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
283289
// LLVM: [[ARG_SAVE:%.*]] = alloca <16 x i8>, i64 1, align 16
284290
// LLVM: store <16 x i8> [[ARG]], ptr [[ARG_SAVE]], align 16
285291
// LLVM: [[TMP:%.*]] = load <16 x i8>, ptr [[ARG_SAVE:%.*]], align 16
@@ -297,7 +303,10 @@ uint16_t test_vget_lane_u16(uint16x4_t a) {
297303
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u16i x 4>
298304

299305
// LLVM: define dso_local i16 @test_vget_lane_u16(<4 x i16> [[ARG:%.*]])
306+
<<<<<<< HEAD
300307
// LLVM: alloca <4 x i16>
308+
=======
309+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
301310
// LLVM: [[ARG_SAVE:%.*]] = alloca <4 x i16>, i64 1, align 8
302311
// LLVM: store <4 x i16> [[ARG]], ptr [[ARG_SAVE]], align 8
303312
// LLVM: [[TMP:%.*]] = load <4 x i16>, ptr [[ARG_SAVE:%.*]], align 8
@@ -315,7 +324,10 @@ uint16_t test_vgetq_lane_u16(uint16x8_t a) {
315324
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u16i x 8>
316325

317326
// LLVM: define dso_local i16 @test_vgetq_lane_u16(<8 x i16> [[ARG:%.*]])
327+
<<<<<<< HEAD
318328
// LLVM: alloca <8 x i16>
329+
=======
330+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
319331
// LLVM: [[ARG_SAVE:%.*]] = alloca <8 x i16>, i64 1, align 16
320332
// LLVM: store <8 x i16> [[ARG]], ptr [[ARG_SAVE]], align 16
321333
// LLVM: [[TMP:%.*]] = load <8 x i16>, ptr [[ARG_SAVE:%.*]], align 16
@@ -333,7 +345,10 @@ uint32_t test_vget_lane_u32(uint32x2_t a) {
333345
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u32i x 2>
334346

335347
// LLVM: define dso_local i32 @test_vget_lane_u32(<2 x i32> [[ARG:%.*]])
348+
<<<<<<< HEAD
336349
// LLVM: alloca <2 x i32>
350+
=======
351+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
337352
// LLVM: [[ARG_SAVE:%.*]] = alloca <2 x i32>, i64 1, align 8
338353
// LLVM: store <2 x i32> [[ARG]], ptr [[ARG_SAVE]], align 8
339354
// LLVM: [[TMP:%.*]] = load <2 x i32>, ptr [[ARG_SAVE:%.*]], align 8
@@ -351,7 +366,10 @@ uint32_t test_vgetq_lane_u32(uint32x4_t a) {
351366
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u32i x 4>
352367

353368
// LLVM: define dso_local i32 @test_vgetq_lane_u32(<4 x i32> [[ARG:%.*]])
369+
<<<<<<< HEAD
354370
// LLVM: alloca <4 x i32>
371+
=======
372+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
355373
// LLVM: [[ARG_SAVE:%.*]] = alloca <4 x i32>, i64 1, align 16
356374
// LLVM: store <4 x i32> [[ARG]], ptr [[ARG_SAVE]], align 16
357375
// LLVM: [[TMP:%.*]] = load <4 x i32>, ptr [[ARG_SAVE:%.*]], align 16
@@ -369,7 +387,10 @@ uint64_t test_vget_lane_u64(uint64x1_t a) {
369387
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u64i x 1>
370388

371389
// LLVM: define dso_local i64 @test_vget_lane_u64(<1 x i64> [[ARG:%.*]])
390+
<<<<<<< HEAD
372391
// LLVM: alloca <1 x i64>
392+
=======
393+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
373394
// LLVM: [[ARG_SAVE:%.*]] = alloca <1 x i64>, i64 1, align 8
374395
// LLVM: store <1 x i64> [[ARG]], ptr [[ARG_SAVE]], align 8
375396
// LLVM: [[TMP:%.*]] = load <1 x i64>, ptr [[ARG_SAVE:%.*]], align 8
@@ -387,7 +408,10 @@ uint64_t test_vgetq_lane_u64(uint64x2_t a) {
387408
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u64i x 2>
388409

389410
// LLVM: define dso_local i64 @test_vgetq_lane_u64(<2 x i64> [[ARG:%.*]])
411+
<<<<<<< HEAD
390412
// LLVM: alloca <2 x i64>
413+
=======
414+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
391415
// LLVM: [[ARG_SAVE:%.*]] = alloca <2 x i64>, i64 1, align 16
392416
// LLVM: store <2 x i64> [[ARG]], ptr [[ARG_SAVE]], align 16
393417
// LLVM: [[TMP:%.*]] = load <2 x i64>, ptr [[ARG_SAVE:%.*]], align 16
@@ -405,7 +429,10 @@ float32_t test_vget_lane_f32(float32x2_t a) {
405429
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!cir.float x 2>
406430

407431
// LLVM: define dso_local float @test_vget_lane_f32(<2 x float> [[ARG:%.*]])
432+
<<<<<<< HEAD
408433
// LLVM: alloca <2 x float>
434+
=======
435+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
409436
// LLVM: [[ARG_SAVE:%.*]] = alloca <2 x float>, i64 1, align 8
410437
// LLVM: store <2 x float> [[ARG]], ptr [[ARG_SAVE]], align 8
411438
// LLVM: [[TMP:%.*]] = load <2 x float>, ptr [[ARG_SAVE:%.*]], align 8
@@ -423,7 +450,10 @@ float64_t test_vget_lane_f64(float64x1_t a) {
423450
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!cir.double x 1>
424451

425452
// LLVM: define dso_local double @test_vget_lane_f64(<1 x double> [[ARG:%.*]])
453+
<<<<<<< HEAD
426454
// LLVM: alloca <1 x double>
455+
=======
456+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
427457
// LLVM: [[ARG_SAVE:%.*]] = alloca <1 x double>, i64 1, align 8
428458
// LLVM: store <1 x double> [[ARG]], ptr [[ARG_SAVE]], align 8
429459
// LLVM: [[TMP:%.*]] = load <1 x double>, ptr [[ARG_SAVE:%.*]], align 8
@@ -441,7 +471,10 @@ float32_t test_vgetq_lane_f32(float32x4_t a) {
441471
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!cir.float x 4>
442472

443473
// LLVM: define dso_local float @test_vgetq_lane_f32(<4 x float> [[ARG:%.*]])
474+
<<<<<<< HEAD
444475
// LLVM: alloca <4 x float>
476+
=======
477+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
445478
// LLVM: [[ARG_SAVE:%.*]] = alloca <4 x float>, i64 1, align 16
446479
// LLVM: store <4 x float> [[ARG]], ptr [[ARG_SAVE]], align 16
447480
// LLVM: [[TMP:%.*]] = load <4 x float>, ptr [[ARG_SAVE:%.*]], align 16
@@ -459,7 +492,10 @@ float64_t test_vgetq_lane_f64(float64x2_t a) {
459492
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!cir.double x 2>
460493

461494
// LLVM: define dso_local double @test_vgetq_lane_f64(<2 x double> [[ARG:%.*]])
495+
<<<<<<< HEAD
462496
// LLVM: alloca <2 x double>
497+
=======
498+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
463499
// LLVM: [[ARG_SAVE:%.*]] = alloca <2 x double>, i64 1, align 16
464500
// LLVM: store <2 x double> [[ARG]], ptr [[ARG_SAVE]], align 16
465501
// LLVM: [[TMP:%.*]] = load <2 x double>, ptr [[ARG_SAVE:%.*]], align 16

clang/test/CIR/CodeGen/AArch64/neon.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6008,7 +6008,13 @@ uint8x8_t test_vqrshrun_n_s16(int16x8_t a) {
60086008
// LLVM: [[TMP0:%.*]] = bitcast <8 x i16> {{%.*}} to <16 x i8>
60096009
// LLVM: [[VQRSHRUN_N:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16>
60106010
// LLVM: [[VQRSHRUN_N1:%.*]] = call <8 x i8> @llvm.aarch64.neon.sqrshrun.v8i8(<8 x i16> [[VQRSHRUN_N]], i32 3)
6011+
<<<<<<< HEAD
60116012
// LLVM: ret <8 x i8> [[VQRSHRUN_N1]]
6013+
=======
6014+
// LLVM: store <8 x i8> [[VQRSHRUN_N1]], ptr [[RET:%.*]], align 8
6015+
// LLVM: [[RETVAL:%.*]] = load <8 x i8>, ptr [[RET]], align 8
6016+
// LLVM: ret <8 x i8> [[RETVAL]]
6017+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
60126018
}
60136019

60146020
uint16x4_t test_vqrshrun_n_s32(int32x4_t a) {
@@ -6023,7 +6029,13 @@ uint16x4_t test_vqrshrun_n_s32(int32x4_t a) {
60236029
// LLVM: [[TMP0:%.*]] = bitcast <4 x i32> {{%.*}} to <16 x i8>
60246030
// LLVM: [[VQRSHRUN_N:%.*]] = bitcast <16 x i8> [[TMP0]] to <4 x i32>
60256031
// LLVM: [[VQRSHRUN_N1:%.*]] = call <4 x i16> @llvm.aarch64.neon.sqrshrun.v4i16(<4 x i32> [[VQRSHRUN_N]], i32 9)
6032+
<<<<<<< HEAD
60266033
// LLVM: ret <4 x i16> [[VQRSHRUN_N1]]
6034+
=======
6035+
// LLVM: store <4 x i16> [[VQRSHRUN_N1]], ptr [[RET:%.*]], align 8
6036+
// LLVM: [[RETVAL:%.*]] = load <4 x i16>, ptr [[RET]], align 8
6037+
// LLVM: ret <4 x i16> [[RETVAL]]
6038+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
60276039
}
60286040

60296041
uint32x2_t test_vqrshrun_n_s64(int64x2_t a) {
@@ -6038,7 +6050,13 @@ uint32x2_t test_vqrshrun_n_s64(int64x2_t a) {
60386050
// LLVM: [[TMP0:%.*]] = bitcast <2 x i64> {{%.*}} to <16 x i8>
60396051
// LLVM: [[VQRSHRUN_N:%.*]] = bitcast <16 x i8> [[TMP0]] to <2 x i64>
60406052
// LLVM: [[VQRSHRUN_N1:%.*]] = call <2 x i32> @llvm.aarch64.neon.sqrshrun.v2i32(<2 x i64> [[VQRSHRUN_N]], i32 19)
6053+
<<<<<<< HEAD
60416054
// LLVM: ret <2 x i32> [[VQRSHRUN_N1]]
6055+
=======
6056+
// LLVM: store <2 x i32> [[VQRSHRUN_N1]], ptr [[RET:%.*]], align 8
6057+
// LLVM: [[RETVAL:%.*]] = load <2 x i32>, ptr [[RET]], align 8
6058+
// LLVM: ret <2 x i32> [[RETVAL]]
6059+
>>>>>>> 1cd59442d8cf ([CIR][Test][NFC] Organize CIR CodeGen AArch64 neon tests (#910))
60426060
}
60436061

60446062
// NYI-LABEL: @test_vqrshrun_high_n_s16(

0 commit comments

Comments
 (0)