Skip to content

Commit 56a6ff3

Browse files
committed
Add test for instructions from store to ret
1 parent 17b0b72 commit 56a6ff3

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

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

+16-8
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,8 @@ uint8x8x2_t test_vzip_u8(uint8x8_t a, uint8x8_t b) {
503503
// LLVM: [[RES1:%.*]] = getelementptr {{.*}}<8 x i8>, ptr [[RES]], i64 1
504504
// LLVM: [[VTRN1:%.*]] = shufflevector <8 x i8> [[A]], <8 x i8> [[B]], <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
505505
// LLVM: store <8 x i8> [[VTRN1]], ptr [[RES1]], align 8
506-
// LLVM: ret %struct.uint8x8x2_t {{.*}}
506+
// LLVM-NEXT: [[RET:%.*]] = load %struct.uint8x8x2_t, ptr {{.*}}
507+
// LLVM-NEXT: ret %struct.uint8x8x2_t [[RET]]
507508
}
508509

509510
uint16x4x2_t test_vzip_u16(uint16x4_t a, uint16x4_t b) {
@@ -531,7 +532,8 @@ uint16x4x2_t test_vzip_u16(uint16x4_t a, uint16x4_t b) {
531532
// LLVM: [[vzip1:%.*]] = shufflevector <4 x i16> [[A]], <4 x i16> [[B]],
532533
// LLVM-SAME: <4 x i32> <i32 2, i32 6, i32 3, i32 7>
533534
// LLVM: store <4 x i16> [[vzip1]], ptr [[RES1]], align 8
534-
// LLVM: ret %struct.uint16x4x2_t {{.*}}
535+
// LLVM-NEXT: [[RET:%.*]] = load %struct.uint16x4x2_t, ptr {{.*}}
536+
// LLVM-NEXT: ret %struct.uint16x4x2_t [[RET]]
535537
}
536538

537539
int32x2x2_t test_vzip_s32(int32x2_t a, int32x2_t b) {
@@ -559,7 +561,8 @@ int32x2x2_t test_vzip_s32(int32x2_t a, int32x2_t b) {
559561
// LLVM: [[vzip1:%.*]] = shufflevector <2 x i32> [[A]], <2 x i32> [[B]],
560562
// LLVM-SAME: <2 x i32> <i32 1, i32 3>
561563
// LLVM: store <2 x i32> [[vzip1]], ptr [[RES1]], align 8
562-
// LLVM: ret %struct.int32x2x2_t {{.*}}
564+
// LLVM-NEXT: [[RET:%.*]] = load %struct.int32x2x2_t, ptr {{.*}}
565+
// LLVM-NEXT: ret %struct.int32x2x2_t [[RET]]
563566
}
564567

565568
float32x2x2_t test_vzip_f32(float32x2_t a, float32x2_t b) {
@@ -587,7 +590,8 @@ float32x2x2_t test_vzip_f32(float32x2_t a, float32x2_t b) {
587590
// LLVM: [[vzip1:%.*]] = shufflevector <2 x float> [[A]], <2 x float> [[B]],
588591
// LLVM-SAME: <2 x i32> <i32 1, i32 3>
589592
// LLVM: store <2 x float> [[vzip1]], ptr [[RES1]], align 8
590-
// LLVM: ret %struct.float32x2x2_t {{.*}}
593+
// LLVM-NEXT: [[RET:%.*]] = load %struct.float32x2x2_t, ptr {{.*}}
594+
// LLVM-NEXT: ret %struct.float32x2x2_t [[RET]]
591595
}
592596

593597
uint8x16x2_t test_vzipq_u8(uint8x16_t a, uint8x16_t b) {
@@ -622,7 +626,8 @@ uint8x16x2_t test_vzipq_u8(uint8x16_t a, uint8x16_t b) {
622626
// LLVM-SAME: <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27,
623627
// LLVM-SAME: i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
624628
// LLVM: store <16 x i8> [[vzip1]], ptr [[RES1]], align 16
625-
// LLVM: ret %struct.uint8x16x2_t {{.*}}
629+
// LLVM-NEXT: [[RET:%.*]] = load %struct.uint8x16x2_t, ptr {{.*}}
630+
// LLVM-NEXT: ret %struct.uint8x16x2_t [[RET]]
626631
}
627632

628633
int16x8x2_t test_vzipq_s16(int16x8_t a, int16x8_t b) {
@@ -652,7 +657,8 @@ int16x8x2_t test_vzipq_s16(int16x8_t a, int16x8_t b) {
652657
// LLVM: [[RES1:%.*]] = getelementptr {{.*}}<8 x i16>, ptr [[RES]], i64 1
653658
// LLVM: [[vzip1:%.*]] = shufflevector <8 x i16> [[A]], <8 x i16> [[B]], <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
654659
// LLVM: store <8 x i16> [[vzip1]], ptr [[RES1]], align 16
655-
// LLVM: ret %struct.int16x8x2_t {{.*}}
660+
// LLVM-NEXT: [[RET:%.*]] = load %struct.int16x8x2_t, ptr {{.*}}
661+
// LLVM-NEXT: ret %struct.int16x8x2_t [[RET]]
656662
}
657663

658664
uint32x4x2_t test_vzipq_u32(uint32x4_t a, uint32x4_t b) {
@@ -672,7 +678,8 @@ uint32x4x2_t test_vzipq_u32(uint32x4_t a, uint32x4_t b) {
672678
// CIR-SAME: [#cir.int<2> : !s32i, #cir.int<6> : !s32i, #cir.int<3> : !s32i, #cir.int<7> : !s32i] :
673679
// CIR-SAME: !cir.vector<!u32i x 4>
674680
// CIR: cir.store [[RES1]], [[ADDR1]] : !cir.vector<!u32i x 4>, !cir.ptr<!cir.vector<!u32i x 4>>
675-
// LLVM: ret %struct.uint32x4x2_t {{.*}}
681+
// LLVM: [[RET:%.*]] = load %struct.uint32x4x2_t, ptr {{.*}}
682+
// LLVM: ret %struct.uint32x4x2_t [[RET]]
676683
}
677684

678685
float32x4x2_t test_vzipq_f32(float32x4_t a, float32x4_t b) {
@@ -692,7 +699,8 @@ float32x4x2_t test_vzipq_f32(float32x4_t a, float32x4_t b) {
692699
// CIR-SAME: [#cir.int<2> : !s32i, #cir.int<6> : !s32i, #cir.int<3> : !s32i, #cir.int<7> : !s32i] :
693700
// CIR-SAME: !cir.vector<!cir.float x 4>
694701
// CIR: cir.store [[RES1]], [[ADDR1]] : !cir.vector<!cir.float x 4>, !cir.ptr<!cir.vector<!cir.float x 4>>
695-
// LLVM: ret %struct.float32x4x2_t {{.*}}
702+
// LLVM: [[RET:%.*]] = load %struct.float32x4x2_t, ptr {{.*}}
703+
// LLVM: ret %struct.float32x4x2_t [[RET]]
696704
}
697705

698706
uint8x8_t test_vqmovun_s16(int16x8_t a) {

0 commit comments

Comments
 (0)