@@ -17,42 +17,32 @@ define void @nxv16i8(ptr %ldptr, ptr %stptr) {
1717;
1818; CHECK-128-LABEL: nxv16i8:
1919; 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]
20+ ; CHECK-128-NEXT: ldr z0, [x0, #16, mul vl]
21+ ; CHECK-128-NEXT: str z0, [x1, #16, mul vl]
2422; CHECK-128-NEXT: ret
2523;
2624; CHECK-256-LABEL: nxv16i8:
2725; 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]
26+ ; CHECK-256-NEXT: ldr z0, [x0, #8, mul vl]
27+ ; CHECK-256-NEXT: str z0, [x1, #8, mul vl]
3228; CHECK-256-NEXT: ret
3329;
3430; CHECK-512-LABEL: nxv16i8:
3531; 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]
32+ ; CHECK-512-NEXT: ldr z0, [x0, #4, mul vl]
33+ ; CHECK-512-NEXT: str z0, [x1, #4, mul vl]
4034; CHECK-512-NEXT: ret
4135;
4236; CHECK-1024-LABEL: nxv16i8:
4337; 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]
38+ ; CHECK-1024-NEXT: ldr z0, [x0, #2, mul vl]
39+ ; CHECK-1024-NEXT: str z0, [x1, #2, mul vl]
4840; CHECK-1024-NEXT: ret
4941;
5042; CHECK-2048-LABEL: nxv16i8:
5143; 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]
44+ ; CHECK-2048-NEXT: ldr z0, [x0, #1, mul vl]
45+ ; CHECK-2048-NEXT: str z0, [x1, #1, mul vl]
5646; CHECK-2048-NEXT: ret
5747 %ldoff = getelementptr inbounds nuw i8 , ptr %ldptr , i64 256
5848 %stoff = getelementptr inbounds nuw i8 , ptr %stptr , i64 256
@@ -72,42 +62,32 @@ define void @nxv8i16(ptr %ldptr, ptr %stptr) {
7262;
7363; CHECK-128-LABEL: nxv8i16:
7464; 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]
65+ ; CHECK-128-NEXT: ldr z0, [x0, #16, mul vl]
66+ ; CHECK-128-NEXT: str z0, [x1, #16, mul vl]
7967; CHECK-128-NEXT: ret
8068;
8169; CHECK-256-LABEL: nxv8i16:
8270; 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]
71+ ; CHECK-256-NEXT: ldr z0, [x0, #8, mul vl]
72+ ; CHECK-256-NEXT: str z0, [x1, #8, mul vl]
8773; CHECK-256-NEXT: ret
8874;
8975; CHECK-512-LABEL: nxv8i16:
9076; 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]
77+ ; CHECK-512-NEXT: ldr z0, [x0, #4, mul vl]
78+ ; CHECK-512-NEXT: str z0, [x1, #4, mul vl]
9579; CHECK-512-NEXT: ret
9680;
9781; CHECK-1024-LABEL: nxv8i16:
9882; 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]
83+ ; CHECK-1024-NEXT: ldr z0, [x0, #2, mul vl]
84+ ; CHECK-1024-NEXT: str z0, [x1, #2, mul vl]
10385; CHECK-1024-NEXT: ret
10486;
10587; CHECK-2048-LABEL: nxv8i16:
10688; 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]
89+ ; CHECK-2048-NEXT: ldr z0, [x0, #1, mul vl]
90+ ; CHECK-2048-NEXT: str z0, [x1, #1, mul vl]
11191; CHECK-2048-NEXT: ret
11292 %ldoff = getelementptr inbounds nuw i16 , ptr %ldptr , i64 128
11393 %stoff = getelementptr inbounds nuw i16 , ptr %stptr , i64 128
@@ -127,42 +107,32 @@ define void @nxv4i32(ptr %ldptr, ptr %stptr) {
127107;
128108; CHECK-128-LABEL: nxv4i32:
129109; 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]
110+ ; CHECK-128-NEXT: ldr z0, [x0, #16, mul vl]
111+ ; CHECK-128-NEXT: str z0, [x1, #16, mul vl]
134112; CHECK-128-NEXT: ret
135113;
136114; CHECK-256-LABEL: nxv4i32:
137115; 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]
116+ ; CHECK-256-NEXT: ldr z0, [x0, #8, mul vl]
117+ ; CHECK-256-NEXT: str z0, [x1, #8, mul vl]
142118; CHECK-256-NEXT: ret
143119;
144120; CHECK-512-LABEL: nxv4i32:
145121; 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]
122+ ; CHECK-512-NEXT: ldr z0, [x0, #4, mul vl]
123+ ; CHECK-512-NEXT: str z0, [x1, #4, mul vl]
150124; CHECK-512-NEXT: ret
151125;
152126; CHECK-1024-LABEL: nxv4i32:
153127; 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]
128+ ; CHECK-1024-NEXT: ldr z0, [x0, #2, mul vl]
129+ ; CHECK-1024-NEXT: str z0, [x1, #2, mul vl]
158130; CHECK-1024-NEXT: ret
159131;
160132; CHECK-2048-LABEL: nxv4i32:
161133; 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]
134+ ; CHECK-2048-NEXT: ldr z0, [x0, #1, mul vl]
135+ ; CHECK-2048-NEXT: str z0, [x1, #1, mul vl]
166136; CHECK-2048-NEXT: ret
167137 %ldoff = getelementptr inbounds nuw i32 , ptr %ldptr , i64 64
168138 %stoff = getelementptr inbounds nuw i32 , ptr %stptr , i64 64
@@ -182,42 +152,32 @@ define void @nxv2i64(ptr %ldptr, ptr %stptr) {
182152;
183153; CHECK-128-LABEL: nxv2i64:
184154; 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]
155+ ; CHECK-128-NEXT: ldr z0, [x0, #16, mul vl]
156+ ; CHECK-128-NEXT: str z0, [x1, #16, mul vl]
189157; CHECK-128-NEXT: ret
190158;
191159; CHECK-256-LABEL: nxv2i64:
192160; 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]
161+ ; CHECK-256-NEXT: ldr z0, [x0, #8, mul vl]
162+ ; CHECK-256-NEXT: str z0, [x1, #8, mul vl]
197163; CHECK-256-NEXT: ret
198164;
199165; CHECK-512-LABEL: nxv2i64:
200166; 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]
167+ ; CHECK-512-NEXT: ldr z0, [x0, #4, mul vl]
168+ ; CHECK-512-NEXT: str z0, [x1, #4, mul vl]
205169; CHECK-512-NEXT: ret
206170;
207171; CHECK-1024-LABEL: nxv2i64:
208172; 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]
173+ ; CHECK-1024-NEXT: ldr z0, [x0, #2, mul vl]
174+ ; CHECK-1024-NEXT: str z0, [x1, #2, mul vl]
213175; CHECK-1024-NEXT: ret
214176;
215177; CHECK-2048-LABEL: nxv2i64:
216178; 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]
179+ ; CHECK-2048-NEXT: ldr z0, [x0, #1, mul vl]
180+ ; CHECK-2048-NEXT: str z0, [x1, #1, mul vl]
221181; CHECK-2048-NEXT: ret
222182 %ldoff = getelementptr inbounds nuw i64 , ptr %ldptr , i64 32
223183 %stoff = getelementptr inbounds nuw i64 , ptr %stptr , i64 32
0 commit comments