brintos

brintos / llvm-project-archived public Read only

0
0
Text · 51.7 KiB · 0005e8a Raw
1264 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx900 -enable-ipra=0 < %s | FileCheck --check-prefix=GFX9 %s3; RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx1010 -enable-ipra=0 < %s | FileCheck --check-prefix=GFX10 %s4; RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx1100 -enable-ipra=0 < %s | FileCheck --check-prefix=GFX11 %s5 6declare hidden amdgpu_gfx void @external_void_func_void() #07 8define amdgpu_gfx void @test_call_external_void_func_void_clobber_s30_s31_call_external_void_func_void() #0 {9; GFX9-LABEL: test_call_external_void_func_void_clobber_s30_s31_call_external_void_func_void:10; GFX9:       ; %bb.0:11; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)12; GFX9-NEXT:    s_mov_b32 s34, s3313; GFX9-NEXT:    s_mov_b32 s33, s3214; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -115; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill16; GFX9-NEXT:    s_mov_b64 exec, s[36:37]17; GFX9-NEXT:    v_writelane_b32 v40, s34, 418; GFX9-NEXT:    v_writelane_b32 v40, s4, 019; GFX9-NEXT:    v_writelane_b32 v40, s5, 120; GFX9-NEXT:    v_writelane_b32 v40, s30, 221; GFX9-NEXT:    s_mov_b32 s5, external_void_func_void@abs32@hi22; GFX9-NEXT:    s_mov_b32 s4, external_void_func_void@abs32@lo23; GFX9-NEXT:    s_addk_i32 s32, 0x40024; GFX9-NEXT:    v_writelane_b32 v40, s31, 325; GFX9-NEXT:    s_swappc_b64 s[30:31], s[4:5]26; GFX9-NEXT:    ;;#ASMSTART27; GFX9-NEXT:    ;;#ASMEND28; GFX9-NEXT:    s_swappc_b64 s[30:31], s[4:5]29; GFX9-NEXT:    v_readlane_b32 s31, v40, 330; GFX9-NEXT:    v_readlane_b32 s30, v40, 231; GFX9-NEXT:    v_readlane_b32 s5, v40, 132; GFX9-NEXT:    v_readlane_b32 s4, v40, 033; GFX9-NEXT:    s_mov_b32 s32, s3334; GFX9-NEXT:    v_readlane_b32 s34, v40, 435; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -136; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload37; GFX9-NEXT:    s_mov_b64 exec, s[36:37]38; GFX9-NEXT:    s_mov_b32 s33, s3439; GFX9-NEXT:    s_waitcnt vmcnt(0)40; GFX9-NEXT:    s_setpc_b64 s[30:31]41;42; GFX10-LABEL: test_call_external_void_func_void_clobber_s30_s31_call_external_void_func_void:43; GFX10:       ; %bb.0:44; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)45; GFX10-NEXT:    s_mov_b32 s34, s3346; GFX10-NEXT:    s_mov_b32 s33, s3247; GFX10-NEXT:    s_or_saveexec_b32 s35, -148; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill49; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)50; GFX10-NEXT:    s_mov_b32 exec_lo, s3551; GFX10-NEXT:    v_writelane_b32 v40, s34, 452; GFX10-NEXT:    s_addk_i32 s32, 0x20053; GFX10-NEXT:    v_writelane_b32 v40, s4, 054; GFX10-NEXT:    s_mov_b32 s4, external_void_func_void@abs32@lo55; GFX10-NEXT:    v_writelane_b32 v40, s5, 156; GFX10-NEXT:    s_mov_b32 s5, external_void_func_void@abs32@hi57; GFX10-NEXT:    v_writelane_b32 v40, s30, 258; GFX10-NEXT:    v_writelane_b32 v40, s31, 359; GFX10-NEXT:    s_swappc_b64 s[30:31], s[4:5]60; GFX10-NEXT:    ;;#ASMSTART61; GFX10-NEXT:    ;;#ASMEND62; GFX10-NEXT:    s_swappc_b64 s[30:31], s[4:5]63; GFX10-NEXT:    v_readlane_b32 s31, v40, 364; GFX10-NEXT:    v_readlane_b32 s30, v40, 265; GFX10-NEXT:    v_readlane_b32 s5, v40, 166; GFX10-NEXT:    v_readlane_b32 s4, v40, 067; GFX10-NEXT:    s_mov_b32 s32, s3368; GFX10-NEXT:    v_readlane_b32 s34, v40, 469; GFX10-NEXT:    s_or_saveexec_b32 s35, -170; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload71; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)72; GFX10-NEXT:    s_mov_b32 exec_lo, s3573; GFX10-NEXT:    s_mov_b32 s33, s3474; GFX10-NEXT:    s_waitcnt vmcnt(0)75; GFX10-NEXT:    s_setpc_b64 s[30:31]76;77; GFX11-LABEL: test_call_external_void_func_void_clobber_s30_s31_call_external_void_func_void:78; GFX11:       ; %bb.0:79; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)80; GFX11-NEXT:    s_mov_b32 s0, s3381; GFX11-NEXT:    s_mov_b32 s33, s3282; GFX11-NEXT:    s_or_saveexec_b32 s1, -183; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill84; GFX11-NEXT:    s_mov_b32 exec_lo, s185; GFX11-NEXT:    v_writelane_b32 v40, s0, 486; GFX11-NEXT:    s_add_i32 s32, s32, 1687; GFX11-NEXT:    v_writelane_b32 v40, s4, 088; GFX11-NEXT:    s_mov_b32 s4, external_void_func_void@abs32@lo89; GFX11-NEXT:    v_writelane_b32 v40, s5, 190; GFX11-NEXT:    s_mov_b32 s5, external_void_func_void@abs32@hi91; GFX11-NEXT:    v_writelane_b32 v40, s30, 292; GFX11-NEXT:    v_writelane_b32 v40, s31, 393; GFX11-NEXT:    s_swappc_b64 s[30:31], s[4:5]94; GFX11-NEXT:    ;;#ASMSTART95; GFX11-NEXT:    ;;#ASMEND96; GFX11-NEXT:    s_swappc_b64 s[30:31], s[4:5]97; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)98; GFX11-NEXT:    v_readlane_b32 s31, v40, 399; GFX11-NEXT:    v_readlane_b32 s30, v40, 2100; GFX11-NEXT:    v_readlane_b32 s5, v40, 1101; GFX11-NEXT:    v_readlane_b32 s4, v40, 0102; GFX11-NEXT:    s_mov_b32 s32, s33103; GFX11-NEXT:    v_readlane_b32 s0, v40, 4104; GFX11-NEXT:    s_or_saveexec_b32 s1, -1105; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload106; GFX11-NEXT:    s_mov_b32 exec_lo, s1107; GFX11-NEXT:    s_mov_b32 s33, s0108; GFX11-NEXT:    s_waitcnt vmcnt(0)109; GFX11-NEXT:    s_setpc_b64 s[30:31]110  call amdgpu_gfx void @external_void_func_void()111  call void asm sideeffect "", ""() #0112  call amdgpu_gfx void @external_void_func_void()113  ret void114}115 116define amdgpu_gfx void @void_func_void_clobber_s28_s29() #1 {117; GFX9-LABEL: void_func_void_clobber_s28_s29:118; GFX9:       ; %bb.0:119; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)120; GFX9-NEXT:    s_xor_saveexec_b64 s[34:35], -1121; GFX9-NEXT:    buffer_store_dword v0, off, s[0:3], s32 ; 4-byte Folded Spill122; GFX9-NEXT:    s_mov_b64 exec, s[34:35]123; GFX9-NEXT:    v_writelane_b32 v0, s28, 0124; GFX9-NEXT:    v_writelane_b32 v0, s29, 1125; GFX9-NEXT:    v_writelane_b32 v0, s30, 2126; GFX9-NEXT:    v_writelane_b32 v0, s31, 3127; GFX9-NEXT:    ;;#ASMSTART128; GFX9-NEXT:    ; clobber129; GFX9-NEXT:    ;;#ASMEND130; GFX9-NEXT:    ;;#ASMSTART131; GFX9-NEXT:    ; clobber132; GFX9-NEXT:    ;;#ASMEND133; GFX9-NEXT:    v_readlane_b32 s31, v0, 3134; GFX9-NEXT:    v_readlane_b32 s30, v0, 2135; GFX9-NEXT:    v_readlane_b32 s29, v0, 1136; GFX9-NEXT:    v_readlane_b32 s28, v0, 0137; GFX9-NEXT:    s_xor_saveexec_b64 s[34:35], -1138; GFX9-NEXT:    buffer_load_dword v0, off, s[0:3], s32 ; 4-byte Folded Reload139; GFX9-NEXT:    s_mov_b64 exec, s[34:35]140; GFX9-NEXT:    s_waitcnt vmcnt(0)141; GFX9-NEXT:    s_setpc_b64 s[30:31]142;143; GFX10-LABEL: void_func_void_clobber_s28_s29:144; GFX10:       ; %bb.0:145; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)146; GFX10-NEXT:    s_xor_saveexec_b32 s34, -1147; GFX10-NEXT:    buffer_store_dword v0, off, s[0:3], s32 ; 4-byte Folded Spill148; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)149; GFX10-NEXT:    s_mov_b32 exec_lo, s34150; GFX10-NEXT:    v_writelane_b32 v0, s28, 0151; GFX10-NEXT:    v_writelane_b32 v0, s29, 1152; GFX10-NEXT:    v_writelane_b32 v0, s30, 2153; GFX10-NEXT:    v_writelane_b32 v0, s31, 3154; GFX10-NEXT:    ;;#ASMSTART155; GFX10-NEXT:    ; clobber156; GFX10-NEXT:    ;;#ASMEND157; GFX10-NEXT:    ;;#ASMSTART158; GFX10-NEXT:    ; clobber159; GFX10-NEXT:    ;;#ASMEND160; GFX10-NEXT:    v_readlane_b32 s31, v0, 3161; GFX10-NEXT:    v_readlane_b32 s30, v0, 2162; GFX10-NEXT:    v_readlane_b32 s29, v0, 1163; GFX10-NEXT:    v_readlane_b32 s28, v0, 0164; GFX10-NEXT:    s_xor_saveexec_b32 s34, -1165; GFX10-NEXT:    buffer_load_dword v0, off, s[0:3], s32 ; 4-byte Folded Reload166; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)167; GFX10-NEXT:    s_mov_b32 exec_lo, s34168; GFX10-NEXT:    s_waitcnt vmcnt(0)169; GFX10-NEXT:    s_setpc_b64 s[30:31]170;171; GFX11-LABEL: void_func_void_clobber_s28_s29:172; GFX11:       ; %bb.0:173; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)174; GFX11-NEXT:    s_xor_saveexec_b32 s0, -1175; GFX11-NEXT:    scratch_store_b32 off, v0, s32 ; 4-byte Folded Spill176; GFX11-NEXT:    s_mov_b32 exec_lo, s0177; GFX11-NEXT:    v_writelane_b32 v0, s28, 0178; GFX11-NEXT:    v_writelane_b32 v0, s29, 1179; GFX11-NEXT:    v_writelane_b32 v0, s30, 2180; GFX11-NEXT:    v_writelane_b32 v0, s31, 3181; GFX11-NEXT:    ;;#ASMSTART182; GFX11-NEXT:    ; clobber183; GFX11-NEXT:    ;;#ASMEND184; GFX11-NEXT:    ;;#ASMSTART185; GFX11-NEXT:    ; clobber186; GFX11-NEXT:    ;;#ASMEND187; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)188; GFX11-NEXT:    v_readlane_b32 s31, v0, 3189; GFX11-NEXT:    v_readlane_b32 s30, v0, 2190; GFX11-NEXT:    v_readlane_b32 s29, v0, 1191; GFX11-NEXT:    v_readlane_b32 s28, v0, 0192; GFX11-NEXT:    s_xor_saveexec_b32 s0, -1193; GFX11-NEXT:    scratch_load_b32 v0, off, s32 ; 4-byte Folded Reload194; GFX11-NEXT:    s_mov_b32 exec_lo, s0195; GFX11-NEXT:    s_waitcnt vmcnt(0)196; GFX11-NEXT:    s_setpc_b64 s[30:31]197  call void asm sideeffect "; clobber", "~{s[30:31]}"() #0198  call void asm sideeffect "; clobber", "~{s[28:29]}"() #0199  ret void200}201 202define amdgpu_gfx void @test_call_void_func_void_mayclobber_s31(ptr addrspace(1) %out) #0 {203; GFX9-LABEL: test_call_void_func_void_mayclobber_s31:204; GFX9:       ; %bb.0:205; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)206; GFX9-NEXT:    s_mov_b32 s34, s33207; GFX9-NEXT:    s_mov_b32 s33, s32208; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1209; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill210; GFX9-NEXT:    s_mov_b64 exec, s[36:37]211; GFX9-NEXT:    v_writelane_b32 v40, s34, 3212; GFX9-NEXT:    v_writelane_b32 v40, s4, 0213; GFX9-NEXT:    v_writelane_b32 v40, s30, 1214; GFX9-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi215; GFX9-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo216; GFX9-NEXT:    s_addk_i32 s32, 0x400217; GFX9-NEXT:    v_writelane_b32 v40, s31, 2218; GFX9-NEXT:    ;;#ASMSTART219; GFX9-NEXT:    ; def s31220; GFX9-NEXT:    ;;#ASMEND221; GFX9-NEXT:    s_mov_b32 s4, s31222; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]223; GFX9-NEXT:    s_mov_b32 s31, s4224; GFX9-NEXT:    ;;#ASMSTART225; GFX9-NEXT:    ; use s31226; GFX9-NEXT:    ;;#ASMEND227; GFX9-NEXT:    v_readlane_b32 s31, v40, 2228; GFX9-NEXT:    v_readlane_b32 s30, v40, 1229; GFX9-NEXT:    v_readlane_b32 s4, v40, 0230; GFX9-NEXT:    s_mov_b32 s32, s33231; GFX9-NEXT:    v_readlane_b32 s34, v40, 3232; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1233; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload234; GFX9-NEXT:    s_mov_b64 exec, s[36:37]235; GFX9-NEXT:    s_mov_b32 s33, s34236; GFX9-NEXT:    s_waitcnt vmcnt(0)237; GFX9-NEXT:    s_setpc_b64 s[30:31]238;239; GFX10-LABEL: test_call_void_func_void_mayclobber_s31:240; GFX10:       ; %bb.0:241; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)242; GFX10-NEXT:    s_mov_b32 s34, s33243; GFX10-NEXT:    s_mov_b32 s33, s32244; GFX10-NEXT:    s_or_saveexec_b32 s35, -1245; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill246; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)247; GFX10-NEXT:    s_mov_b32 exec_lo, s35248; GFX10-NEXT:    v_writelane_b32 v40, s34, 3249; GFX10-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi250; GFX10-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo251; GFX10-NEXT:    s_addk_i32 s32, 0x200252; GFX10-NEXT:    v_writelane_b32 v40, s4, 0253; GFX10-NEXT:    v_writelane_b32 v40, s30, 1254; GFX10-NEXT:    v_writelane_b32 v40, s31, 2255; GFX10-NEXT:    ;;#ASMSTART256; GFX10-NEXT:    ; def s31257; GFX10-NEXT:    ;;#ASMEND258; GFX10-NEXT:    s_mov_b32 s4, s31259; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]260; GFX10-NEXT:    s_mov_b32 s31, s4261; GFX10-NEXT:    ;;#ASMSTART262; GFX10-NEXT:    ; use s31263; GFX10-NEXT:    ;;#ASMEND264; GFX10-NEXT:    v_readlane_b32 s31, v40, 2265; GFX10-NEXT:    v_readlane_b32 s30, v40, 1266; GFX10-NEXT:    v_readlane_b32 s4, v40, 0267; GFX10-NEXT:    s_mov_b32 s32, s33268; GFX10-NEXT:    v_readlane_b32 s34, v40, 3269; GFX10-NEXT:    s_or_saveexec_b32 s35, -1270; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload271; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)272; GFX10-NEXT:    s_mov_b32 exec_lo, s35273; GFX10-NEXT:    s_mov_b32 s33, s34274; GFX10-NEXT:    s_waitcnt vmcnt(0)275; GFX10-NEXT:    s_setpc_b64 s[30:31]276;277; GFX11-LABEL: test_call_void_func_void_mayclobber_s31:278; GFX11:       ; %bb.0:279; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)280; GFX11-NEXT:    s_mov_b32 s0, s33281; GFX11-NEXT:    s_mov_b32 s33, s32282; GFX11-NEXT:    s_or_saveexec_b32 s1, -1283; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill284; GFX11-NEXT:    s_mov_b32 exec_lo, s1285; GFX11-NEXT:    v_writelane_b32 v40, s0, 3286; GFX11-NEXT:    s_mov_b32 s1, external_void_func_void@abs32@hi287; GFX11-NEXT:    s_mov_b32 s0, external_void_func_void@abs32@lo288; GFX11-NEXT:    s_add_i32 s32, s32, 16289; GFX11-NEXT:    v_writelane_b32 v40, s4, 0290; GFX11-NEXT:    v_writelane_b32 v40, s30, 1291; GFX11-NEXT:    v_writelane_b32 v40, s31, 2292; GFX11-NEXT:    ;;#ASMSTART293; GFX11-NEXT:    ; def s31294; GFX11-NEXT:    ;;#ASMEND295; GFX11-NEXT:    s_mov_b32 s4, s31296; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]297; GFX11-NEXT:    s_mov_b32 s31, s4298; GFX11-NEXT:    ;;#ASMSTART299; GFX11-NEXT:    ; use s31300; GFX11-NEXT:    ;;#ASMEND301; GFX11-NEXT:    v_readlane_b32 s31, v40, 2302; GFX11-NEXT:    v_readlane_b32 s30, v40, 1303; GFX11-NEXT:    v_readlane_b32 s4, v40, 0304; GFX11-NEXT:    s_mov_b32 s32, s33305; GFX11-NEXT:    v_readlane_b32 s0, v40, 3306; GFX11-NEXT:    s_or_saveexec_b32 s1, -1307; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload308; GFX11-NEXT:    s_mov_b32 exec_lo, s1309; GFX11-NEXT:    s_mov_b32 s33, s0310; GFX11-NEXT:    s_waitcnt vmcnt(0)311; GFX11-NEXT:    s_setpc_b64 s[30:31]312  %s31 = call i32 asm sideeffect "; def $0", "={s31}"()313  call amdgpu_gfx void @external_void_func_void()314  call void asm sideeffect "; use $0", "{s31}"(i32 %s31)315  ret void316}317 318define amdgpu_gfx void @test_call_void_func_void_mayclobber_v31(ptr addrspace(1) %out) #0 {319; GFX9-LABEL: test_call_void_func_void_mayclobber_v31:320; GFX9:       ; %bb.0:321; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)322; GFX9-NEXT:    s_mov_b32 s34, s33323; GFX9-NEXT:    s_mov_b32 s33, s32324; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1325; GFX9-NEXT:    buffer_store_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill326; GFX9-NEXT:    s_mov_b64 exec, s[36:37]327; GFX9-NEXT:    v_writelane_b32 v41, s34, 2328; GFX9-NEXT:    v_writelane_b32 v41, s30, 0329; GFX9-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi330; GFX9-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo331; GFX9-NEXT:    s_addk_i32 s32, 0x400332; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill333; GFX9-NEXT:    v_writelane_b32 v41, s31, 1334; GFX9-NEXT:    ;;#ASMSTART335; GFX9-NEXT:    ; def v31336; GFX9-NEXT:    ;;#ASMEND337; GFX9-NEXT:    v_mov_b32_e32 v40, v31338; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]339; GFX9-NEXT:    v_mov_b32_e32 v31, v40340; GFX9-NEXT:    ;;#ASMSTART341; GFX9-NEXT:    ; use v31342; GFX9-NEXT:    ;;#ASMEND343; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload344; GFX9-NEXT:    v_readlane_b32 s31, v41, 1345; GFX9-NEXT:    v_readlane_b32 s30, v41, 0346; GFX9-NEXT:    s_mov_b32 s32, s33347; GFX9-NEXT:    v_readlane_b32 s34, v41, 2348; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1349; GFX9-NEXT:    buffer_load_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload350; GFX9-NEXT:    s_mov_b64 exec, s[36:37]351; GFX9-NEXT:    s_mov_b32 s33, s34352; GFX9-NEXT:    s_waitcnt vmcnt(0)353; GFX9-NEXT:    s_setpc_b64 s[30:31]354;355; GFX10-LABEL: test_call_void_func_void_mayclobber_v31:356; GFX10:       ; %bb.0:357; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)358; GFX10-NEXT:    s_mov_b32 s34, s33359; GFX10-NEXT:    s_mov_b32 s33, s32360; GFX10-NEXT:    s_or_saveexec_b32 s35, -1361; GFX10-NEXT:    buffer_store_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill362; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)363; GFX10-NEXT:    s_mov_b32 exec_lo, s35364; GFX10-NEXT:    v_writelane_b32 v41, s34, 2365; GFX10-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi366; GFX10-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo367; GFX10-NEXT:    s_addk_i32 s32, 0x200368; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill369; GFX10-NEXT:    v_writelane_b32 v41, s30, 0370; GFX10-NEXT:    ;;#ASMSTART371; GFX10-NEXT:    ; def v31372; GFX10-NEXT:    ;;#ASMEND373; GFX10-NEXT:    v_mov_b32_e32 v40, v31374; GFX10-NEXT:    v_writelane_b32 v41, s31, 1375; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]376; GFX10-NEXT:    v_mov_b32_e32 v31, v40377; GFX10-NEXT:    ;;#ASMSTART378; GFX10-NEXT:    ; use v31379; GFX10-NEXT:    ;;#ASMEND380; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload381; GFX10-NEXT:    v_readlane_b32 s31, v41, 1382; GFX10-NEXT:    v_readlane_b32 s30, v41, 0383; GFX10-NEXT:    s_mov_b32 s32, s33384; GFX10-NEXT:    v_readlane_b32 s34, v41, 2385; GFX10-NEXT:    s_or_saveexec_b32 s35, -1386; GFX10-NEXT:    buffer_load_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload387; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)388; GFX10-NEXT:    s_mov_b32 exec_lo, s35389; GFX10-NEXT:    s_mov_b32 s33, s34390; GFX10-NEXT:    s_waitcnt vmcnt(0)391; GFX10-NEXT:    s_setpc_b64 s[30:31]392;393; GFX11-LABEL: test_call_void_func_void_mayclobber_v31:394; GFX11:       ; %bb.0:395; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)396; GFX11-NEXT:    s_mov_b32 s0, s33397; GFX11-NEXT:    s_mov_b32 s33, s32398; GFX11-NEXT:    s_or_saveexec_b32 s1, -1399; GFX11-NEXT:    scratch_store_b32 off, v41, s33 offset:4 ; 4-byte Folded Spill400; GFX11-NEXT:    s_mov_b32 exec_lo, s1401; GFX11-NEXT:    v_writelane_b32 v41, s0, 2402; GFX11-NEXT:    s_mov_b32 s1, external_void_func_void@abs32@hi403; GFX11-NEXT:    s_mov_b32 s0, external_void_func_void@abs32@lo404; GFX11-NEXT:    s_add_i32 s32, s32, 16405; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill406; GFX11-NEXT:    v_writelane_b32 v41, s30, 0407; GFX11-NEXT:    ;;#ASMSTART408; GFX11-NEXT:    ; def v31409; GFX11-NEXT:    ;;#ASMEND410; GFX11-NEXT:    v_mov_b32_e32 v40, v31411; GFX11-NEXT:    v_writelane_b32 v41, s31, 1412; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]413; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_2)414; GFX11-NEXT:    v_mov_b32_e32 v31, v40415; GFX11-NEXT:    ;;#ASMSTART416; GFX11-NEXT:    ; use v31417; GFX11-NEXT:    ;;#ASMEND418; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload419; GFX11-NEXT:    v_readlane_b32 s31, v41, 1420; GFX11-NEXT:    v_readlane_b32 s30, v41, 0421; GFX11-NEXT:    s_mov_b32 s32, s33422; GFX11-NEXT:    v_readlane_b32 s0, v41, 2423; GFX11-NEXT:    s_or_saveexec_b32 s1, -1424; GFX11-NEXT:    scratch_load_b32 v41, off, s33 offset:4 ; 4-byte Folded Reload425; GFX11-NEXT:    s_mov_b32 exec_lo, s1426; GFX11-NEXT:    s_mov_b32 s33, s0427; GFX11-NEXT:    s_waitcnt vmcnt(0)428; GFX11-NEXT:    s_setpc_b64 s[30:31]429  %v31 = call i32 asm sideeffect "; def $0", "={v31}"()430  call amdgpu_gfx void @external_void_func_void()431  call void asm sideeffect "; use $0", "{v31}"(i32 %v31)432  ret void433}434 435 436define amdgpu_gfx void @test_call_void_func_void_preserves_s33(ptr addrspace(1) %out) #0 {437; GFX9-LABEL: test_call_void_func_void_preserves_s33:438; GFX9:       ; %bb.0:439; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)440; GFX9-NEXT:    s_mov_b32 s34, s33441; GFX9-NEXT:    s_mov_b32 s33, s32442; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1443; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill444; GFX9-NEXT:    s_mov_b64 exec, s[36:37]445; GFX9-NEXT:    v_writelane_b32 v40, s34, 3446; GFX9-NEXT:    v_writelane_b32 v40, s4, 0447; GFX9-NEXT:    v_writelane_b32 v40, s30, 1448; GFX9-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi449; GFX9-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo450; GFX9-NEXT:    s_addk_i32 s32, 0x400451; GFX9-NEXT:    v_writelane_b32 v40, s31, 2452; GFX9-NEXT:    ;;#ASMSTART453; GFX9-NEXT:    ; def s33454; GFX9-NEXT:    ;;#ASMEND455; GFX9-NEXT:    s_mov_b32 s4, s33456; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]457; GFX9-NEXT:    s_mov_b32 s33, s4458; GFX9-NEXT:    ;;#ASMSTART459; GFX9-NEXT:    ; use s33460; GFX9-NEXT:    ;;#ASMEND461; GFX9-NEXT:    v_readlane_b32 s31, v40, 2462; GFX9-NEXT:    v_readlane_b32 s30, v40, 1463; GFX9-NEXT:    v_readlane_b32 s4, v40, 0464; GFX9-NEXT:    s_mov_b32 s32, s33465; GFX9-NEXT:    v_readlane_b32 s34, v40, 3466; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1467; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload468; GFX9-NEXT:    s_mov_b64 exec, s[36:37]469; GFX9-NEXT:    s_mov_b32 s33, s34470; GFX9-NEXT:    s_waitcnt vmcnt(0)471; GFX9-NEXT:    s_setpc_b64 s[30:31]472;473; GFX10-LABEL: test_call_void_func_void_preserves_s33:474; GFX10:       ; %bb.0:475; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)476; GFX10-NEXT:    s_mov_b32 s34, s33477; GFX10-NEXT:    s_mov_b32 s33, s32478; GFX10-NEXT:    s_or_saveexec_b32 s35, -1479; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill480; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)481; GFX10-NEXT:    s_mov_b32 exec_lo, s35482; GFX10-NEXT:    v_writelane_b32 v40, s34, 3483; GFX10-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi484; GFX10-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo485; GFX10-NEXT:    s_addk_i32 s32, 0x200486; GFX10-NEXT:    ;;#ASMSTART487; GFX10-NEXT:    ; def s33488; GFX10-NEXT:    ;;#ASMEND489; GFX10-NEXT:    v_writelane_b32 v40, s4, 0490; GFX10-NEXT:    s_mov_b32 s4, s33491; GFX10-NEXT:    v_writelane_b32 v40, s30, 1492; GFX10-NEXT:    v_writelane_b32 v40, s31, 2493; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]494; GFX10-NEXT:    s_mov_b32 s33, s4495; GFX10-NEXT:    ;;#ASMSTART496; GFX10-NEXT:    ; use s33497; GFX10-NEXT:    ;;#ASMEND498; GFX10-NEXT:    v_readlane_b32 s31, v40, 2499; GFX10-NEXT:    v_readlane_b32 s30, v40, 1500; GFX10-NEXT:    v_readlane_b32 s4, v40, 0501; GFX10-NEXT:    s_mov_b32 s32, s33502; GFX10-NEXT:    v_readlane_b32 s34, v40, 3503; GFX10-NEXT:    s_or_saveexec_b32 s35, -1504; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload505; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)506; GFX10-NEXT:    s_mov_b32 exec_lo, s35507; GFX10-NEXT:    s_mov_b32 s33, s34508; GFX10-NEXT:    s_waitcnt vmcnt(0)509; GFX10-NEXT:    s_setpc_b64 s[30:31]510;511; GFX11-LABEL: test_call_void_func_void_preserves_s33:512; GFX11:       ; %bb.0:513; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)514; GFX11-NEXT:    s_mov_b32 s0, s33515; GFX11-NEXT:    s_mov_b32 s33, s32516; GFX11-NEXT:    s_or_saveexec_b32 s1, -1517; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill518; GFX11-NEXT:    s_mov_b32 exec_lo, s1519; GFX11-NEXT:    v_writelane_b32 v40, s0, 3520; GFX11-NEXT:    s_mov_b32 s1, external_void_func_void@abs32@hi521; GFX11-NEXT:    s_mov_b32 s0, external_void_func_void@abs32@lo522; GFX11-NEXT:    s_add_i32 s32, s32, 16523; GFX11-NEXT:    ;;#ASMSTART524; GFX11-NEXT:    ; def s33525; GFX11-NEXT:    ;;#ASMEND526; GFX11-NEXT:    v_writelane_b32 v40, s4, 0527; GFX11-NEXT:    s_mov_b32 s4, s33528; GFX11-NEXT:    v_writelane_b32 v40, s30, 1529; GFX11-NEXT:    v_writelane_b32 v40, s31, 2530; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]531; GFX11-NEXT:    s_mov_b32 s33, s4532; GFX11-NEXT:    ;;#ASMSTART533; GFX11-NEXT:    ; use s33534; GFX11-NEXT:    ;;#ASMEND535; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)536; GFX11-NEXT:    v_readlane_b32 s31, v40, 2537; GFX11-NEXT:    v_readlane_b32 s30, v40, 1538; GFX11-NEXT:    v_readlane_b32 s4, v40, 0539; GFX11-NEXT:    s_mov_b32 s32, s33540; GFX11-NEXT:    v_readlane_b32 s0, v40, 3541; GFX11-NEXT:    s_or_saveexec_b32 s1, -1542; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload543; GFX11-NEXT:    s_mov_b32 exec_lo, s1544; GFX11-NEXT:    s_mov_b32 s33, s0545; GFX11-NEXT:    s_waitcnt vmcnt(0)546; GFX11-NEXT:    s_setpc_b64 s[30:31]547  %s33 = call i32 asm sideeffect "; def $0", "={s33}"()548  call amdgpu_gfx void @external_void_func_void()549  call void asm sideeffect "; use $0", "{s33}"(i32 %s33)550  ret void551}552 553define amdgpu_gfx void @test_call_void_func_void_preserves_s34(ptr addrspace(1) %out) #0 {554; GFX9-LABEL: test_call_void_func_void_preserves_s34:555; GFX9:       ; %bb.0:556; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)557; GFX9-NEXT:    s_mov_b32 s34, s33558; GFX9-NEXT:    s_mov_b32 s33, s32559; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1560; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill561; GFX9-NEXT:    s_mov_b64 exec, s[36:37]562; GFX9-NEXT:    v_writelane_b32 v40, s34, 3563; GFX9-NEXT:    v_writelane_b32 v40, s4, 0564; GFX9-NEXT:    ;;#ASMSTART565; GFX9-NEXT:    ; def s34566; GFX9-NEXT:    ;;#ASMEND567; GFX9-NEXT:    v_writelane_b32 v40, s30, 1568; GFX9-NEXT:    s_mov_b32 s4, s34569; GFX9-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi570; GFX9-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo571; GFX9-NEXT:    s_addk_i32 s32, 0x400572; GFX9-NEXT:    v_writelane_b32 v40, s31, 2573; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]574; GFX9-NEXT:    s_mov_b32 s34, s4575; GFX9-NEXT:    ;;#ASMSTART576; GFX9-NEXT:    ; use s34577; GFX9-NEXT:    ;;#ASMEND578; GFX9-NEXT:    v_readlane_b32 s31, v40, 2579; GFX9-NEXT:    v_readlane_b32 s30, v40, 1580; GFX9-NEXT:    v_readlane_b32 s4, v40, 0581; GFX9-NEXT:    s_mov_b32 s32, s33582; GFX9-NEXT:    v_readlane_b32 s34, v40, 3583; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1584; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload585; GFX9-NEXT:    s_mov_b64 exec, s[36:37]586; GFX9-NEXT:    s_mov_b32 s33, s34587; GFX9-NEXT:    s_waitcnt vmcnt(0)588; GFX9-NEXT:    s_setpc_b64 s[30:31]589;590; GFX10-LABEL: test_call_void_func_void_preserves_s34:591; GFX10:       ; %bb.0:592; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)593; GFX10-NEXT:    s_mov_b32 s34, s33594; GFX10-NEXT:    s_mov_b32 s33, s32595; GFX10-NEXT:    s_or_saveexec_b32 s35, -1596; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill597; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)598; GFX10-NEXT:    s_mov_b32 exec_lo, s35599; GFX10-NEXT:    v_writelane_b32 v40, s34, 3600; GFX10-NEXT:    ;;#ASMSTART601; GFX10-NEXT:    ; def s34602; GFX10-NEXT:    ;;#ASMEND603; GFX10-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi604; GFX10-NEXT:    s_addk_i32 s32, 0x200605; GFX10-NEXT:    v_writelane_b32 v40, s4, 0606; GFX10-NEXT:    s_mov_b32 s4, s34607; GFX10-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo608; GFX10-NEXT:    v_writelane_b32 v40, s30, 1609; GFX10-NEXT:    v_writelane_b32 v40, s31, 2610; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]611; GFX10-NEXT:    s_mov_b32 s34, s4612; GFX10-NEXT:    ;;#ASMSTART613; GFX10-NEXT:    ; use s34614; GFX10-NEXT:    ;;#ASMEND615; GFX10-NEXT:    v_readlane_b32 s31, v40, 2616; GFX10-NEXT:    v_readlane_b32 s30, v40, 1617; GFX10-NEXT:    v_readlane_b32 s4, v40, 0618; GFX10-NEXT:    s_mov_b32 s32, s33619; GFX10-NEXT:    v_readlane_b32 s34, v40, 3620; GFX10-NEXT:    s_or_saveexec_b32 s35, -1621; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload622; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)623; GFX10-NEXT:    s_mov_b32 exec_lo, s35624; GFX10-NEXT:    s_mov_b32 s33, s34625; GFX10-NEXT:    s_waitcnt vmcnt(0)626; GFX10-NEXT:    s_setpc_b64 s[30:31]627;628; GFX11-LABEL: test_call_void_func_void_preserves_s34:629; GFX11:       ; %bb.0:630; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)631; GFX11-NEXT:    s_mov_b32 s0, s33632; GFX11-NEXT:    s_mov_b32 s33, s32633; GFX11-NEXT:    s_or_saveexec_b32 s1, -1634; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill635; GFX11-NEXT:    s_mov_b32 exec_lo, s1636; GFX11-NEXT:    v_writelane_b32 v40, s0, 3637; GFX11-NEXT:    s_mov_b32 s1, external_void_func_void@abs32@hi638; GFX11-NEXT:    s_mov_b32 s0, external_void_func_void@abs32@lo639; GFX11-NEXT:    s_add_i32 s32, s32, 16640; GFX11-NEXT:    ;;#ASMSTART641; GFX11-NEXT:    ; def s34642; GFX11-NEXT:    ;;#ASMEND643; GFX11-NEXT:    v_writelane_b32 v40, s4, 0644; GFX11-NEXT:    s_mov_b32 s4, s34645; GFX11-NEXT:    v_writelane_b32 v40, s30, 1646; GFX11-NEXT:    v_writelane_b32 v40, s31, 2647; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]648; GFX11-NEXT:    s_mov_b32 s34, s4649; GFX11-NEXT:    ;;#ASMSTART650; GFX11-NEXT:    ; use s34651; GFX11-NEXT:    ;;#ASMEND652; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)653; GFX11-NEXT:    v_readlane_b32 s31, v40, 2654; GFX11-NEXT:    v_readlane_b32 s30, v40, 1655; GFX11-NEXT:    v_readlane_b32 s4, v40, 0656; GFX11-NEXT:    s_mov_b32 s32, s33657; GFX11-NEXT:    v_readlane_b32 s0, v40, 3658; GFX11-NEXT:    s_or_saveexec_b32 s1, -1659; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload660; GFX11-NEXT:    s_mov_b32 exec_lo, s1661; GFX11-NEXT:    s_mov_b32 s33, s0662; GFX11-NEXT:    s_waitcnt vmcnt(0)663; GFX11-NEXT:    s_setpc_b64 s[30:31]664  %s34 = call i32 asm sideeffect "; def $0", "={s34}"()665  call amdgpu_gfx void @external_void_func_void()666  call void asm sideeffect "; use $0", "{s34}"(i32 %s34)667  ret void668}669 670define amdgpu_gfx void @test_call_void_func_void_preserves_v40(ptr addrspace(1) %out) #0 {671; GFX9-LABEL: test_call_void_func_void_preserves_v40:672; GFX9:       ; %bb.0:673; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)674; GFX9-NEXT:    s_mov_b32 s34, s33675; GFX9-NEXT:    s_mov_b32 s33, s32676; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1677; GFX9-NEXT:    buffer_store_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill678; GFX9-NEXT:    s_mov_b64 exec, s[36:37]679; GFX9-NEXT:    v_writelane_b32 v41, s34, 2680; GFX9-NEXT:    v_writelane_b32 v41, s30, 0681; GFX9-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi682; GFX9-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo683; GFX9-NEXT:    s_addk_i32 s32, 0x400684; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill685; GFX9-NEXT:    v_writelane_b32 v41, s31, 1686; GFX9-NEXT:    ;;#ASMSTART687; GFX9-NEXT:    ; def v40688; GFX9-NEXT:    ;;#ASMEND689; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]690; GFX9-NEXT:    ;;#ASMSTART691; GFX9-NEXT:    ; use v40692; GFX9-NEXT:    ;;#ASMEND693; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload694; GFX9-NEXT:    v_readlane_b32 s31, v41, 1695; GFX9-NEXT:    v_readlane_b32 s30, v41, 0696; GFX9-NEXT:    s_mov_b32 s32, s33697; GFX9-NEXT:    v_readlane_b32 s34, v41, 2698; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1699; GFX9-NEXT:    buffer_load_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload700; GFX9-NEXT:    s_mov_b64 exec, s[36:37]701; GFX9-NEXT:    s_mov_b32 s33, s34702; GFX9-NEXT:    s_waitcnt vmcnt(0)703; GFX9-NEXT:    s_setpc_b64 s[30:31]704;705; GFX10-LABEL: test_call_void_func_void_preserves_v40:706; GFX10:       ; %bb.0:707; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)708; GFX10-NEXT:    s_mov_b32 s34, s33709; GFX10-NEXT:    s_mov_b32 s33, s32710; GFX10-NEXT:    s_or_saveexec_b32 s35, -1711; GFX10-NEXT:    buffer_store_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill712; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)713; GFX10-NEXT:    s_mov_b32 exec_lo, s35714; GFX10-NEXT:    v_writelane_b32 v41, s34, 2715; GFX10-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi716; GFX10-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo717; GFX10-NEXT:    s_addk_i32 s32, 0x200718; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill719; GFX10-NEXT:    v_writelane_b32 v41, s30, 0720; GFX10-NEXT:    ;;#ASMSTART721; GFX10-NEXT:    ; def v40722; GFX10-NEXT:    ;;#ASMEND723; GFX10-NEXT:    v_writelane_b32 v41, s31, 1724; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]725; GFX10-NEXT:    ;;#ASMSTART726; GFX10-NEXT:    ; use v40727; GFX10-NEXT:    ;;#ASMEND728; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload729; GFX10-NEXT:    v_readlane_b32 s31, v41, 1730; GFX10-NEXT:    v_readlane_b32 s30, v41, 0731; GFX10-NEXT:    s_mov_b32 s32, s33732; GFX10-NEXT:    v_readlane_b32 s34, v41, 2733; GFX10-NEXT:    s_or_saveexec_b32 s35, -1734; GFX10-NEXT:    buffer_load_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload735; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)736; GFX10-NEXT:    s_mov_b32 exec_lo, s35737; GFX10-NEXT:    s_mov_b32 s33, s34738; GFX10-NEXT:    s_waitcnt vmcnt(0)739; GFX10-NEXT:    s_setpc_b64 s[30:31]740;741; GFX11-LABEL: test_call_void_func_void_preserves_v40:742; GFX11:       ; %bb.0:743; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)744; GFX11-NEXT:    s_mov_b32 s0, s33745; GFX11-NEXT:    s_mov_b32 s33, s32746; GFX11-NEXT:    s_or_saveexec_b32 s1, -1747; GFX11-NEXT:    scratch_store_b32 off, v41, s33 offset:4 ; 4-byte Folded Spill748; GFX11-NEXT:    s_mov_b32 exec_lo, s1749; GFX11-NEXT:    v_writelane_b32 v41, s0, 2750; GFX11-NEXT:    s_mov_b32 s1, external_void_func_void@abs32@hi751; GFX11-NEXT:    s_mov_b32 s0, external_void_func_void@abs32@lo752; GFX11-NEXT:    s_add_i32 s32, s32, 16753; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill754; GFX11-NEXT:    v_writelane_b32 v41, s30, 0755; GFX11-NEXT:    ;;#ASMSTART756; GFX11-NEXT:    ; def v40757; GFX11-NEXT:    ;;#ASMEND758; GFX11-NEXT:    v_writelane_b32 v41, s31, 1759; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]760; GFX11-NEXT:    ;;#ASMSTART761; GFX11-NEXT:    ; use v40762; GFX11-NEXT:    ;;#ASMEND763; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload764; GFX11-NEXT:    v_readlane_b32 s31, v41, 1765; GFX11-NEXT:    v_readlane_b32 s30, v41, 0766; GFX11-NEXT:    s_mov_b32 s32, s33767; GFX11-NEXT:    v_readlane_b32 s0, v41, 2768; GFX11-NEXT:    s_or_saveexec_b32 s1, -1769; GFX11-NEXT:    scratch_load_b32 v41, off, s33 offset:4 ; 4-byte Folded Reload770; GFX11-NEXT:    s_mov_b32 exec_lo, s1771; GFX11-NEXT:    s_mov_b32 s33, s0772; GFX11-NEXT:    s_waitcnt vmcnt(0)773; GFX11-NEXT:    s_setpc_b64 s[30:31]774  %v40 = call i32 asm sideeffect "; def $0", "={v40}"()775  call amdgpu_gfx void @external_void_func_void()776  call void asm sideeffect "; use $0", "{v40}"(i32 %v40)777  ret void778}779 780define hidden amdgpu_gfx void @void_func_void_clobber_s33() #1 {781; GFX9-LABEL: void_func_void_clobber_s33:782; GFX9:       ; %bb.0:783; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)784; GFX9-NEXT:    ;;#ASMSTART785; GFX9-NEXT:    ; clobber786; GFX9-NEXT:    ;;#ASMEND787; GFX9-NEXT:    s_setpc_b64 s[30:31]788;789; GFX10-LABEL: void_func_void_clobber_s33:790; GFX10:       ; %bb.0:791; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)792; GFX10-NEXT:    ;;#ASMSTART793; GFX10-NEXT:    ; clobber794; GFX10-NEXT:    ;;#ASMEND795; GFX10-NEXT:    s_setpc_b64 s[30:31]796;797; GFX11-LABEL: void_func_void_clobber_s33:798; GFX11:       ; %bb.0:799; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)800; GFX11-NEXT:    ;;#ASMSTART801; GFX11-NEXT:    ; clobber802; GFX11-NEXT:    ;;#ASMEND803; GFX11-NEXT:    s_setpc_b64 s[30:31]804  call void asm sideeffect "; clobber", "~{s33}"() #0805  ret void806}807 808define hidden amdgpu_gfx void @void_func_void_clobber_s34() #1 {809; GFX9-LABEL: void_func_void_clobber_s34:810; GFX9:       ; %bb.0:811; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)812; GFX9-NEXT:    ;;#ASMSTART813; GFX9-NEXT:    ; clobber814; GFX9-NEXT:    ;;#ASMEND815; GFX9-NEXT:    s_setpc_b64 s[30:31]816;817; GFX10-LABEL: void_func_void_clobber_s34:818; GFX10:       ; %bb.0:819; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)820; GFX10-NEXT:    ;;#ASMSTART821; GFX10-NEXT:    ; clobber822; GFX10-NEXT:    ;;#ASMEND823; GFX10-NEXT:    s_setpc_b64 s[30:31]824;825; GFX11-LABEL: void_func_void_clobber_s34:826; GFX11:       ; %bb.0:827; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)828; GFX11-NEXT:    ;;#ASMSTART829; GFX11-NEXT:    ; clobber830; GFX11-NEXT:    ;;#ASMEND831; GFX11-NEXT:    s_setpc_b64 s[30:31]832  call void asm sideeffect "; clobber", "~{s34}"() #0833  ret void834}835 836define amdgpu_gfx void @test_call_void_func_void_clobber_s33() #0 {837; GFX9-LABEL: test_call_void_func_void_clobber_s33:838; GFX9:       ; %bb.0:839; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)840; GFX9-NEXT:    s_mov_b32 s34, s33841; GFX9-NEXT:    s_mov_b32 s33, s32842; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1843; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill844; GFX9-NEXT:    s_mov_b64 exec, s[36:37]845; GFX9-NEXT:    v_writelane_b32 v40, s34, 2846; GFX9-NEXT:    v_writelane_b32 v40, s30, 0847; GFX9-NEXT:    s_mov_b32 s35, void_func_void_clobber_s33@abs32@hi848; GFX9-NEXT:    s_mov_b32 s34, void_func_void_clobber_s33@abs32@lo849; GFX9-NEXT:    s_addk_i32 s32, 0x400850; GFX9-NEXT:    v_writelane_b32 v40, s31, 1851; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]852; GFX9-NEXT:    v_readlane_b32 s31, v40, 1853; GFX9-NEXT:    v_readlane_b32 s30, v40, 0854; GFX9-NEXT:    s_mov_b32 s32, s33855; GFX9-NEXT:    v_readlane_b32 s34, v40, 2856; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1857; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload858; GFX9-NEXT:    s_mov_b64 exec, s[36:37]859; GFX9-NEXT:    s_mov_b32 s33, s34860; GFX9-NEXT:    s_waitcnt vmcnt(0)861; GFX9-NEXT:    s_setpc_b64 s[30:31]862;863; GFX10-LABEL: test_call_void_func_void_clobber_s33:864; GFX10:       ; %bb.0:865; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)866; GFX10-NEXT:    s_mov_b32 s34, s33867; GFX10-NEXT:    s_mov_b32 s33, s32868; GFX10-NEXT:    s_or_saveexec_b32 s35, -1869; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill870; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)871; GFX10-NEXT:    s_mov_b32 exec_lo, s35872; GFX10-NEXT:    v_writelane_b32 v40, s34, 2873; GFX10-NEXT:    s_mov_b32 s35, void_func_void_clobber_s33@abs32@hi874; GFX10-NEXT:    s_mov_b32 s34, void_func_void_clobber_s33@abs32@lo875; GFX10-NEXT:    s_addk_i32 s32, 0x200876; GFX10-NEXT:    v_writelane_b32 v40, s30, 0877; GFX10-NEXT:    v_writelane_b32 v40, s31, 1878; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]879; GFX10-NEXT:    v_readlane_b32 s31, v40, 1880; GFX10-NEXT:    v_readlane_b32 s30, v40, 0881; GFX10-NEXT:    s_mov_b32 s32, s33882; GFX10-NEXT:    v_readlane_b32 s34, v40, 2883; GFX10-NEXT:    s_or_saveexec_b32 s35, -1884; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload885; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)886; GFX10-NEXT:    s_mov_b32 exec_lo, s35887; GFX10-NEXT:    s_mov_b32 s33, s34888; GFX10-NEXT:    s_waitcnt vmcnt(0)889; GFX10-NEXT:    s_setpc_b64 s[30:31]890;891; GFX11-LABEL: test_call_void_func_void_clobber_s33:892; GFX11:       ; %bb.0:893; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)894; GFX11-NEXT:    s_mov_b32 s0, s33895; GFX11-NEXT:    s_mov_b32 s33, s32896; GFX11-NEXT:    s_or_saveexec_b32 s1, -1897; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill898; GFX11-NEXT:    s_mov_b32 exec_lo, s1899; GFX11-NEXT:    v_writelane_b32 v40, s0, 2900; GFX11-NEXT:    s_mov_b32 s1, void_func_void_clobber_s33@abs32@hi901; GFX11-NEXT:    s_mov_b32 s0, void_func_void_clobber_s33@abs32@lo902; GFX11-NEXT:    s_add_i32 s32, s32, 16903; GFX11-NEXT:    v_writelane_b32 v40, s30, 0904; GFX11-NEXT:    v_writelane_b32 v40, s31, 1905; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]906; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)907; GFX11-NEXT:    v_readlane_b32 s31, v40, 1908; GFX11-NEXT:    v_readlane_b32 s30, v40, 0909; GFX11-NEXT:    s_mov_b32 s32, s33910; GFX11-NEXT:    v_readlane_b32 s0, v40, 2911; GFX11-NEXT:    s_or_saveexec_b32 s1, -1912; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload913; GFX11-NEXT:    s_mov_b32 exec_lo, s1914; GFX11-NEXT:    s_mov_b32 s33, s0915; GFX11-NEXT:    s_waitcnt vmcnt(0)916; GFX11-NEXT:    s_setpc_b64 s[30:31]917  call amdgpu_gfx void @void_func_void_clobber_s33()918  ret void919}920 921define amdgpu_gfx void @test_call_void_func_void_clobber_s34() #0 {922; GFX9-LABEL: test_call_void_func_void_clobber_s34:923; GFX9:       ; %bb.0:924; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)925; GFX9-NEXT:    s_mov_b32 s34, s33926; GFX9-NEXT:    s_mov_b32 s33, s32927; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1928; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill929; GFX9-NEXT:    s_mov_b64 exec, s[36:37]930; GFX9-NEXT:    v_writelane_b32 v40, s34, 2931; GFX9-NEXT:    v_writelane_b32 v40, s30, 0932; GFX9-NEXT:    s_mov_b32 s35, void_func_void_clobber_s34@abs32@hi933; GFX9-NEXT:    s_mov_b32 s34, void_func_void_clobber_s34@abs32@lo934; GFX9-NEXT:    s_addk_i32 s32, 0x400935; GFX9-NEXT:    v_writelane_b32 v40, s31, 1936; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]937; GFX9-NEXT:    v_readlane_b32 s31, v40, 1938; GFX9-NEXT:    v_readlane_b32 s30, v40, 0939; GFX9-NEXT:    s_mov_b32 s32, s33940; GFX9-NEXT:    v_readlane_b32 s34, v40, 2941; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -1942; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload943; GFX9-NEXT:    s_mov_b64 exec, s[36:37]944; GFX9-NEXT:    s_mov_b32 s33, s34945; GFX9-NEXT:    s_waitcnt vmcnt(0)946; GFX9-NEXT:    s_setpc_b64 s[30:31]947;948; GFX10-LABEL: test_call_void_func_void_clobber_s34:949; GFX10:       ; %bb.0:950; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)951; GFX10-NEXT:    s_mov_b32 s34, s33952; GFX10-NEXT:    s_mov_b32 s33, s32953; GFX10-NEXT:    s_or_saveexec_b32 s35, -1954; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill955; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)956; GFX10-NEXT:    s_mov_b32 exec_lo, s35957; GFX10-NEXT:    v_writelane_b32 v40, s34, 2958; GFX10-NEXT:    s_mov_b32 s35, void_func_void_clobber_s34@abs32@hi959; GFX10-NEXT:    s_mov_b32 s34, void_func_void_clobber_s34@abs32@lo960; GFX10-NEXT:    s_addk_i32 s32, 0x200961; GFX10-NEXT:    v_writelane_b32 v40, s30, 0962; GFX10-NEXT:    v_writelane_b32 v40, s31, 1963; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]964; GFX10-NEXT:    v_readlane_b32 s31, v40, 1965; GFX10-NEXT:    v_readlane_b32 s30, v40, 0966; GFX10-NEXT:    s_mov_b32 s32, s33967; GFX10-NEXT:    v_readlane_b32 s34, v40, 2968; GFX10-NEXT:    s_or_saveexec_b32 s35, -1969; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload970; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)971; GFX10-NEXT:    s_mov_b32 exec_lo, s35972; GFX10-NEXT:    s_mov_b32 s33, s34973; GFX10-NEXT:    s_waitcnt vmcnt(0)974; GFX10-NEXT:    s_setpc_b64 s[30:31]975;976; GFX11-LABEL: test_call_void_func_void_clobber_s34:977; GFX11:       ; %bb.0:978; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)979; GFX11-NEXT:    s_mov_b32 s0, s33980; GFX11-NEXT:    s_mov_b32 s33, s32981; GFX11-NEXT:    s_or_saveexec_b32 s1, -1982; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill983; GFX11-NEXT:    s_mov_b32 exec_lo, s1984; GFX11-NEXT:    v_writelane_b32 v40, s0, 2985; GFX11-NEXT:    s_mov_b32 s1, void_func_void_clobber_s34@abs32@hi986; GFX11-NEXT:    s_mov_b32 s0, void_func_void_clobber_s34@abs32@lo987; GFX11-NEXT:    s_add_i32 s32, s32, 16988; GFX11-NEXT:    v_writelane_b32 v40, s30, 0989; GFX11-NEXT:    v_writelane_b32 v40, s31, 1990; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]991; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)992; GFX11-NEXT:    v_readlane_b32 s31, v40, 1993; GFX11-NEXT:    v_readlane_b32 s30, v40, 0994; GFX11-NEXT:    s_mov_b32 s32, s33995; GFX11-NEXT:    v_readlane_b32 s0, v40, 2996; GFX11-NEXT:    s_or_saveexec_b32 s1, -1997; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload998; GFX11-NEXT:    s_mov_b32 exec_lo, s1999; GFX11-NEXT:    s_mov_b32 s33, s01000; GFX11-NEXT:    s_waitcnt vmcnt(0)1001; GFX11-NEXT:    s_setpc_b64 s[30:31]1002  call amdgpu_gfx void @void_func_void_clobber_s34()1003  ret void1004}1005 1006define amdgpu_gfx void @callee_saved_sgpr_kernel() #1 {1007; GFX9-LABEL: callee_saved_sgpr_kernel:1008; GFX9:       ; %bb.0:1009; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1010; GFX9-NEXT:    s_mov_b32 s34, s331011; GFX9-NEXT:    s_mov_b32 s33, s321012; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -11013; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill1014; GFX9-NEXT:    s_mov_b64 exec, s[36:37]1015; GFX9-NEXT:    v_writelane_b32 v40, s34, 31016; GFX9-NEXT:    v_writelane_b32 v40, s4, 01017; GFX9-NEXT:    v_writelane_b32 v40, s30, 11018; GFX9-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi1019; GFX9-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo1020; GFX9-NEXT:    s_addk_i32 s32, 0x4001021; GFX9-NEXT:    v_writelane_b32 v40, s31, 21022; GFX9-NEXT:    ;;#ASMSTART1023; GFX9-NEXT:    ; def s401024; GFX9-NEXT:    ;;#ASMEND1025; GFX9-NEXT:    s_mov_b32 s4, s401026; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]1027; GFX9-NEXT:    ;;#ASMSTART1028; GFX9-NEXT:    ; use s41029; GFX9-NEXT:    ;;#ASMEND1030; GFX9-NEXT:    v_readlane_b32 s31, v40, 21031; GFX9-NEXT:    v_readlane_b32 s30, v40, 11032; GFX9-NEXT:    v_readlane_b32 s4, v40, 01033; GFX9-NEXT:    s_mov_b32 s32, s331034; GFX9-NEXT:    v_readlane_b32 s34, v40, 31035; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -11036; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload1037; GFX9-NEXT:    s_mov_b64 exec, s[36:37]1038; GFX9-NEXT:    s_mov_b32 s33, s341039; GFX9-NEXT:    s_waitcnt vmcnt(0)1040; GFX9-NEXT:    s_setpc_b64 s[30:31]1041;1042; GFX10-LABEL: callee_saved_sgpr_kernel:1043; GFX10:       ; %bb.0:1044; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1045; GFX10-NEXT:    s_mov_b32 s34, s331046; GFX10-NEXT:    s_mov_b32 s33, s321047; GFX10-NEXT:    s_or_saveexec_b32 s35, -11048; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill1049; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)1050; GFX10-NEXT:    s_mov_b32 exec_lo, s351051; GFX10-NEXT:    v_writelane_b32 v40, s34, 31052; GFX10-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi1053; GFX10-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo1054; GFX10-NEXT:    s_addk_i32 s32, 0x2001055; GFX10-NEXT:    ;;#ASMSTART1056; GFX10-NEXT:    ; def s401057; GFX10-NEXT:    ;;#ASMEND1058; GFX10-NEXT:    v_writelane_b32 v40, s4, 01059; GFX10-NEXT:    s_mov_b32 s4, s401060; GFX10-NEXT:    v_writelane_b32 v40, s30, 11061; GFX10-NEXT:    v_writelane_b32 v40, s31, 21062; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]1063; GFX10-NEXT:    ;;#ASMSTART1064; GFX10-NEXT:    ; use s41065; GFX10-NEXT:    ;;#ASMEND1066; GFX10-NEXT:    v_readlane_b32 s31, v40, 21067; GFX10-NEXT:    v_readlane_b32 s30, v40, 11068; GFX10-NEXT:    v_readlane_b32 s4, v40, 01069; GFX10-NEXT:    s_mov_b32 s32, s331070; GFX10-NEXT:    v_readlane_b32 s34, v40, 31071; GFX10-NEXT:    s_or_saveexec_b32 s35, -11072; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload1073; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)1074; GFX10-NEXT:    s_mov_b32 exec_lo, s351075; GFX10-NEXT:    s_mov_b32 s33, s341076; GFX10-NEXT:    s_waitcnt vmcnt(0)1077; GFX10-NEXT:    s_setpc_b64 s[30:31]1078;1079; GFX11-LABEL: callee_saved_sgpr_kernel:1080; GFX11:       ; %bb.0:1081; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1082; GFX11-NEXT:    s_mov_b32 s0, s331083; GFX11-NEXT:    s_mov_b32 s33, s321084; GFX11-NEXT:    s_or_saveexec_b32 s1, -11085; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill1086; GFX11-NEXT:    s_mov_b32 exec_lo, s11087; GFX11-NEXT:    v_writelane_b32 v40, s0, 31088; GFX11-NEXT:    s_mov_b32 s1, external_void_func_void@abs32@hi1089; GFX11-NEXT:    s_mov_b32 s0, external_void_func_void@abs32@lo1090; GFX11-NEXT:    s_add_i32 s32, s32, 161091; GFX11-NEXT:    ;;#ASMSTART1092; GFX11-NEXT:    ; def s401093; GFX11-NEXT:    ;;#ASMEND1094; GFX11-NEXT:    v_writelane_b32 v40, s4, 01095; GFX11-NEXT:    s_mov_b32 s4, s401096; GFX11-NEXT:    v_writelane_b32 v40, s30, 11097; GFX11-NEXT:    v_writelane_b32 v40, s31, 21098; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]1099; GFX11-NEXT:    ;;#ASMSTART1100; GFX11-NEXT:    ; use s41101; GFX11-NEXT:    ;;#ASMEND1102; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)1103; GFX11-NEXT:    v_readlane_b32 s31, v40, 21104; GFX11-NEXT:    v_readlane_b32 s30, v40, 11105; GFX11-NEXT:    v_readlane_b32 s4, v40, 01106; GFX11-NEXT:    s_mov_b32 s32, s331107; GFX11-NEXT:    v_readlane_b32 s0, v40, 31108; GFX11-NEXT:    s_or_saveexec_b32 s1, -11109; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload1110; GFX11-NEXT:    s_mov_b32 exec_lo, s11111; GFX11-NEXT:    s_mov_b32 s33, s01112; GFX11-NEXT:    s_waitcnt vmcnt(0)1113; GFX11-NEXT:    s_setpc_b64 s[30:31]1114  %s40 = call i32 asm sideeffect "; def s40", "={s40}"() #01115  call amdgpu_gfx void @external_void_func_void()1116  call void asm sideeffect "; use $0", "s"(i32 %s40) #01117  ret void1118}1119 1120define amdgpu_gfx void @callee_saved_sgpr_vgpr_kernel() #1 {1121; GFX9-LABEL: callee_saved_sgpr_vgpr_kernel:1122; GFX9:       ; %bb.0:1123; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1124; GFX9-NEXT:    s_mov_b32 s34, s331125; GFX9-NEXT:    s_mov_b32 s33, s321126; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -11127; GFX9-NEXT:    buffer_store_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill1128; GFX9-NEXT:    s_mov_b64 exec, s[36:37]1129; GFX9-NEXT:    v_writelane_b32 v41, s34, 31130; GFX9-NEXT:    v_writelane_b32 v41, s4, 01131; GFX9-NEXT:    v_writelane_b32 v41, s30, 11132; GFX9-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi1133; GFX9-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo1134; GFX9-NEXT:    s_addk_i32 s32, 0x4001135; GFX9-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill1136; GFX9-NEXT:    v_writelane_b32 v41, s31, 21137; GFX9-NEXT:    ;;#ASMSTART1138; GFX9-NEXT:    ; def s401139; GFX9-NEXT:    ;;#ASMEND1140; GFX9-NEXT:    s_mov_b32 s4, s401141; GFX9-NEXT:    ;;#ASMSTART1142; GFX9-NEXT:    ; def v321143; GFX9-NEXT:    ;;#ASMEND1144; GFX9-NEXT:    v_mov_b32_e32 v40, v321145; GFX9-NEXT:    s_swappc_b64 s[30:31], s[34:35]1146; GFX9-NEXT:    ;;#ASMSTART1147; GFX9-NEXT:    ; use s41148; GFX9-NEXT:    ;;#ASMEND1149; GFX9-NEXT:    ;;#ASMSTART1150; GFX9-NEXT:    ; use v401151; GFX9-NEXT:    ;;#ASMEND1152; GFX9-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload1153; GFX9-NEXT:    v_readlane_b32 s31, v41, 21154; GFX9-NEXT:    v_readlane_b32 s30, v41, 11155; GFX9-NEXT:    v_readlane_b32 s4, v41, 01156; GFX9-NEXT:    s_mov_b32 s32, s331157; GFX9-NEXT:    v_readlane_b32 s34, v41, 31158; GFX9-NEXT:    s_or_saveexec_b64 s[36:37], -11159; GFX9-NEXT:    buffer_load_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload1160; GFX9-NEXT:    s_mov_b64 exec, s[36:37]1161; GFX9-NEXT:    s_mov_b32 s33, s341162; GFX9-NEXT:    s_waitcnt vmcnt(0)1163; GFX9-NEXT:    s_setpc_b64 s[30:31]1164;1165; GFX10-LABEL: callee_saved_sgpr_vgpr_kernel:1166; GFX10:       ; %bb.0:1167; GFX10-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1168; GFX10-NEXT:    s_mov_b32 s34, s331169; GFX10-NEXT:    s_mov_b32 s33, s321170; GFX10-NEXT:    s_or_saveexec_b32 s35, -11171; GFX10-NEXT:    buffer_store_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill1172; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)1173; GFX10-NEXT:    s_mov_b32 exec_lo, s351174; GFX10-NEXT:    v_writelane_b32 v41, s34, 31175; GFX10-NEXT:    s_mov_b32 s35, external_void_func_void@abs32@hi1176; GFX10-NEXT:    s_mov_b32 s34, external_void_func_void@abs32@lo1177; GFX10-NEXT:    s_addk_i32 s32, 0x2001178; GFX10-NEXT:    buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill1179; GFX10-NEXT:    v_writelane_b32 v41, s4, 01180; GFX10-NEXT:    ;;#ASMSTART1181; GFX10-NEXT:    ; def s401182; GFX10-NEXT:    ;;#ASMEND1183; GFX10-NEXT:    s_mov_b32 s4, s401184; GFX10-NEXT:    ;;#ASMSTART1185; GFX10-NEXT:    ; def v321186; GFX10-NEXT:    ;;#ASMEND1187; GFX10-NEXT:    v_mov_b32_e32 v40, v321188; GFX10-NEXT:    v_writelane_b32 v41, s30, 11189; GFX10-NEXT:    v_writelane_b32 v41, s31, 21190; GFX10-NEXT:    s_swappc_b64 s[30:31], s[34:35]1191; GFX10-NEXT:    ;;#ASMSTART1192; GFX10-NEXT:    ; use s41193; GFX10-NEXT:    ;;#ASMEND1194; GFX10-NEXT:    ;;#ASMSTART1195; GFX10-NEXT:    ; use v401196; GFX10-NEXT:    ;;#ASMEND1197; GFX10-NEXT:    buffer_load_dword v40, off, s[0:3], s33 ; 4-byte Folded Reload1198; GFX10-NEXT:    v_readlane_b32 s31, v41, 21199; GFX10-NEXT:    v_readlane_b32 s30, v41, 11200; GFX10-NEXT:    v_readlane_b32 s4, v41, 01201; GFX10-NEXT:    s_mov_b32 s32, s331202; GFX10-NEXT:    v_readlane_b32 s34, v41, 31203; GFX10-NEXT:    s_or_saveexec_b32 s35, -11204; GFX10-NEXT:    buffer_load_dword v41, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload1205; GFX10-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)1206; GFX10-NEXT:    s_mov_b32 exec_lo, s351207; GFX10-NEXT:    s_mov_b32 s33, s341208; GFX10-NEXT:    s_waitcnt vmcnt(0)1209; GFX10-NEXT:    s_setpc_b64 s[30:31]1210;1211; GFX11-LABEL: callee_saved_sgpr_vgpr_kernel:1212; GFX11:       ; %bb.0:1213; GFX11-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)1214; GFX11-NEXT:    s_mov_b32 s0, s331215; GFX11-NEXT:    s_mov_b32 s33, s321216; GFX11-NEXT:    s_or_saveexec_b32 s1, -11217; GFX11-NEXT:    scratch_store_b32 off, v41, s33 offset:4 ; 4-byte Folded Spill1218; GFX11-NEXT:    s_mov_b32 exec_lo, s11219; GFX11-NEXT:    v_writelane_b32 v41, s0, 31220; GFX11-NEXT:    s_mov_b32 s1, external_void_func_void@abs32@hi1221; GFX11-NEXT:    s_mov_b32 s0, external_void_func_void@abs32@lo1222; GFX11-NEXT:    s_add_i32 s32, s32, 161223; GFX11-NEXT:    scratch_store_b32 off, v40, s33 ; 4-byte Folded Spill1224; GFX11-NEXT:    v_writelane_b32 v41, s4, 01225; GFX11-NEXT:    ;;#ASMSTART1226; GFX11-NEXT:    ; def s401227; GFX11-NEXT:    ;;#ASMEND1228; GFX11-NEXT:    s_mov_b32 s4, s401229; GFX11-NEXT:    ;;#ASMSTART1230; GFX11-NEXT:    ; def v321231; GFX11-NEXT:    ;;#ASMEND1232; GFX11-NEXT:    v_mov_b32_e32 v40, v321233; GFX11-NEXT:    v_writelane_b32 v41, s30, 11234; GFX11-NEXT:    v_writelane_b32 v41, s31, 21235; GFX11-NEXT:    s_swappc_b64 s[30:31], s[0:1]1236; GFX11-NEXT:    ;;#ASMSTART1237; GFX11-NEXT:    ; use s41238; GFX11-NEXT:    ;;#ASMEND1239; GFX11-NEXT:    ;;#ASMSTART1240; GFX11-NEXT:    ; use v401241; GFX11-NEXT:    ;;#ASMEND1242; GFX11-NEXT:    scratch_load_b32 v40, off, s33 ; 4-byte Folded Reload1243; GFX11-NEXT:    v_readlane_b32 s31, v41, 21244; GFX11-NEXT:    v_readlane_b32 s30, v41, 11245; GFX11-NEXT:    v_readlane_b32 s4, v41, 01246; GFX11-NEXT:    s_mov_b32 s32, s331247; GFX11-NEXT:    v_readlane_b32 s0, v41, 31248; GFX11-NEXT:    s_or_saveexec_b32 s1, -11249; GFX11-NEXT:    scratch_load_b32 v41, off, s33 offset:4 ; 4-byte Folded Reload1250; GFX11-NEXT:    s_mov_b32 exec_lo, s11251; GFX11-NEXT:    s_mov_b32 s33, s01252; GFX11-NEXT:    s_waitcnt vmcnt(0)1253; GFX11-NEXT:    s_setpc_b64 s[30:31]1254  %s40 = call i32 asm sideeffect "; def s40", "={s40}"() #01255  %v32 = call i32 asm sideeffect "; def v32", "={v32}"() #01256  call amdgpu_gfx void @external_void_func_void()1257  call void asm sideeffect "; use $0", "s"(i32 %s40) #01258  call void asm sideeffect "; use $0", "v"(i32 %v32) #01259  ret void1260}1261 1262attributes #0 = { nounwind }1263attributes #1 = { nounwind noinline }1264