Skip to content

Commit 07ca666

Browse files
Fix test expectations to match actual codegen
- Add kill annotations for store tests (def $h0 killed $h0 def $s0) - Remove v1i8 tests: they use umov.b (vector extract), not the FPR8->GPR copy path, so they don't test the fixes in this PR Co-authored-by: Claude <noreply@anthropic.com>
1 parent 984a977 commit 07ca666

File tree

1 file changed

+4
-35
lines changed

1 file changed

+4
-35
lines changed

llvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic-store-fp16.ll

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
define void @atomic_store_half(ptr %addr, half %val) {
99
; CHECK-NOFP16-LABEL: atomic_store_half:
1010
; CHECK-NOFP16: ; %bb.0:
11+
; CHECK-NOFP16-NEXT: ; kill: def $h0 killed $h0 def $s0
1112
; CHECK-NOFP16-NEXT: fmov w8, s0
1213
; CHECK-NOFP16-NEXT: stlrh w8, [x0]
1314
; CHECK-NOFP16-NEXT: ret
1415
;
1516
; CHECK-FP16-LABEL: atomic_store_half:
1617
; CHECK-FP16: ; %bb.0:
18+
; CHECK-FP16-NEXT: ; kill: def $h0 killed $h0 def $s0
1719
; CHECK-FP16-NEXT: fmov w8, s0
1820
; CHECK-FP16-NEXT: stlrh w8, [x0]
1921
; CHECK-FP16-NEXT: ret
@@ -44,12 +46,14 @@ define half @atomic_load_half(ptr %addr) {
4446
define void @atomic_store_bfloat(ptr %addr, bfloat %val) {
4547
; CHECK-NOFP16-LABEL: atomic_store_bfloat:
4648
; CHECK-NOFP16: ; %bb.0:
49+
; CHECK-NOFP16-NEXT: ; kill: def $h0 killed $h0 def $s0
4750
; CHECK-NOFP16-NEXT: fmov w8, s0
4851
; CHECK-NOFP16-NEXT: stlrh w8, [x0]
4952
; CHECK-NOFP16-NEXT: ret
5053
;
5154
; CHECK-FP16-LABEL: atomic_store_bfloat:
5255
; CHECK-FP16: ; %bb.0:
56+
; CHECK-FP16-NEXT: ; kill: def $h0 killed $h0 def $s0
5357
; CHECK-FP16-NEXT: fmov w8, s0
5458
; CHECK-FP16-NEXT: stlrh w8, [x0]
5559
; CHECK-FP16-NEXT: ret
@@ -76,38 +80,3 @@ define bfloat @atomic_load_bfloat(ptr %addr) {
7680
%val = bitcast i16 %ival to bfloat
7781
ret bfloat %val
7882
}
79-
80-
; Test FPR8 to GPR32 copies (bitcast <1 x i8> to i8 for atomic store)
81-
define void @atomic_store_v1i8(ptr %addr, <1 x i8> %val) {
82-
; CHECK-NOFP16-LABEL: atomic_store_v1i8:
83-
; CHECK-NOFP16: ; %bb.0:
84-
; CHECK-NOFP16-NEXT: fmov w8, s0
85-
; CHECK-NOFP16-NEXT: stlrb w8, [x0]
86-
; CHECK-NOFP16-NEXT: ret
87-
;
88-
; CHECK-FP16-LABEL: atomic_store_v1i8:
89-
; CHECK-FP16: ; %bb.0:
90-
; CHECK-FP16-NEXT: fmov w8, s0
91-
; CHECK-FP16-NEXT: stlrb w8, [x0]
92-
; CHECK-FP16-NEXT: ret
93-
%ival = bitcast <1 x i8> %val to i8
94-
store atomic i8 %ival, ptr %addr release, align 1
95-
ret void
96-
}
97-
98-
define <1 x i8> @atomic_load_v1i8(ptr %addr) {
99-
; CHECK-NOFP16-LABEL: atomic_load_v1i8:
100-
; CHECK-NOFP16: ; %bb.0:
101-
; CHECK-NOFP16-NEXT: ldarb w8, [x0]
102-
; CHECK-NOFP16-NEXT: fmov s0, w8
103-
; CHECK-NOFP16-NEXT: ret
104-
;
105-
; CHECK-FP16-LABEL: atomic_load_v1i8:
106-
; CHECK-FP16: ; %bb.0:
107-
; CHECK-FP16-NEXT: ldarb w8, [x0]
108-
; CHECK-FP16-NEXT: fmov s0, w8
109-
; CHECK-FP16-NEXT: ret
110-
%ival = load atomic i8, ptr %addr acquire, align 1
111-
%val = bitcast i8 %ival to <1 x i8>
112-
ret <1 x i8> %val
113-
}

0 commit comments

Comments
 (0)