Skip to content

Commit b8c9ebf

Browse files
committed
[AArch64] Regenerate concat_vector-truncate-combine.ll tests
1 parent 2237053 commit b8c9ebf

File tree

1 file changed

+41
-32
lines changed

1 file changed

+41
-32
lines changed

llvm/test/CodeGen/AArch64/concat_vector-truncate-combine.ll

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,90 @@
1-
; RUN: llc < %s -mtriple arm64-apple-darwin -asm-verbose=false | FileCheck %s
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
; RUN: llc < %s -mtriple arm64-- | FileCheck %s
23

34
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
45

56
; Test the (concat_vectors (trunc), (trunc)) pattern.
67

78
define <4 x i16> @test_concat_truncate_v2i64_to_v4i16(<2 x i64> %a, <2 x i64> %b) #0 {
8-
entry:
99
; CHECK-LABEL: test_concat_truncate_v2i64_to_v4i16:
10-
; CHECK-NEXT: uzp1.4s v0, v0, v1
11-
; CHECK-NEXT: xtn.4h v0, v0
12-
; CHECK-NEXT: ret
10+
; CHECK: // %bb.0: // %entry
11+
; CHECK-NEXT: uzp1 v0.4s, v0.4s, v1.4s
12+
; CHECK-NEXT: xtn v0.4h, v0.4s
13+
; CHECK-NEXT: ret
14+
entry:
1315
%at = trunc <2 x i64> %a to <2 x i16>
1416
%bt = trunc <2 x i64> %b to <2 x i16>
1517
%shuffle = shufflevector <2 x i16> %at, <2 x i16> %bt, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1618
ret <4 x i16> %shuffle
1719
}
1820

1921
define <4 x i32> @test_concat_truncate_v2i64_to_v4i32(<2 x i64> %a, <2 x i64> %b) #0 {
20-
entry:
2122
; CHECK-LABEL: test_concat_truncate_v2i64_to_v4i32:
22-
; CHECK-NEXT: uzp1.4s v0, v0, v1
23-
; CHECK-NEXT: ret
23+
; CHECK: // %bb.0: // %entry
24+
; CHECK-NEXT: uzp1 v0.4s, v0.4s, v1.4s
25+
; CHECK-NEXT: ret
26+
entry:
2427
%at = trunc <2 x i64> %a to <2 x i32>
2528
%bt = trunc <2 x i64> %b to <2 x i32>
2629
%shuffle = shufflevector <2 x i32> %at, <2 x i32> %bt, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2730
ret <4 x i32> %shuffle
2831
}
2932

3033
define <4 x i16> @test_concat_truncate_v2i32_to_v4i16(<2 x i32> %a, <2 x i32> %b) #0 {
31-
entry:
3234
; CHECK-LABEL: test_concat_truncate_v2i32_to_v4i16:
33-
; CHECK-NEXT: uzp1.4h v0, v0, v1
34-
; CHECK-NEXT: ret
35+
; CHECK: // %bb.0: // %entry
36+
; CHECK-NEXT: uzp1 v0.4h, v0.4h, v1.4h
37+
; CHECK-NEXT: ret
38+
entry:
3539
%at = trunc <2 x i32> %a to <2 x i16>
3640
%bt = trunc <2 x i32> %b to <2 x i16>
3741
%shuffle = shufflevector <2 x i16> %at, <2 x i16> %bt, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
3842
ret <4 x i16> %shuffle
3943
}
4044

4145
define <8 x i8> @test_concat_truncate_v4i32_to_v8i8(<4 x i32> %a, <4 x i32> %b) #0 {
42-
entry:
4346
; CHECK-LABEL: test_concat_truncate_v4i32_to_v8i8:
44-
; CHECK-NEXT: uzp1.8h v0, v0, v1
45-
; CHECK-NEXT: xtn.8b v0, v0
46-
; CHECK-NEXT: ret
47+
; CHECK: // %bb.0: // %entry
48+
; CHECK-NEXT: uzp1 v0.8h, v0.8h, v1.8h
49+
; CHECK-NEXT: xtn v0.8b, v0.8h
50+
; CHECK-NEXT: ret
51+
entry:
4752
%at = trunc <4 x i32> %a to <4 x i8>
4853
%bt = trunc <4 x i32> %b to <4 x i8>
4954
%shuffle = shufflevector <4 x i8> %at, <4 x i8> %bt, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
5055
ret <8 x i8> %shuffle
5156
}
5257

5358
define <8 x i16> @test_concat_truncate_v4i32_to_v8i16(<4 x i32> %a, <4 x i32> %b) #0 {
54-
entry:
5559
; CHECK-LABEL: test_concat_truncate_v4i32_to_v8i16:
56-
; CHECK-NEXT: uzp1.8h v0, v0, v1
57-
; CHECK-NEXT: ret
60+
; CHECK: // %bb.0: // %entry
61+
; CHECK-NEXT: uzp1 v0.8h, v0.8h, v1.8h
62+
; CHECK-NEXT: ret
63+
entry:
5864
%at = trunc <4 x i32> %a to <4 x i16>
5965
%bt = trunc <4 x i32> %b to <4 x i16>
6066
%shuffle = shufflevector <4 x i16> %at, <4 x i16> %bt, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
6167
ret <8 x i16> %shuffle
6268
}
6369

6470
define <8 x i8> @test_concat_truncate_v4i16_to_v8i8(<4 x i16> %a, <4 x i16> %b) #0 {
65-
entry:
6671
; CHECK-LABEL: test_concat_truncate_v4i16_to_v8i8:
67-
; CHECK-NEXT: uzp1.8b v0, v0, v1
68-
; CHECK-NEXT: ret
72+
; CHECK: // %bb.0: // %entry
73+
; CHECK-NEXT: uzp1 v0.8b, v0.8b, v1.8b
74+
; CHECK-NEXT: ret
75+
entry:
6976
%at = trunc <4 x i16> %a to <4 x i8>
7077
%bt = trunc <4 x i16> %b to <4 x i8>
7178
%shuffle = shufflevector <4 x i8> %at, <4 x i8> %bt, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
7279
ret <8 x i8> %shuffle
7380
}
7481

7582
define <16 x i8> @test_concat_truncate_v8i16_to_v16i8(<8 x i16> %a, <8 x i16> %b) #0 {
76-
entry:
7783
; CHECK-LABEL: test_concat_truncate_v8i16_to_v16i8:
78-
; CHECK-NEXT: uzp1.16b v0, v0, v1
79-
; CHECK-NEXT: ret
84+
; CHECK: // %bb.0: // %entry
85+
; CHECK-NEXT: uzp1 v0.16b, v0.16b, v1.16b
86+
; CHECK-NEXT: ret
87+
entry:
8088
%at = trunc <8 x i16> %a to <8 x i8>
8189
%bt = trunc <8 x i16> %b to <8 x i8>
8290
%shuffle = shufflevector <8 x i8> %at, <8 x i8> %bt, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
@@ -86,15 +94,16 @@ entry:
8694
; The concat_vectors operation in this test is introduced when splitting
8795
; the fptrunc operation due to the split <vscale x 4 x double> input operand.
8896
define void @test_concat_fptrunc_v4f64_to_v4f32(<vscale x 4 x float>* %ptr) #1 {
89-
entry:
9097
; CHECK-LABEL: test_concat_fptrunc_v4f64_to_v4f32:
91-
; CHECK: fmov z0.d, #1.00000000
92-
; CHECK-NEXT: ptrue p0.d
93-
; CHECK-NEXT: fcvt z0.s, p0/m, z0.d
94-
; CHECK-NEXT: ptrue p0.s
95-
; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
96-
; CHECK-NEXT: st1w { z0.s }, p0, [x0]
97-
; CHECK-NEXT: ret
98+
; CHECK: // %bb.0: // %entry
99+
; CHECK-NEXT: fmov z0.d, #1.00000000
100+
; CHECK-NEXT: ptrue p0.d
101+
; CHECK-NEXT: fcvt z0.s, p0/m, z0.d
102+
; CHECK-NEXT: ptrue p0.s
103+
; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
104+
; CHECK-NEXT: st1w { z0.s }, p0, [x0]
105+
; CHECK-NEXT: ret
106+
entry:
98107
%0 = shufflevector <vscale x 4 x double> insertelement (<vscale x 4 x double> poison, double 1.000000e+00, i32 0), <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
99108
%1 = fptrunc <vscale x 4 x double> %0 to <vscale x 4 x float>
100109
store <vscale x 4 x float> %1, <vscale x 4 x float>* %ptr, align 4

0 commit comments

Comments
 (0)