1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=amdgcn -mcpu=gfx1010 -mattr=-wavefrontsize32,+wavefrontsize64 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX10 %s
4 ; The test was originally written to spill an SGPR to scratch without having spare SGPRs
5 ; available to save exec. This scenario won't be true anymore as we reseve SGPR(s)
6 ; upfront for saving exec.
8 define amdgpu_kernel void @test() #1 {
11 ; GFX10-NEXT: s_mov_b32 s8, SCRATCH_RSRC_DWORD0
12 ; GFX10-NEXT: s_mov_b32 s9, SCRATCH_RSRC_DWORD1
13 ; GFX10-NEXT: s_mov_b32 s10, -1
14 ; GFX10-NEXT: s_mov_b32 s11, 0x31e16000
15 ; GFX10-NEXT: s_add_u32 s8, s8, s1
16 ; GFX10-NEXT: s_addc_u32 s9, s9, 0
17 ; GFX10-NEXT: ;;#ASMSTART
18 ; GFX10-NEXT: ; def s[0:7]
19 ; GFX10-NEXT: ;;#ASMEND
20 ; GFX10-NEXT: ;;#ASMSTART
21 ; GFX10-NEXT: ; def s[8:12]
22 ; GFX10-NEXT: ;;#ASMEND
23 ; GFX10-NEXT: ;;#ASMSTART
24 ; GFX10-NEXT: ;;#ASMEND
25 ; GFX10-NEXT: ;;#ASMSTART
26 ; GFX10-NEXT: ; use s[0:7]
27 ; GFX10-NEXT: ;;#ASMEND
28 ; GFX10-NEXT: ;;#ASMSTART
29 ; GFX10-NEXT: ; use s[8:12]
30 ; GFX10-NEXT: ;;#ASMEND
31 ; GFX10-NEXT: s_endpgm
32 %wide.sgpr0 = call <8 x i32> asm sideeffect "; def $0", "={s[0:7]}" () #0
33 %wide.sgpr2 = call <5 x i32> asm sideeffect "; def $0", "={s[8:12]}" () #0
34 call void asm sideeffect "", "~{v[0:7]}" () #0
35 call void asm sideeffect "; use $0", "s"(<8 x i32> %wide.sgpr0) #0
36 call void asm sideeffect "; use $0", "s"(<5 x i32> %wide.sgpr2) #0
40 attributes #0 = { nounwind }
41 attributes #1 = { nounwind "amdgpu-num-sgpr"="16" "amdgpu-num-vgpr"="8" }