1// RUN: llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx904 --amdhsa-code-object-version=3 -mattr=+xnack < %s | FileCheck --check-prefix=ASM %s 2 3.text 4// ASM: .text 5 6.amdgcn_target "amdgcn-amd-amdhsa--gfx904+xnack" 7// ASM: .amdgcn_target "amdgcn-amd-amdhsa--gfx904+xnack" 8 9 10// ASM-LABEL: .amdhsa_kernel user_sgprs_implied_count 11// ASM: .amdhsa_user_sgpr_count 15 12.amdhsa_kernel user_sgprs_implied_count_all 13 .amdhsa_user_sgpr_private_segment_buffer 1 14 .amdhsa_user_sgpr_dispatch_ptr 1 15 .amdhsa_user_sgpr_queue_ptr 1 16 .amdhsa_user_sgpr_kernarg_segment_ptr 1 17 .amdhsa_user_sgpr_dispatch_id 1 18 .amdhsa_user_sgpr_flat_scratch_init 1 19 .amdhsa_user_sgpr_private_segment_size 1 20 .amdhsa_next_free_vgpr 32 21 .amdhsa_next_free_sgpr 32 22.end_amdhsa_kernel 23 24// ASM-LABEL: .amdhsa_kernel user_sgprs_implied_count_0 25// ASM: .amdhsa_user_sgpr_count 7 26.amdhsa_kernel user_sgprs_implied_count_0 27 .amdhsa_user_sgpr_queue_ptr 1 28 .amdhsa_user_sgpr_kernarg_segment_ptr 1 29 .amdhsa_user_sgpr_flat_scratch_init 1 30 .amdhsa_user_sgpr_private_segment_size 1 31 .amdhsa_next_free_vgpr 32 32 .amdhsa_next_free_sgpr 32 33.end_amdhsa_kernel 34 35// ASM-LABEL: .amdhsa_kernel user_sgprs_implied_count_1 36// ASM: .amdhsa_user_sgpr_count 9 37.amdhsa_kernel user_sgprs_implied_count_1 38 .amdhsa_user_sgpr_private_segment_buffer 1 39 .amdhsa_user_sgpr_queue_ptr 1 40 .amdhsa_user_sgpr_kernarg_segment_ptr 1 41 .amdhsa_user_sgpr_private_segment_size 1 42 .amdhsa_next_free_vgpr 32 43 .amdhsa_next_free_sgpr 32 44.end_amdhsa_kernel 45 46 47// ASM-LABEL: .amdhsa_kernel user_sgprs_implied_count_private_segment_buffer 48// ASM: .amdhsa_user_sgpr_count 4 49 .amdhsa_kernel user_sgprs_implied_count_private_segment_buffer 50 .amdhsa_user_sgpr_private_segment_buffer 1 51 .amdhsa_next_free_vgpr 32 52 .amdhsa_next_free_sgpr 32 53.end_amdhsa_kernel 54 55 56// ASM-LABEL: .amdhsa_kernel explicit_user_sgpr_count_16 57.amdhsa_kernel explicit_user_sgpr_count_16 58 .amdhsa_user_sgpr_count 16 59 .amdhsa_next_free_vgpr 32 60 .amdhsa_next_free_sgpr 32 61.end_amdhsa_kernel 62 63 64// ASM-LABEL: .amdhsa_kernel explicit_user_sgpr_count_0 65// ASM: .amdhsa_user_sgpr_count 0 66 .amdhsa_kernel explicit_user_sgpr_count_0 67 .amdhsa_user_sgpr_count 0 68 .amdhsa_next_free_vgpr 32 69 .amdhsa_next_free_sgpr 32 70.end_amdhsa_kernel 71 72// ASM-LABEL: .amdhsa_kernel explicit_user_sgpr_count_1 73// ASM: .amdhsa_user_sgpr_count 1 74.amdhsa_kernel explicit_user_sgpr_count_1 75 .amdhsa_user_sgpr_count 1 76 .amdhsa_next_free_vgpr 32 77 .amdhsa_next_free_sgpr 32 78.end_amdhsa_kernel 79 80.amdhsa_kernel explicit_user_sgpr_count_larger_than_implied 81 .amdhsa_user_sgpr_count 12 82 .amdhsa_user_sgpr_private_segment_buffer 1 83 .amdhsa_user_sgpr_queue_ptr 1 84 .amdhsa_user_sgpr_kernarg_segment_ptr 1 85 .amdhsa_next_free_vgpr 32 86 .amdhsa_next_free_sgpr 32 87.end_amdhsa_kernel 88