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
2
3
3
4
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
4
5
5
6
; Test the (concat_vectors (trunc), (trunc)) pattern.
6
7
7
8
define <4 x i16 > @test_concat_truncate_v2i64_to_v4i16 (<2 x i64 > %a , <2 x i64 > %b ) #0 {
8
- entry:
9
9
; 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:
13
15
%at = trunc <2 x i64 > %a to <2 x i16 >
14
16
%bt = trunc <2 x i64 > %b to <2 x i16 >
15
17
%shuffle = shufflevector <2 x i16 > %at , <2 x i16 > %bt , <4 x i32 > <i32 0 , i32 1 , i32 2 , i32 3 >
16
18
ret <4 x i16 > %shuffle
17
19
}
18
20
19
21
define <4 x i32 > @test_concat_truncate_v2i64_to_v4i32 (<2 x i64 > %a , <2 x i64 > %b ) #0 {
20
- entry:
21
22
; 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:
24
27
%at = trunc <2 x i64 > %a to <2 x i32 >
25
28
%bt = trunc <2 x i64 > %b to <2 x i32 >
26
29
%shuffle = shufflevector <2 x i32 > %at , <2 x i32 > %bt , <4 x i32 > <i32 0 , i32 1 , i32 2 , i32 3 >
27
30
ret <4 x i32 > %shuffle
28
31
}
29
32
30
33
define <4 x i16 > @test_concat_truncate_v2i32_to_v4i16 (<2 x i32 > %a , <2 x i32 > %b ) #0 {
31
- entry:
32
34
; 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:
35
39
%at = trunc <2 x i32 > %a to <2 x i16 >
36
40
%bt = trunc <2 x i32 > %b to <2 x i16 >
37
41
%shuffle = shufflevector <2 x i16 > %at , <2 x i16 > %bt , <4 x i32 > <i32 0 , i32 1 , i32 2 , i32 3 >
38
42
ret <4 x i16 > %shuffle
39
43
}
40
44
41
45
define <8 x i8 > @test_concat_truncate_v4i32_to_v8i8 (<4 x i32 > %a , <4 x i32 > %b ) #0 {
42
- entry:
43
46
; 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:
47
52
%at = trunc <4 x i32 > %a to <4 x i8 >
48
53
%bt = trunc <4 x i32 > %b to <4 x i8 >
49
54
%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 >
50
55
ret <8 x i8 > %shuffle
51
56
}
52
57
53
58
define <8 x i16 > @test_concat_truncate_v4i32_to_v8i16 (<4 x i32 > %a , <4 x i32 > %b ) #0 {
54
- entry:
55
59
; 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:
58
64
%at = trunc <4 x i32 > %a to <4 x i16 >
59
65
%bt = trunc <4 x i32 > %b to <4 x i16 >
60
66
%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 >
61
67
ret <8 x i16 > %shuffle
62
68
}
63
69
64
70
define <8 x i8 > @test_concat_truncate_v4i16_to_v8i8 (<4 x i16 > %a , <4 x i16 > %b ) #0 {
65
- entry:
66
71
; 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:
69
76
%at = trunc <4 x i16 > %a to <4 x i8 >
70
77
%bt = trunc <4 x i16 > %b to <4 x i8 >
71
78
%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 >
72
79
ret <8 x i8 > %shuffle
73
80
}
74
81
75
82
define <16 x i8 > @test_concat_truncate_v8i16_to_v16i8 (<8 x i16 > %a , <8 x i16 > %b ) #0 {
76
- entry:
77
83
; 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:
80
88
%at = trunc <8 x i16 > %a to <8 x i8 >
81
89
%bt = trunc <8 x i16 > %b to <8 x i8 >
82
90
%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:
86
94
; The concat_vectors operation in this test is introduced when splitting
87
95
; the fptrunc operation due to the split <vscale x 4 x double> input operand.
88
96
define void @test_concat_fptrunc_v4f64_to_v4f32 (<vscale x 4 x float >* %ptr ) #1 {
89
- entry:
90
97
; 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:
98
107
%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
99
108
%1 = fptrunc <vscale x 4 x double > %0 to <vscale x 4 x float >
100
109
store <vscale x 4 x float > %1 , <vscale x 4 x float >* %ptr , align 4
0 commit comments