Skip to content

Commit 3c868cb

Browse files
committed
AMDGPU: Split test function
This avoids slightly different scheduling/regalloc behavior, and avoids a test diff between GlobalISel and SelectionDAG.
1 parent 555e7ee commit 3c868cb

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

llvm/test/CodeGen/AMDGPU/write_register.ll

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,25 @@ define amdgpu_kernel void @test_write_exec(i64 %val) #0 {
2424
ret void
2525
}
2626

27-
; CHECK-LABEL: {{^}}test_write_flat_scratch:
27+
; CHECK-LABEL: {{^}}test_write_flat_scratch_0:
2828
; CHECK: s_mov_b64 flat_scratch, 0
29-
; CHECK: s_mov_b64 flat_scratch, -1
30-
; CHECK: s_mov_b64 flat_scratch, s{{\[[0-9]+:[0-9]+\]}}
31-
define amdgpu_kernel void @test_write_flat_scratch(i64 %val) #0 {
29+
define amdgpu_kernel void @test_write_flat_scratch_0(i64 %val) #0 {
3230
call void @llvm.write_register.i64(metadata !2, i64 0)
31+
call void @llvm.amdgcn.wave.barrier() #1
32+
ret void
33+
}
34+
35+
; CHECK-LABEL: {{^}}test_write_flat_scratch_neg1:
36+
; CHECK: s_mov_b64 flat_scratch, -1
37+
define amdgpu_kernel void @test_write_flat_scratch_neg1(i64 %val) #0 {
3338
call void @llvm.write_register.i64(metadata !2, i64 -1)
39+
call void @llvm.amdgcn.wave.barrier() #1
40+
ret void
41+
}
42+
43+
; CHECK-LABEL: {{^}}test_write_flat_scratch_val:
44+
; CHECK: s_load_dwordx2 flat_scratch, s{{\[[0-9]+:[0-9]+\]}}
45+
define amdgpu_kernel void @test_write_flat_scratch_val(i64 %val) #0 {
3446
call void @llvm.write_register.i64(metadata !2, i64 %val)
3547
call void @llvm.amdgcn.wave.barrier() #1
3648
ret void

0 commit comments

Comments
 (0)