@@ -44,6 +44,24 @@ entry:
44
44
ret void
45
45
}
46
46
47
+ define void @test_str_lane0_s32_negative_offset (ptr %a , <vscale x 4 x i32 > %b ) {
48
+ ; CHECK-LABEL: test_str_lane0_s32_negative_offset:
49
+ ; CHECK: // %bb.0: // %entry
50
+ ; CHECK-NEXT: stur s0, [x0, #-32]
51
+ ; CHECK-NEXT: ret
52
+ ;
53
+ ; STREAMING-COMPAT-LABEL: test_str_lane0_s32_negative_offset:
54
+ ; STREAMING-COMPAT: // %bb.0: // %entry
55
+ ; STREAMING-COMPAT-NEXT: stur s0, [x0, #-32]
56
+ ; STREAMING-COMPAT-NEXT: ret
57
+
58
+ entry:
59
+ %0 = extractelement <vscale x 4 x i32 > %b , i32 0
60
+ %out_ptr = getelementptr inbounds i32 , ptr %a , i64 -8
61
+ store i32 %0 , ptr %out_ptr , align 4
62
+ ret void
63
+ }
64
+
47
65
define void @test_str_lane_s64 (ptr %a , <vscale x 2 x i64 > %b ) {
48
66
; CHECK-LABEL: test_str_lane_s64:
49
67
; CHECK: // %bb.0: // %entry
@@ -281,7 +299,7 @@ define void @test_str_reduction_i32_to_i32_negative_offset(ptr %ptr, <vscale x 4
281
299
282
300
%reduce = tail call i64 @llvm.aarch64.sve.uaddv.nxv4i32 (<vscale x 4 x i1 > %p0 , <vscale x 4 x i32 > %v )
283
301
%trunc = trunc i64 %reduce to i32
284
- %out_ptr = getelementptr inbounds float , ptr %ptr , i64 -8
302
+ %out_ptr = getelementptr inbounds i32 , ptr %ptr , i64 -8
285
303
store i32 %trunc , ptr %out_ptr , align 4
286
304
ret void
287
305
}
@@ -290,19 +308,17 @@ define void @test_str_reduction_i32_to_i64_negative_offset(ptr %ptr, <vscale x 4
290
308
; CHECK-LABEL: test_str_reduction_i32_to_i64_negative_offset:
291
309
; CHECK: // %bb.0:
292
310
; CHECK-NEXT: uaddv d0, p0, z0.s
293
- ; CHECK-NEXT: fmov x8, d0
294
- ; CHECK-NEXT: stur x8, [x0, #-32]
311
+ ; CHECK-NEXT: stur d0, [x0, #-64]
295
312
; CHECK-NEXT: ret
296
313
;
297
314
; STREAMING-COMPAT-LABEL: test_str_reduction_i32_to_i64_negative_offset:
298
315
; STREAMING-COMPAT: // %bb.0:
299
316
; STREAMING-COMPAT-NEXT: uaddv d0, p0, z0.s
300
- ; STREAMING-COMPAT-NEXT: fmov x8, d0
301
- ; STREAMING-COMPAT-NEXT: stur x8, [x0, #-32]
317
+ ; STREAMING-COMPAT-NEXT: stur d0, [x0, #-64]
302
318
; STREAMING-COMPAT-NEXT: ret
303
319
304
320
%reduce = tail call i64 @llvm.aarch64.sve.uaddv.nxv4i32 (<vscale x 4 x i1 > %p0 , <vscale x 4 x i32 > %v )
305
- %out_ptr = getelementptr inbounds float , ptr %ptr , i64 -8
321
+ %out_ptr = getelementptr inbounds i64 , ptr %ptr , i64 -8
306
322
store i64 %reduce , ptr %out_ptr , align 8
307
323
ret void
308
324
}
@@ -311,18 +327,18 @@ define void @test_str_reduction_i32_to_i16_negative_offset(ptr %ptr, <vscale x 4
311
327
; CHECK-LABEL: test_str_reduction_i32_to_i16_negative_offset:
312
328
; CHECK: // %bb.0:
313
329
; CHECK-NEXT: uaddv d0, p0, z0.s
314
- ; CHECK-NEXT: stur h0, [x0, #-32 ]
330
+ ; CHECK-NEXT: stur h0, [x0, #-16 ]
315
331
; CHECK-NEXT: ret
316
332
;
317
333
; STREAMING-COMPAT-LABEL: test_str_reduction_i32_to_i16_negative_offset:
318
334
; STREAMING-COMPAT: // %bb.0:
319
335
; STREAMING-COMPAT-NEXT: uaddv d0, p0, z0.s
320
- ; STREAMING-COMPAT-NEXT: stur h0, [x0, #-32 ]
336
+ ; STREAMING-COMPAT-NEXT: stur h0, [x0, #-16 ]
321
337
; STREAMING-COMPAT-NEXT: ret
322
338
323
339
%reduce = tail call i64 @llvm.aarch64.sve.uaddv.nxv4i32 (<vscale x 4 x i1 > %p0 , <vscale x 4 x i32 > %v )
324
340
%trunc = trunc i64 %reduce to i16
325
- %out_ptr = getelementptr inbounds float , ptr %ptr , i64 -8
341
+ %out_ptr = getelementptr inbounds i16 , ptr %ptr , i64 -8
326
342
store i16 %trunc , ptr %out_ptr , align 2
327
343
ret void
328
344
}
0 commit comments