Skip to content

Commit 624d1e9

Browse files
committed
Precommit tests
1 parent a557861 commit 624d1e9

File tree

1 file changed

+227
-0
lines changed

1 file changed

+227
-0
lines changed
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
3+
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=128 -aarch64-sve-vector-bits-max=128 < %s | FileCheck %s --check-prefix=CHECK-128
4+
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=256 -aarch64-sve-vector-bits-max=256 < %s | FileCheck %s --check-prefix=CHECK-256
5+
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=512 -aarch64-sve-vector-bits-max=512 < %s | FileCheck %s --check-prefix=CHECK-512
6+
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=1024 -aarch64-sve-vector-bits-max=1024 < %s | FileCheck %s --check-prefix=CHECK-1024
7+
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=2048 -aarch64-sve-vector-bits-max=2048 < %s | FileCheck %s --check-prefix=CHECK-2048
8+
9+
define void @nxv16i8(ptr %ldptr, ptr %stptr) {
10+
; CHECK-LABEL: nxv16i8:
11+
; CHECK: // %bb.0:
12+
; CHECK-NEXT: ptrue p0.b
13+
; CHECK-NEXT: mov w8, #256 // =0x100
14+
; CHECK-NEXT: ld1b { z0.b }, p0/z, [x0, x8]
15+
; CHECK-NEXT: st1b { z0.b }, p0, [x1, x8]
16+
; CHECK-NEXT: ret
17+
;
18+
; CHECK-128-LABEL: nxv16i8:
19+
; CHECK-128: // %bb.0:
20+
; CHECK-128-NEXT: ptrue p0.b
21+
; CHECK-128-NEXT: mov w8, #256 // =0x100
22+
; CHECK-128-NEXT: ld1b { z0.b }, p0/z, [x0, x8]
23+
; CHECK-128-NEXT: st1b { z0.b }, p0, [x1, x8]
24+
; CHECK-128-NEXT: ret
25+
;
26+
; CHECK-256-LABEL: nxv16i8:
27+
; CHECK-256: // %bb.0:
28+
; CHECK-256-NEXT: ptrue p0.b
29+
; CHECK-256-NEXT: mov w8, #256 // =0x100
30+
; CHECK-256-NEXT: ld1b { z0.b }, p0/z, [x0, x8]
31+
; CHECK-256-NEXT: st1b { z0.b }, p0, [x1, x8]
32+
; CHECK-256-NEXT: ret
33+
;
34+
; CHECK-512-LABEL: nxv16i8:
35+
; CHECK-512: // %bb.0:
36+
; CHECK-512-NEXT: ptrue p0.b
37+
; CHECK-512-NEXT: mov w8, #256 // =0x100
38+
; CHECK-512-NEXT: ld1b { z0.b }, p0/z, [x0, x8]
39+
; CHECK-512-NEXT: st1b { z0.b }, p0, [x1, x8]
40+
; CHECK-512-NEXT: ret
41+
;
42+
; CHECK-1024-LABEL: nxv16i8:
43+
; CHECK-1024: // %bb.0:
44+
; CHECK-1024-NEXT: ptrue p0.b
45+
; CHECK-1024-NEXT: mov w8, #256 // =0x100
46+
; CHECK-1024-NEXT: ld1b { z0.b }, p0/z, [x0, x8]
47+
; CHECK-1024-NEXT: st1b { z0.b }, p0, [x1, x8]
48+
; CHECK-1024-NEXT: ret
49+
;
50+
; CHECK-2048-LABEL: nxv16i8:
51+
; CHECK-2048: // %bb.0:
52+
; CHECK-2048-NEXT: ptrue p0.b
53+
; CHECK-2048-NEXT: mov w8, #256 // =0x100
54+
; CHECK-2048-NEXT: ld1b { z0.b }, p0/z, [x0, x8]
55+
; CHECK-2048-NEXT: st1b { z0.b }, p0, [x1, x8]
56+
; CHECK-2048-NEXT: ret
57+
%ldoff = getelementptr inbounds nuw i8, ptr %ldptr, i64 256
58+
%stoff = getelementptr inbounds nuw i8, ptr %stptr, i64 256
59+
%x = load <vscale x 16 x i8>, ptr %ldoff, align 1
60+
store <vscale x 16 x i8> %x, ptr %stoff, align 1
61+
ret void
62+
}
63+
64+
define void @nxv8i16(ptr %ldptr, ptr %stptr) {
65+
; CHECK-LABEL: nxv8i16:
66+
; CHECK: // %bb.0:
67+
; CHECK-NEXT: ptrue p0.h
68+
; CHECK-NEXT: mov x8, #128 // =0x80
69+
; CHECK-NEXT: ld1h { z0.h }, p0/z, [x0, x8, lsl #1]
70+
; CHECK-NEXT: st1h { z0.h }, p0, [x1, x8, lsl #1]
71+
; CHECK-NEXT: ret
72+
;
73+
; CHECK-128-LABEL: nxv8i16:
74+
; CHECK-128: // %bb.0:
75+
; CHECK-128-NEXT: ptrue p0.h
76+
; CHECK-128-NEXT: mov x8, #128 // =0x80
77+
; CHECK-128-NEXT: ld1h { z0.h }, p0/z, [x0, x8, lsl #1]
78+
; CHECK-128-NEXT: st1h { z0.h }, p0, [x1, x8, lsl #1]
79+
; CHECK-128-NEXT: ret
80+
;
81+
; CHECK-256-LABEL: nxv8i16:
82+
; CHECK-256: // %bb.0:
83+
; CHECK-256-NEXT: ptrue p0.h
84+
; CHECK-256-NEXT: mov x8, #128 // =0x80
85+
; CHECK-256-NEXT: ld1h { z0.h }, p0/z, [x0, x8, lsl #1]
86+
; CHECK-256-NEXT: st1h { z0.h }, p0, [x1, x8, lsl #1]
87+
; CHECK-256-NEXT: ret
88+
;
89+
; CHECK-512-LABEL: nxv8i16:
90+
; CHECK-512: // %bb.0:
91+
; CHECK-512-NEXT: ptrue p0.h
92+
; CHECK-512-NEXT: mov x8, #128 // =0x80
93+
; CHECK-512-NEXT: ld1h { z0.h }, p0/z, [x0, x8, lsl #1]
94+
; CHECK-512-NEXT: st1h { z0.h }, p0, [x1, x8, lsl #1]
95+
; CHECK-512-NEXT: ret
96+
;
97+
; CHECK-1024-LABEL: nxv8i16:
98+
; CHECK-1024: // %bb.0:
99+
; CHECK-1024-NEXT: ptrue p0.h
100+
; CHECK-1024-NEXT: mov x8, #128 // =0x80
101+
; CHECK-1024-NEXT: ld1h { z0.h }, p0/z, [x0, x8, lsl #1]
102+
; CHECK-1024-NEXT: st1h { z0.h }, p0, [x1, x8, lsl #1]
103+
; CHECK-1024-NEXT: ret
104+
;
105+
; CHECK-2048-LABEL: nxv8i16:
106+
; CHECK-2048: // %bb.0:
107+
; CHECK-2048-NEXT: ptrue p0.h
108+
; CHECK-2048-NEXT: mov x8, #128 // =0x80
109+
; CHECK-2048-NEXT: ld1h { z0.h }, p0/z, [x0, x8, lsl #1]
110+
; CHECK-2048-NEXT: st1h { z0.h }, p0, [x1, x8, lsl #1]
111+
; CHECK-2048-NEXT: ret
112+
%ldoff = getelementptr inbounds nuw i16, ptr %ldptr, i64 128
113+
%stoff = getelementptr inbounds nuw i16, ptr %stptr, i64 128
114+
%x = load <vscale x 8 x i16>, ptr %ldoff, align 2
115+
store <vscale x 8 x i16> %x, ptr %stoff, align 2
116+
ret void
117+
}
118+
119+
define void @nxv4i32(ptr %ldptr, ptr %stptr) {
120+
; CHECK-LABEL: nxv4i32:
121+
; CHECK: // %bb.0:
122+
; CHECK-NEXT: ptrue p0.s
123+
; CHECK-NEXT: mov x8, #64 // =0x40
124+
; CHECK-NEXT: ld1w { z0.s }, p0/z, [x0, x8, lsl #2]
125+
; CHECK-NEXT: st1w { z0.s }, p0, [x1, x8, lsl #2]
126+
; CHECK-NEXT: ret
127+
;
128+
; CHECK-128-LABEL: nxv4i32:
129+
; CHECK-128: // %bb.0:
130+
; CHECK-128-NEXT: ptrue p0.s
131+
; CHECK-128-NEXT: mov x8, #64 // =0x40
132+
; CHECK-128-NEXT: ld1w { z0.s }, p0/z, [x0, x8, lsl #2]
133+
; CHECK-128-NEXT: st1w { z0.s }, p0, [x1, x8, lsl #2]
134+
; CHECK-128-NEXT: ret
135+
;
136+
; CHECK-256-LABEL: nxv4i32:
137+
; CHECK-256: // %bb.0:
138+
; CHECK-256-NEXT: ptrue p0.s
139+
; CHECK-256-NEXT: mov x8, #64 // =0x40
140+
; CHECK-256-NEXT: ld1w { z0.s }, p0/z, [x0, x8, lsl #2]
141+
; CHECK-256-NEXT: st1w { z0.s }, p0, [x1, x8, lsl #2]
142+
; CHECK-256-NEXT: ret
143+
;
144+
; CHECK-512-LABEL: nxv4i32:
145+
; CHECK-512: // %bb.0:
146+
; CHECK-512-NEXT: ptrue p0.s
147+
; CHECK-512-NEXT: mov x8, #64 // =0x40
148+
; CHECK-512-NEXT: ld1w { z0.s }, p0/z, [x0, x8, lsl #2]
149+
; CHECK-512-NEXT: st1w { z0.s }, p0, [x1, x8, lsl #2]
150+
; CHECK-512-NEXT: ret
151+
;
152+
; CHECK-1024-LABEL: nxv4i32:
153+
; CHECK-1024: // %bb.0:
154+
; CHECK-1024-NEXT: ptrue p0.s
155+
; CHECK-1024-NEXT: mov x8, #64 // =0x40
156+
; CHECK-1024-NEXT: ld1w { z0.s }, p0/z, [x0, x8, lsl #2]
157+
; CHECK-1024-NEXT: st1w { z0.s }, p0, [x1, x8, lsl #2]
158+
; CHECK-1024-NEXT: ret
159+
;
160+
; CHECK-2048-LABEL: nxv4i32:
161+
; CHECK-2048: // %bb.0:
162+
; CHECK-2048-NEXT: ptrue p0.s
163+
; CHECK-2048-NEXT: mov x8, #64 // =0x40
164+
; CHECK-2048-NEXT: ld1w { z0.s }, p0/z, [x0, x8, lsl #2]
165+
; CHECK-2048-NEXT: st1w { z0.s }, p0, [x1, x8, lsl #2]
166+
; CHECK-2048-NEXT: ret
167+
%ldoff = getelementptr inbounds nuw i32, ptr %ldptr, i64 64
168+
%stoff = getelementptr inbounds nuw i32, ptr %stptr, i64 64
169+
%x = load <vscale x 4 x i32>, ptr %ldoff, align 4
170+
store <vscale x 4 x i32> %x, ptr %stoff, align 4
171+
ret void
172+
}
173+
174+
define void @nxv2i64(ptr %ldptr, ptr %stptr) {
175+
; CHECK-LABEL: nxv2i64:
176+
; CHECK: // %bb.0:
177+
; CHECK-NEXT: ptrue p0.d
178+
; CHECK-NEXT: mov x8, #32 // =0x20
179+
; CHECK-NEXT: ld1d { z0.d }, p0/z, [x0, x8, lsl #3]
180+
; CHECK-NEXT: st1d { z0.d }, p0, [x1, x8, lsl #3]
181+
; CHECK-NEXT: ret
182+
;
183+
; CHECK-128-LABEL: nxv2i64:
184+
; CHECK-128: // %bb.0:
185+
; CHECK-128-NEXT: ptrue p0.d
186+
; CHECK-128-NEXT: mov x8, #32 // =0x20
187+
; CHECK-128-NEXT: ld1d { z0.d }, p0/z, [x0, x8, lsl #3]
188+
; CHECK-128-NEXT: st1d { z0.d }, p0, [x1, x8, lsl #3]
189+
; CHECK-128-NEXT: ret
190+
;
191+
; CHECK-256-LABEL: nxv2i64:
192+
; CHECK-256: // %bb.0:
193+
; CHECK-256-NEXT: ptrue p0.d
194+
; CHECK-256-NEXT: mov x8, #32 // =0x20
195+
; CHECK-256-NEXT: ld1d { z0.d }, p0/z, [x0, x8, lsl #3]
196+
; CHECK-256-NEXT: st1d { z0.d }, p0, [x1, x8, lsl #3]
197+
; CHECK-256-NEXT: ret
198+
;
199+
; CHECK-512-LABEL: nxv2i64:
200+
; CHECK-512: // %bb.0:
201+
; CHECK-512-NEXT: ptrue p0.d
202+
; CHECK-512-NEXT: mov x8, #32 // =0x20
203+
; CHECK-512-NEXT: ld1d { z0.d }, p0/z, [x0, x8, lsl #3]
204+
; CHECK-512-NEXT: st1d { z0.d }, p0, [x1, x8, lsl #3]
205+
; CHECK-512-NEXT: ret
206+
;
207+
; CHECK-1024-LABEL: nxv2i64:
208+
; CHECK-1024: // %bb.0:
209+
; CHECK-1024-NEXT: ptrue p0.d
210+
; CHECK-1024-NEXT: mov x8, #32 // =0x20
211+
; CHECK-1024-NEXT: ld1d { z0.d }, p0/z, [x0, x8, lsl #3]
212+
; CHECK-1024-NEXT: st1d { z0.d }, p0, [x1, x8, lsl #3]
213+
; CHECK-1024-NEXT: ret
214+
;
215+
; CHECK-2048-LABEL: nxv2i64:
216+
; CHECK-2048: // %bb.0:
217+
; CHECK-2048-NEXT: ptrue p0.d
218+
; CHECK-2048-NEXT: mov x8, #32 // =0x20
219+
; CHECK-2048-NEXT: ld1d { z0.d }, p0/z, [x0, x8, lsl #3]
220+
; CHECK-2048-NEXT: st1d { z0.d }, p0, [x1, x8, lsl #3]
221+
; CHECK-2048-NEXT: ret
222+
%ldoff = getelementptr inbounds nuw i64, ptr %ldptr, i64 32
223+
%stoff = getelementptr inbounds nuw i64, ptr %stptr, i64 32
224+
%x = load <vscale x 2 x i64>, ptr %ldoff, align 8
225+
store <vscale x 2 x i64> %x, ptr %stoff, align 8
226+
ret void
227+
}

0 commit comments

Comments
 (0)