1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -stop-after=irtranslator -o - %s | FileCheck --check-prefix=FIXED %s
4 ; Make sure arg1 is not allocated in v31, which is reserved for
5 ; workitem IDs with -amdgpu-fixed-function-abi.
7 define void @void_a31i32_i32([31 x i32] %arg0, i32 %arg1) {
8 ; FIXED-LABEL: name: void_a31i32_i32
9 ; FIXED: bb.1 (%ir-block.0):
10 ; FIXED-NEXT: 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
12 ; FIXED-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
13 ; FIXED-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
14 ; FIXED-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr2
15 ; FIXED-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $vgpr3
16 ; FIXED-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY $vgpr4
17 ; FIXED-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY $vgpr5
18 ; FIXED-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY $vgpr6
19 ; FIXED-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY $vgpr7
20 ; FIXED-NEXT: [[COPY8:%[0-9]+]]:_(s32) = COPY $vgpr8
21 ; FIXED-NEXT: [[COPY9:%[0-9]+]]:_(s32) = COPY $vgpr9
22 ; FIXED-NEXT: [[COPY10:%[0-9]+]]:_(s32) = COPY $vgpr10
23 ; FIXED-NEXT: [[COPY11:%[0-9]+]]:_(s32) = COPY $vgpr11
24 ; FIXED-NEXT: [[COPY12:%[0-9]+]]:_(s32) = COPY $vgpr12
25 ; FIXED-NEXT: [[COPY13:%[0-9]+]]:_(s32) = COPY $vgpr13
26 ; FIXED-NEXT: [[COPY14:%[0-9]+]]:_(s32) = COPY $vgpr14
27 ; FIXED-NEXT: [[COPY15:%[0-9]+]]:_(s32) = COPY $vgpr15
28 ; FIXED-NEXT: [[COPY16:%[0-9]+]]:_(s32) = COPY $vgpr16
29 ; FIXED-NEXT: [[COPY17:%[0-9]+]]:_(s32) = COPY $vgpr17
30 ; FIXED-NEXT: [[COPY18:%[0-9]+]]:_(s32) = COPY $vgpr18
31 ; FIXED-NEXT: [[COPY19:%[0-9]+]]:_(s32) = COPY $vgpr19
32 ; FIXED-NEXT: [[COPY20:%[0-9]+]]:_(s32) = COPY $vgpr20
33 ; FIXED-NEXT: [[COPY21:%[0-9]+]]:_(s32) = COPY $vgpr21
34 ; FIXED-NEXT: [[COPY22:%[0-9]+]]:_(s32) = COPY $vgpr22
35 ; FIXED-NEXT: [[COPY23:%[0-9]+]]:_(s32) = COPY $vgpr23
36 ; FIXED-NEXT: [[COPY24:%[0-9]+]]:_(s32) = COPY $vgpr24
37 ; FIXED-NEXT: [[COPY25:%[0-9]+]]:_(s32) = COPY $vgpr25
38 ; FIXED-NEXT: [[COPY26:%[0-9]+]]:_(s32) = COPY $vgpr26
39 ; FIXED-NEXT: [[COPY27:%[0-9]+]]:_(s32) = COPY $vgpr27
40 ; FIXED-NEXT: [[COPY28:%[0-9]+]]:_(s32) = COPY $vgpr28
41 ; FIXED-NEXT: [[COPY29:%[0-9]+]]:_(s32) = COPY $vgpr29
42 ; FIXED-NEXT: [[COPY30:%[0-9]+]]:_(s32) = COPY $vgpr30
43 ; FIXED-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p5) = G_FRAME_INDEX %fixed-stack.0
44 ; FIXED-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p5) :: (invariant load (s32) from %fixed-stack.0, align 16, addrspace 5)
45 ; FIXED-NEXT: [[DEF:%[0-9]+]]:_(p1) = G_IMPLICIT_DEF
46 ; FIXED-NEXT: G_STORE [[LOAD]](s32), [[DEF]](p1) :: (store (s32) into `ptr addrspace(1) undef`, addrspace 1)
47 ; FIXED-NEXT: SI_RETURN
48 store i32 %arg1, ptr addrspace(1) undef