brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.0 KiB · 5d8bebe Raw
98 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 42; RUN: llc -global-isel=1 -new-reg-bank-select -mtriple=amdgcn-amd-amdpal -mcpu=gfx1200 < %s | FileCheck -check-prefix=GISEL-GFX12 %s3; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdpal -mcpu=gfx1200 < %s | FileCheck -check-prefix=DAGISEL-GFX12 %s4 5declare amdgpu_cs_chain void @callee(<3 x i32> inreg, { i32, ptr addrspace(5), i32, i32 })6declare amdgpu_cs_chain_preserve void @callee_preserve(<3 x i32> inreg, { i32, ptr addrspace(5), i32, i32 })7declare void @llvm.amdgcn.cs.chain(ptr, i32, <3 x i32>, { i32, ptr addrspace(5), i32, i32 }, i32, ...) noreturn8 9define amdgpu_cs_chain void @dynamic_vgprs(i32 inreg %exec, <3 x i32> inreg %sgpr, { i32, ptr addrspace(5), i32, i32 } %vgpr, i32 inreg %num_vgpr) {10; GISEL-GFX12-LABEL: dynamic_vgprs:11; GISEL-GFX12:       ; %bb.0:12; GISEL-GFX12-NEXT:    s_wait_loadcnt_dscnt 0x013; GISEL-GFX12-NEXT:    s_wait_expcnt 0x014; GISEL-GFX12-NEXT:    s_wait_samplecnt 0x015; GISEL-GFX12-NEXT:    s_wait_bvhcnt 0x016; GISEL-GFX12-NEXT:    s_wait_kmcnt 0x017; GISEL-GFX12-NEXT:    s_mov_b32 s5, s018; GISEL-GFX12-NEXT:    s_mov_b32 s0, s119; GISEL-GFX12-NEXT:    s_mov_b32 s1, s220; GISEL-GFX12-NEXT:    s_mov_b32 s2, s321; GISEL-GFX12-NEXT:    s_mov_b32 s6, callee@abs32@lo22; GISEL-GFX12-NEXT:    s_mov_b32 s7, callee@abs32@hi23; GISEL-GFX12-NEXT:    s_mov_b32 s8, retry_vgpr_alloc@abs32@lo24; GISEL-GFX12-NEXT:    s_mov_b32 s9, retry_vgpr_alloc@abs32@hi25; GISEL-GFX12-NEXT:    s_alloc_vgpr s426; GISEL-GFX12-NEXT:    s_wait_alu depctr_sa_sdst(0)27; GISEL-GFX12-NEXT:    s_cselect_b64 s[6:7], s[6:7], s[8:9]28; GISEL-GFX12-NEXT:    s_cselect_b32 exec_lo, s5, -129; GISEL-GFX12-NEXT:    s_wait_alu depctr_sa_sdst(0)30; GISEL-GFX12-NEXT:    s_setpc_b64 s[6:7]31;32; DAGISEL-GFX12-LABEL: dynamic_vgprs:33; DAGISEL-GFX12:       ; %bb.0:34; DAGISEL-GFX12-NEXT:    s_wait_loadcnt_dscnt 0x035; DAGISEL-GFX12-NEXT:    s_wait_expcnt 0x036; DAGISEL-GFX12-NEXT:    s_wait_samplecnt 0x037; DAGISEL-GFX12-NEXT:    s_wait_bvhcnt 0x038; DAGISEL-GFX12-NEXT:    s_wait_kmcnt 0x039; DAGISEL-GFX12-NEXT:    s_mov_b32 s5, s040; DAGISEL-GFX12-NEXT:    s_mov_b32 s7, retry_vgpr_alloc@abs32@hi41; DAGISEL-GFX12-NEXT:    s_mov_b32 s6, retry_vgpr_alloc@abs32@lo42; DAGISEL-GFX12-NEXT:    s_mov_b32 s9, callee@abs32@hi43; DAGISEL-GFX12-NEXT:    s_mov_b32 s8, callee@abs32@lo44; DAGISEL-GFX12-NEXT:    s_mov_b32 s0, s145; DAGISEL-GFX12-NEXT:    s_mov_b32 s1, s246; DAGISEL-GFX12-NEXT:    s_mov_b32 s2, s347; DAGISEL-GFX12-NEXT:    s_alloc_vgpr s448; DAGISEL-GFX12-NEXT:    s_wait_alu depctr_sa_sdst(0)49; DAGISEL-GFX12-NEXT:    s_cselect_b64 s[8:9], s[8:9], s[6:7]50; DAGISEL-GFX12-NEXT:    s_cselect_b32 exec_lo, s5, -151; DAGISEL-GFX12-NEXT:    s_wait_alu depctr_sa_sdst(0)52; DAGISEL-GFX12-NEXT:    s_setpc_b64 s[8:9]53  call void(ptr, i32, <3 x i32>, { i32, ptr addrspace(5), i32, i32 }, i32, ...) @llvm.amdgcn.cs.chain(ptr @callee, i32 %exec, <3 x i32> inreg %sgpr, { i32, ptr addrspace(5), i32, i32 } %vgpr, i32 1, i32 inreg %num_vgpr, i32 inreg -1, ptr @retry_vgpr_alloc)54  unreachable55}56 57define amdgpu_cs_chain void @constants(<3 x i32> inreg %sgpr, { i32, ptr addrspace(5), i32, i32 } %vgpr) {58; GISEL-GFX12-LABEL: constants:59; GISEL-GFX12:       ; %bb.0:60; GISEL-GFX12-NEXT:    s_wait_loadcnt_dscnt 0x061; GISEL-GFX12-NEXT:    s_wait_expcnt 0x062; GISEL-GFX12-NEXT:    s_wait_samplecnt 0x063; GISEL-GFX12-NEXT:    s_wait_bvhcnt 0x064; GISEL-GFX12-NEXT:    s_wait_kmcnt 0x065; GISEL-GFX12-NEXT:    s_mov_b32 s4, callee@abs32@lo66; GISEL-GFX12-NEXT:    s_mov_b32 s5, callee@abs32@hi67; GISEL-GFX12-NEXT:    s_mov_b32 s6, retry_vgpr_alloc@abs32@lo68; GISEL-GFX12-NEXT:    s_mov_b32 s7, retry_vgpr_alloc@abs32@hi69; GISEL-GFX12-NEXT:    s_alloc_vgpr 6470; GISEL-GFX12-NEXT:    s_wait_alu depctr_sa_sdst(0)71; GISEL-GFX12-NEXT:    s_cselect_b64 s[4:5], s[4:5], s[6:7]72; GISEL-GFX12-NEXT:    s_cselect_b32 exec_lo, 7, -173; GISEL-GFX12-NEXT:    s_wait_alu depctr_sa_sdst(0)74; GISEL-GFX12-NEXT:    s_setpc_b64 s[4:5]75;76; DAGISEL-GFX12-LABEL: constants:77; DAGISEL-GFX12:       ; %bb.0:78; DAGISEL-GFX12-NEXT:    s_wait_loadcnt_dscnt 0x079; DAGISEL-GFX12-NEXT:    s_wait_expcnt 0x080; DAGISEL-GFX12-NEXT:    s_wait_samplecnt 0x081; DAGISEL-GFX12-NEXT:    s_wait_bvhcnt 0x082; DAGISEL-GFX12-NEXT:    s_wait_kmcnt 0x083; DAGISEL-GFX12-NEXT:    s_mov_b32 s5, retry_vgpr_alloc@abs32@hi84; DAGISEL-GFX12-NEXT:    s_mov_b32 s4, retry_vgpr_alloc@abs32@lo85; DAGISEL-GFX12-NEXT:    s_mov_b32 s7, callee@abs32@hi86; DAGISEL-GFX12-NEXT:    s_mov_b32 s6, callee@abs32@lo87; DAGISEL-GFX12-NEXT:    s_alloc_vgpr 6488; DAGISEL-GFX12-NEXT:    s_wait_alu depctr_sa_sdst(0)89; DAGISEL-GFX12-NEXT:    s_cselect_b64 s[6:7], s[6:7], s[4:5]90; DAGISEL-GFX12-NEXT:    s_cselect_b32 exec_lo, 7, -191; DAGISEL-GFX12-NEXT:    s_wait_alu depctr_sa_sdst(0)92; DAGISEL-GFX12-NEXT:    s_setpc_b64 s[6:7]93  call void(ptr, i32, <3 x i32>, { i32, ptr addrspace(5), i32, i32 }, i32, ...) @llvm.amdgcn.cs.chain(ptr @callee, i32 7, <3 x i32> inreg %sgpr, { i32, ptr addrspace(5), i32, i32 } %vgpr, i32 1, i32 inreg 64, i32 inreg -1, ptr @retry_vgpr_alloc)94  unreachable95}96 97declare amdgpu_cs_chain_preserve void @retry_vgpr_alloc(<3 x i32> inreg %sgpr)98