1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=kaveri -verify-machineinstrs -run-pass=prologepilog -o - %s | FileCheck -check-prefix=GCN %s
---
name: func_add_constant_to_fi_divergent_i32
tracksRegLiveness: true
stack:
- { id: 0, type: default, offset: 0, size: 8, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: 0, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
machineFunctionInfo:
stackPtrOffsetReg: '$sgpr32'
body: |
bb.0:
liveins: $vgpr31, $sgpr30_sgpr31
; GCN-LABEL: name: func_add_constant_to_fi_divergent_i32
; GCN: liveins: $vgpr31, $sgpr30_sgpr31
; GCN-NEXT: {{ $}}
; GCN-NEXT: renamable $vgpr0 = V_AND_B32_e32 1023, killed $vgpr31, implicit $exec
; GCN-NEXT: renamable $vgpr0 = V_LSHLREV_B32_e32 2, killed $vgpr0, implicit $exec
; GCN-NEXT: $vgpr1 = V_LSHRREV_B32_e64 6, $sgpr32, implicit $exec
; GCN-NEXT: renamable $vgpr0 = V_ADD_CO_U32_e32 killed $vgpr1, killed $vgpr0, implicit-def dead $vcc, implicit $exec
; GCN-NEXT: renamable $vgpr0, dead renamable $vcc = nuw V_ADD_CO_U32_e64 4, killed $vgpr0, 0, implicit $exec
; GCN-NEXT: $m0 = S_MOV_B32 -1
; GCN-NEXT: DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
; GCN-NEXT: S_SETPC_B64_return killed renamable $sgpr30_sgpr31
renamable $vgpr0 = V_AND_B32_e32 1023, killed $vgpr31, implicit $exec
renamable $vgpr0 = V_LSHLREV_B32_e32 2, killed $vgpr0, implicit $exec
renamable $vgpr0 = V_ADD_CO_U32_e32 %stack.0, killed $vgpr0, implicit-def dead $vcc, implicit $exec
renamable $vgpr0, dead renamable $vcc = nuw V_ADD_CO_U32_e64 4, killed $vgpr0, 0, implicit $exec
$m0 = S_MOV_B32 -1
DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
S_SETPC_B64_return killed renamable $sgpr30_sgpr31
...
---
name: func_add_constant_to_fi_uniform_i32
tracksRegLiveness: true
stack:
- { id: 0, type: default, offset: 0, size: 8, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: 0, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
machineFunctionInfo:
stackPtrOffsetReg: '$sgpr32'
body: |
bb.0:
liveins: $sgpr30_sgpr31
; GCN-LABEL: name: func_add_constant_to_fi_uniform_i32
; GCN: liveins: $sgpr30_sgpr31
; GCN-NEXT: {{ $}}
; GCN-NEXT: $sgpr0 = S_LSHR_B32 6, $sgpr32, implicit-def dead $scc
; GCN-NEXT: renamable $sgpr4 = nuw S_ADD_I32 killed $sgpr0, 4, implicit-def dead $scc
; GCN-NEXT: renamable $vgpr0 = COPY killed renamable $sgpr4, implicit $exec
; GCN-NEXT: $m0 = S_MOV_B32 -1
; GCN-NEXT: DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
; GCN-NEXT: S_SETPC_B64_return killed renamable $sgpr30_sgpr31
renamable $sgpr4 = nuw S_ADD_I32 %stack.0, 4, implicit-def dead $scc
renamable $vgpr0 = COPY killed renamable $sgpr4, implicit $exec
$m0 = S_MOV_B32 -1
DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
S_SETPC_B64_return killed renamable $sgpr30_sgpr31
...
---
name: func_add_constant_to_fi_uniform_SCC_clobber_i32
tracksRegLiveness: true
stack:
- { id: 0, type: default, offset: 0, size: 8, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: 0, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
- { id: 1, type: default, offset: 0, size: 32, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: 512, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
machineFunctionInfo:
stackPtrOffsetReg: '$sgpr32'
body: |
bb.0:
liveins: $sgpr30_sgpr31
; GCN-LABEL: name: func_add_constant_to_fi_uniform_SCC_clobber_i32
; GCN: liveins: $sgpr30_sgpr31
; GCN-NEXT: {{ $}}
; GCN-NEXT: $sgpr0 = S_LSHR_B32 6, $sgpr32, implicit-def dead $scc
; GCN-NEXT: renamable $sgpr4 = nuw S_ADD_U32 killed $sgpr0, 4, implicit-def $scc
; GCN-NEXT: renamable $sgpr5 = S_ADDC_U32 $sgpr4, 1234567, implicit-def $scc, implicit $scc
; GCN-NEXT: $sgpr0 = S_LSHR_B32 $sgpr32, 6, implicit-def $scc
; GCN-NEXT: $sgpr0 = S_ADD_I32 killed $sgpr0, 8, implicit-def $scc
; GCN-NEXT: renamable $sgpr6 = S_MUL_I32 killed $sgpr0, $sgpr5
; GCN-NEXT: renamable $vgpr0 = COPY killed renamable $sgpr6, implicit $exec
; GCN-NEXT: $m0 = S_MOV_B32 -1
; GCN-NEXT: DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
; GCN-NEXT: S_SETPC_B64_return killed renamable $sgpr30_sgpr31
renamable $sgpr4 = nuw S_ADD_U32 %stack.0, 4, implicit-def $scc
renamable $sgpr5 = S_ADDC_U32 $sgpr4, 1234567, implicit-def $scc, implicit $scc
renamable $sgpr6 = S_MUL_I32 %stack.1, $sgpr5
renamable $vgpr0 = COPY killed renamable $sgpr6, implicit $exec
$m0 = S_MOV_B32 -1
DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
S_SETPC_B64_return killed renamable $sgpr30_sgpr31
...
---
name: func_other_fi_user_non_inline_imm_offset_i32
tracksRegLiveness: true
stack:
- { id: 0, type: default, offset: 0, size: 512, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: 0, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
- { id: 1, type: default, offset: 0, size: 32, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: 512, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
machineFunctionInfo:
scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
stackPtrOffsetReg: '$sgpr32'
body: |
bb.0:
liveins: $sgpr30_sgpr31
; GCN-LABEL: name: func_other_fi_user_non_inline_imm_offset_i32
; GCN: liveins: $sgpr30_sgpr31
; GCN-NEXT: {{ $}}
; GCN-NEXT: renamable $vgpr0 = V_MOV_B32_e32 7, implicit $exec
; GCN-NEXT: BUFFER_STORE_DWORD_OFFSET killed renamable $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 260, 0, 0, implicit $exec
; GCN-NEXT: $sgpr5 = S_LSHR_B32 $sgpr32, 6, implicit-def $scc
; GCN-NEXT: $sgpr5 = S_ADD_I32 killed $sgpr5, 512, implicit-def $scc
; GCN-NEXT: renamable $sgpr4 = S_MUL_I32 killed $sgpr5, 9
; GCN-NEXT: renamable $vgpr0 = COPY killed renamable $sgpr4, implicit $exec
; GCN-NEXT: $m0 = S_MOV_B32 -1
; GCN-NEXT: DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
; GCN-NEXT: S_SETPC_B64_return killed renamable $sgpr30_sgpr31
renamable $vgpr0 = V_MOV_B32_e32 7, implicit $exec
BUFFER_STORE_DWORD_OFFEN killed renamable $vgpr0, %stack.0, $sgpr0_sgpr1_sgpr2_sgpr3, 0, 260, 0, 0, implicit $exec
renamable $sgpr4 = S_MUL_I32 %stack.1, 9
renamable $vgpr0 = COPY killed renamable $sgpr4, implicit $exec
$m0 = S_MOV_B32 -1
DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
S_SETPC_B64_return killed renamable $sgpr30_sgpr31
...
---
name: func_add_constant_to_fi_uniform_live_SCC_i32
tracksRegLiveness: true
stack:
- { id: 0, type: default, offset: 0, size: 8, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: 0, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
machineFunctionInfo:
stackPtrOffsetReg: '$sgpr32'
body: |
bb.0:
liveins: $sgpr30_sgpr31, $sgpr10
; GCN-LABEL: name: func_add_constant_to_fi_uniform_live_SCC_i32
; GCN: liveins: $sgpr10, $sgpr30_sgpr31
; GCN-NEXT: {{ $}}
; GCN-NEXT: renamable $sgpr4 = nuw S_ADD_U32 $sgpr10, 4, implicit-def $scc
; GCN-NEXT: $vgpr0 = V_LSHRREV_B32_e64 6, $sgpr32, implicit $exec
; GCN-NEXT: $sgpr0 = V_READFIRSTLANE_B32 $vgpr0, implicit $exec
; GCN-NEXT: renamable $sgpr5 = S_MUL_I32 killed $sgpr0, $sgpr4
; GCN-NEXT: renamable $sgpr6 = S_ADDC_U32 $sgpr5, 1234567, implicit-def dead $scc, implicit $scc
; GCN-NEXT: renamable $vgpr0 = COPY killed renamable $sgpr6, implicit $exec
; GCN-NEXT: $m0 = S_MOV_B32 -1
; GCN-NEXT: DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
; GCN-NEXT: S_SETPC_B64_return killed renamable $sgpr30_sgpr31
renamable $sgpr4 = nuw S_ADD_U32 $sgpr10, 4, implicit-def $scc
renamable $sgpr5 = S_MUL_I32 %stack.0, $sgpr4
renamable $sgpr6 = S_ADDC_U32 $sgpr5, 1234567, implicit-def dead $scc, implicit $scc
renamable $vgpr0 = COPY killed renamable $sgpr6, implicit $exec
$m0 = S_MOV_B32 -1
DS_WRITE_B32 undef renamable $vgpr0, killed renamable $vgpr0, 0, 0, implicit $m0, implicit $exec
S_SETPC_B64_return killed renamable $sgpr30_sgpr31
...
---
name: func_frame_idx_at_the_end_of_bb
tracksRegLiveness: true
stack:
- { id: 0, type: default, offset: 0, size: 8, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
local-offset: 0, debug-info-variable: '', debug-info-expression: '',
debug-info-location: '' }
machineFunctionInfo:
stackPtrOffsetReg: '$sgpr32'
body: |
bb.0:
liveins: $vgpr31
; GCN-LABEL: name: func_frame_idx_at_the_end_of_bb
; GCN: liveins: $vgpr31
; GCN-NEXT: {{ $}}
; GCN-NEXT: renamable $vgpr0 = V_AND_B32_e32 1023, killed $vgpr31, implicit $exec
; GCN-NEXT: renamable $vgpr0 = V_LSHLREV_B32_e32 2, killed $vgpr0, implicit $exec
; GCN-NEXT: $vgpr1 = V_LSHRREV_B32_e64 6, $sgpr32, implicit $exec
; GCN-NEXT: renamable $vgpr0 = V_ADD_CO_U32_e32 killed $vgpr1, killed $vgpr0, implicit-def dead $vcc, implicit $exec
renamable $vgpr0 = V_AND_B32_e32 1023, killed $vgpr31, implicit $exec
renamable $vgpr0 = V_LSHLREV_B32_e32 2, killed $vgpr0, implicit $exec
renamable $vgpr0 = V_ADD_CO_U32_e32 %stack.0, killed $vgpr0, implicit-def dead $vcc, implicit $exec
...
|