1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -amdgpu-fixed-function-abi=1 -stop-after=irtranslator -o - %s | FileCheck -check-prefixes=COMMON,FIXED %s 3; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -amdgpu-fixed-function-abi=0 -stop-after=irtranslator -o - %s | FileCheck -check-prefixes=COMMON,VARABI %s 4 5; Make sure arg1 is not allocated in v31, which is reserved for 6; workitem IDs with -amdgpu-fixed-function-abi. 7 8define void @void_a31i32_i32([31 x i32] %arg0, i32 %arg1) { 9 ; FIXED-LABEL: name: void_a31i32_i32 10 ; FIXED: bb.1 (%ir-block.0): 11 ; FIXED: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4, $vgpr5, $vgpr6, $vgpr7, $vgpr8, $vgpr9, $vgpr10, $vgpr11, $vgpr12, $vgpr13, $vgpr14, $vgpr15, $vgpr16, $vgpr17, $vgpr18, $vgpr19, $vgpr20, $vgpr21, $vgpr22, $vgpr23, $vgpr24, $vgpr25, $vgpr26, $vgpr27, $vgpr28, $vgpr29, $vgpr30, $sgpr30_sgpr31 12 ; FIXED: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 13 ; FIXED: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1 14 ; FIXED: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr2 15 ; FIXED: [[COPY3:%[0-9]+]]:_(s32) = COPY $vgpr3 16 ; FIXED: [[COPY4:%[0-9]+]]:_(s32) = COPY $vgpr4 17 ; FIXED: [[COPY5:%[0-9]+]]:_(s32) = COPY $vgpr5 18 ; FIXED: [[COPY6:%[0-9]+]]:_(s32) = COPY $vgpr6 19 ; FIXED: [[COPY7:%[0-9]+]]:_(s32) = COPY $vgpr7 20 ; FIXED: [[COPY8:%[0-9]+]]:_(s32) = COPY $vgpr8 21 ; FIXED: [[COPY9:%[0-9]+]]:_(s32) = COPY $vgpr9 22 ; FIXED: [[COPY10:%[0-9]+]]:_(s32) = COPY $vgpr10 23 ; FIXED: [[COPY11:%[0-9]+]]:_(s32) = COPY $vgpr11 24 ; FIXED: [[COPY12:%[0-9]+]]:_(s32) = COPY $vgpr12 25 ; FIXED: [[COPY13:%[0-9]+]]:_(s32) = COPY $vgpr13 26 ; FIXED: [[COPY14:%[0-9]+]]:_(s32) = COPY $vgpr14 27 ; FIXED: [[COPY15:%[0-9]+]]:_(s32) = COPY $vgpr15 28 ; FIXED: [[COPY16:%[0-9]+]]:_(s32) = COPY $vgpr16 29 ; FIXED: [[COPY17:%[0-9]+]]:_(s32) = COPY $vgpr17 30 ; FIXED: [[COPY18:%[0-9]+]]:_(s32) = COPY $vgpr18 31 ; FIXED: [[COPY19:%[0-9]+]]:_(s32) = COPY $vgpr19 32 ; FIXED: [[COPY20:%[0-9]+]]:_(s32) = COPY $vgpr20 33 ; FIXED: [[COPY21:%[0-9]+]]:_(s32) = COPY $vgpr21 34 ; FIXED: [[COPY22:%[0-9]+]]:_(s32) = COPY $vgpr22 35 ; FIXED: [[COPY23:%[0-9]+]]:_(s32) = COPY $vgpr23 36 ; FIXED: [[COPY24:%[0-9]+]]:_(s32) = COPY $vgpr24 37 ; FIXED: [[COPY25:%[0-9]+]]:_(s32) = COPY $vgpr25 38 ; FIXED: [[COPY26:%[0-9]+]]:_(s32) = COPY $vgpr26 39 ; FIXED: [[COPY27:%[0-9]+]]:_(s32) = COPY $vgpr27 40 ; FIXED: [[COPY28:%[0-9]+]]:_(s32) = COPY $vgpr28 41 ; FIXED: [[COPY29:%[0-9]+]]:_(s32) = COPY $vgpr29 42 ; FIXED: [[COPY30:%[0-9]+]]:_(s32) = COPY $vgpr30 43 ; FIXED: [[FRAME_INDEX:%[0-9]+]]:_(p5) = G_FRAME_INDEX %fixed-stack.0 44 ; FIXED: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p5) :: (invariant load 4 from %fixed-stack.0, align 16, addrspace 5) 45 ; FIXED: [[COPY31:%[0-9]+]]:sgpr_64 = COPY $sgpr30_sgpr31 46 ; FIXED: [[DEF:%[0-9]+]]:_(p1) = G_IMPLICIT_DEF 47 ; FIXED: G_STORE [[LOAD]](s32), [[DEF]](p1) :: (store 4 into `i32 addrspace(1)* undef`, addrspace 1) 48 ; FIXED: [[COPY32:%[0-9]+]]:ccr_sgpr_64 = COPY [[COPY31]] 49 ; FIXED: S_SETPC_B64_return [[COPY32]] 50 ; VARABI-LABEL: name: void_a31i32_i32 51 ; VARABI: bb.1 (%ir-block.0): 52 ; VARABI: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4, $vgpr5, $vgpr6, $vgpr7, $vgpr8, $vgpr9, $vgpr10, $vgpr11, $vgpr12, $vgpr13, $vgpr14, $vgpr15, $vgpr16, $vgpr17, $vgpr18, $vgpr19, $vgpr20, $vgpr21, $vgpr22, $vgpr23, $vgpr24, $vgpr25, $vgpr26, $vgpr27, $vgpr28, $vgpr29, $vgpr30, $vgpr31, $sgpr30_sgpr31 53 ; VARABI: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 54 ; VARABI: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1 55 ; VARABI: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr2 56 ; VARABI: [[COPY3:%[0-9]+]]:_(s32) = COPY $vgpr3 57 ; VARABI: [[COPY4:%[0-9]+]]:_(s32) = COPY $vgpr4 58 ; VARABI: [[COPY5:%[0-9]+]]:_(s32) = COPY $vgpr5 59 ; VARABI: [[COPY6:%[0-9]+]]:_(s32) = COPY $vgpr6 60 ; VARABI: [[COPY7:%[0-9]+]]:_(s32) = COPY $vgpr7 61 ; VARABI: [[COPY8:%[0-9]+]]:_(s32) = COPY $vgpr8 62 ; VARABI: [[COPY9:%[0-9]+]]:_(s32) = COPY $vgpr9 63 ; VARABI: [[COPY10:%[0-9]+]]:_(s32) = COPY $vgpr10 64 ; VARABI: [[COPY11:%[0-9]+]]:_(s32) = COPY $vgpr11 65 ; VARABI: [[COPY12:%[0-9]+]]:_(s32) = COPY $vgpr12 66 ; VARABI: [[COPY13:%[0-9]+]]:_(s32) = COPY $vgpr13 67 ; VARABI: [[COPY14:%[0-9]+]]:_(s32) = COPY $vgpr14 68 ; VARABI: [[COPY15:%[0-9]+]]:_(s32) = COPY $vgpr15 69 ; VARABI: [[COPY16:%[0-9]+]]:_(s32) = COPY $vgpr16 70 ; VARABI: [[COPY17:%[0-9]+]]:_(s32) = COPY $vgpr17 71 ; VARABI: [[COPY18:%[0-9]+]]:_(s32) = COPY $vgpr18 72 ; VARABI: [[COPY19:%[0-9]+]]:_(s32) = COPY $vgpr19 73 ; VARABI: [[COPY20:%[0-9]+]]:_(s32) = COPY $vgpr20 74 ; VARABI: [[COPY21:%[0-9]+]]:_(s32) = COPY $vgpr21 75 ; VARABI: [[COPY22:%[0-9]+]]:_(s32) = COPY $vgpr22 76 ; VARABI: [[COPY23:%[0-9]+]]:_(s32) = COPY $vgpr23 77 ; VARABI: [[COPY24:%[0-9]+]]:_(s32) = COPY $vgpr24 78 ; VARABI: [[COPY25:%[0-9]+]]:_(s32) = COPY $vgpr25 79 ; VARABI: [[COPY26:%[0-9]+]]:_(s32) = COPY $vgpr26 80 ; VARABI: [[COPY27:%[0-9]+]]:_(s32) = COPY $vgpr27 81 ; VARABI: [[COPY28:%[0-9]+]]:_(s32) = COPY $vgpr28 82 ; VARABI: [[COPY29:%[0-9]+]]:_(s32) = COPY $vgpr29 83 ; VARABI: [[COPY30:%[0-9]+]]:_(s32) = COPY $vgpr30 84 ; VARABI: [[COPY31:%[0-9]+]]:_(s32) = COPY $vgpr31 85 ; VARABI: [[COPY32:%[0-9]+]]:sgpr_64 = COPY $sgpr30_sgpr31 86 ; VARABI: [[DEF:%[0-9]+]]:_(p1) = G_IMPLICIT_DEF 87 ; VARABI: G_STORE [[COPY31]](s32), [[DEF]](p1) :: (store 4 into `i32 addrspace(1)* undef`, addrspace 1) 88 ; VARABI: [[COPY33:%[0-9]+]]:ccr_sgpr_64 = COPY [[COPY32]] 89 ; VARABI: S_SETPC_B64_return [[COPY33]] 90 store i32 %arg1, i32 addrspace(1)* undef 91 ret void 92} 93