1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX6 %s 3# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s 4# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX9 %s 5# RUN: llc -march=amdgcn -mcpu=gfx1010 -mattr=-wavefrontsize32,+wavefrontsize64 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX10-WAVE64 %s 6# RUN: llc -march=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32,-wavefrontsize64 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX10-WAVE32 %s 7 8--- 9name: gep_p0_sgpr_sgpr 10legalized: true 11regBankSelected: true 12 13body: | 14 bb.0: 15 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 16 ; GFX6-LABEL: name: gep_p0_sgpr_sgpr 17 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 18 ; GFX6: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 19 ; GFX6: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 20 ; GFX6: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 21 ; GFX6: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 22 ; GFX6: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 23 ; GFX6: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 24 ; GFX6: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 25 ; GFX6: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 26 ; GFX6: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 27 ; GFX8-LABEL: name: gep_p0_sgpr_sgpr 28 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 29 ; GFX8: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 30 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 31 ; GFX8: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 32 ; GFX8: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 33 ; GFX8: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 34 ; GFX8: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 35 ; GFX8: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 36 ; GFX8: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 37 ; GFX8: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 38 ; GFX9-LABEL: name: gep_p0_sgpr_sgpr 39 ; GFX9: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 40 ; GFX9: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 41 ; GFX9: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 42 ; GFX9: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 43 ; GFX9: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 44 ; GFX9: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 45 ; GFX9: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 46 ; GFX9: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 47 ; GFX9: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 48 ; GFX9: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 49 ; GFX10-WAVE64-LABEL: name: gep_p0_sgpr_sgpr 50 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 51 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 52 ; GFX10-WAVE64: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 53 ; GFX10-WAVE64: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 54 ; GFX10-WAVE64: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 55 ; GFX10-WAVE64: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 56 ; GFX10-WAVE64: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 57 ; GFX10-WAVE64: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 58 ; GFX10-WAVE64: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 59 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 60 ; GFX10-WAVE32-LABEL: name: gep_p0_sgpr_sgpr 61 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 62 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 63 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 64 ; GFX10-WAVE32: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 65 ; GFX10-WAVE32: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 66 ; GFX10-WAVE32: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 67 ; GFX10-WAVE32: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 68 ; GFX10-WAVE32: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 69 ; GFX10-WAVE32: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 70 ; GFX10-WAVE32: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 71 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 72 %0:sgpr(p0) = COPY $sgpr0_sgpr1 73 %1:sgpr(s64) = COPY $sgpr2_sgpr3 74 %2:sgpr(p0) = G_PTR_ADD %0, %1 75 S_ENDPGM 0, implicit %2 76 77... 78 79--- 80name: gep_p0_vgpr_vgpr 81legalized: true 82regBankSelected: true 83 84body: | 85 bb.0: 86 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 87 ; GFX6-LABEL: name: gep_p0_vgpr_vgpr 88 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 89 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 90 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 91 ; GFX6: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 92 ; GFX6: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 93 ; GFX6: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 94 ; GFX6: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 95 ; GFX6: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 96 ; GFX6: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 97 ; GFX6: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 98 ; GFX8-LABEL: name: gep_p0_vgpr_vgpr 99 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 100 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 101 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 102 ; GFX8: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 103 ; GFX8: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 104 ; GFX8: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 105 ; GFX8: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 106 ; GFX8: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 107 ; GFX8: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 108 ; GFX8: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 109 ; GFX9-LABEL: name: gep_p0_vgpr_vgpr 110 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 111 ; GFX9: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 112 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 113 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 114 ; GFX9: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 115 ; GFX9: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 116 ; GFX9: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 117 ; GFX9: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 118 ; GFX9: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 119 ; GFX9: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 120 ; GFX10-WAVE64-LABEL: name: gep_p0_vgpr_vgpr 121 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 122 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 123 ; GFX10-WAVE64: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 124 ; GFX10-WAVE64: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 125 ; GFX10-WAVE64: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 126 ; GFX10-WAVE64: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 127 ; GFX10-WAVE64: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 128 ; GFX10-WAVE64: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 129 ; GFX10-WAVE64: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 130 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 131 ; GFX10-WAVE32-LABEL: name: gep_p0_vgpr_vgpr 132 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 133 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 134 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 135 ; GFX10-WAVE32: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 136 ; GFX10-WAVE32: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 137 ; GFX10-WAVE32: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 138 ; GFX10-WAVE32: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 139 ; GFX10-WAVE32: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 140 ; GFX10-WAVE32: %8:vgpr_32, dead %10:sreg_32_xm0_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 141 ; GFX10-WAVE32: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 142 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 143 %0:vgpr(p0) = COPY $vgpr0_vgpr1 144 %1:vgpr(s64) = COPY $vgpr2_vgpr3 145 %2:vgpr(p0) = G_PTR_ADD %0, %1 146 S_ENDPGM 0, implicit %2 147 148... 149 150--- 151name: gep_p0_sgpr_vgpr 152legalized: true 153regBankSelected: true 154 155body: | 156 bb.0: 157 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1 158 ; GFX6-LABEL: name: gep_p0_sgpr_vgpr 159 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 160 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 161 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 162 ; GFX6: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 163 ; GFX6: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 164 ; GFX6: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 165 ; GFX6: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 166 ; GFX6: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 167 ; GFX6: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 168 ; GFX6: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 169 ; GFX8-LABEL: name: gep_p0_sgpr_vgpr 170 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 171 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 172 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 173 ; GFX8: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 174 ; GFX8: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 175 ; GFX8: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 176 ; GFX8: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 177 ; GFX8: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 178 ; GFX8: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 179 ; GFX8: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 180 ; GFX9-LABEL: name: gep_p0_sgpr_vgpr 181 ; GFX9: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 182 ; GFX9: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 183 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 184 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 185 ; GFX9: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 186 ; GFX9: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 187 ; GFX9: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 188 ; GFX9: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 189 ; GFX9: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 190 ; GFX9: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 191 ; GFX10-WAVE64-LABEL: name: gep_p0_sgpr_vgpr 192 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 193 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 194 ; GFX10-WAVE64: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 195 ; GFX10-WAVE64: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 196 ; GFX10-WAVE64: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 197 ; GFX10-WAVE64: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 198 ; GFX10-WAVE64: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 199 ; GFX10-WAVE64: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 200 ; GFX10-WAVE64: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 201 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 202 ; GFX10-WAVE32-LABEL: name: gep_p0_sgpr_vgpr 203 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 204 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 205 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 206 ; GFX10-WAVE32: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 207 ; GFX10-WAVE32: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 208 ; GFX10-WAVE32: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 209 ; GFX10-WAVE32: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 210 ; GFX10-WAVE32: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 211 ; GFX10-WAVE32: %8:vgpr_32, dead %10:sreg_32_xm0_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 212 ; GFX10-WAVE32: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 213 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 214 %0:sgpr(p0) = COPY $sgpr0_sgpr1 215 %1:vgpr(s64) = COPY $vgpr0_vgpr1 216 %2:vgpr(p0) = G_PTR_ADD %0, %1 217 S_ENDPGM 0, implicit %2 218 219... 220 221--- 222name: gep_p3_sgpr_sgpr 223legalized: true 224regBankSelected: true 225 226body: | 227 bb.0: 228 liveins: $sgpr0, $sgpr1 229 ; GFX6-LABEL: name: gep_p3_sgpr_sgpr 230 ; GFX6: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 231 ; GFX6: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 232 ; GFX6: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 233 ; GFX6: S_ENDPGM 0, implicit [[S_ADD_U32_]] 234 ; GFX8-LABEL: name: gep_p3_sgpr_sgpr 235 ; GFX8: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 236 ; GFX8: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 237 ; GFX8: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 238 ; GFX8: S_ENDPGM 0, implicit [[S_ADD_U32_]] 239 ; GFX9-LABEL: name: gep_p3_sgpr_sgpr 240 ; GFX9: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 241 ; GFX9: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 242 ; GFX9: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 243 ; GFX9: S_ENDPGM 0, implicit [[S_ADD_U32_]] 244 ; GFX10-WAVE64-LABEL: name: gep_p3_sgpr_sgpr 245 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 246 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 247 ; GFX10-WAVE64: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 248 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[S_ADD_U32_]] 249 ; GFX10-WAVE32-LABEL: name: gep_p3_sgpr_sgpr 250 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 251 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 252 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 253 ; GFX10-WAVE32: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 254 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[S_ADD_U32_]] 255 %0:sgpr(p3) = COPY $sgpr0 256 %1:sgpr(s32) = COPY $sgpr1 257 %2:sgpr(p3) = G_PTR_ADD %0, %1 258 S_ENDPGM 0, implicit %2 259 260... 261 262--- 263name: gep_p3_vgpr_vgpr 264legalized: true 265regBankSelected: true 266 267body: | 268 bb.0: 269 liveins: $vgpr0, $vgpr1 270 ; GFX6-LABEL: name: gep_p3_vgpr_vgpr 271 ; GFX6: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 272 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 273 ; GFX6: %2:vgpr_32, dead %3:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 274 ; GFX6: S_ENDPGM 0, implicit %2 275 ; GFX8-LABEL: name: gep_p3_vgpr_vgpr 276 ; GFX8: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 277 ; GFX8: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 278 ; GFX8: %2:vgpr_32, dead %3:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 279 ; GFX8: S_ENDPGM 0, implicit %2 280 ; GFX9-LABEL: name: gep_p3_vgpr_vgpr 281 ; GFX9: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 282 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 283 ; GFX9: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 284 ; GFX9: S_ENDPGM 0, implicit [[V_ADD_U32_e64_]] 285 ; GFX10-WAVE64-LABEL: name: gep_p3_vgpr_vgpr 286 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 287 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 288 ; GFX10-WAVE64: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 289 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[V_ADD_U32_e64_]] 290 ; GFX10-WAVE32-LABEL: name: gep_p3_vgpr_vgpr 291 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 292 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 293 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 294 ; GFX10-WAVE32: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 295 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[V_ADD_U32_e64_]] 296 %0:vgpr(p3) = COPY $vgpr0 297 %1:vgpr(s32) = COPY $vgpr1 298 %2:vgpr(p3) = G_PTR_ADD %0, %1 299 S_ENDPGM 0, implicit %2 300 301... 302 303--- 304name: gep_p3_sgpr_vgpr 305legalized: true 306regBankSelected: true 307 308body: | 309 bb.0: 310 liveins: $sgpr0, $vgpr0 311 ; GFX6-LABEL: name: gep_p3_sgpr_vgpr 312 ; GFX6: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 313 ; GFX6: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 314 ; GFX6: %2:vgpr_32, dead %3:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 315 ; GFX6: S_ENDPGM 0, implicit %2 316 ; GFX8-LABEL: name: gep_p3_sgpr_vgpr 317 ; GFX8: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 318 ; GFX8: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 319 ; GFX8: %2:vgpr_32, dead %3:sreg_64_xexec = V_ADD_I32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 320 ; GFX8: S_ENDPGM 0, implicit %2 321 ; GFX9-LABEL: name: gep_p3_sgpr_vgpr 322 ; GFX9: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 323 ; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 324 ; GFX9: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 325 ; GFX9: S_ENDPGM 0, implicit [[V_ADD_U32_e64_]] 326 ; GFX10-WAVE64-LABEL: name: gep_p3_sgpr_vgpr 327 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 328 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 329 ; GFX10-WAVE64: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 330 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[V_ADD_U32_e64_]] 331 ; GFX10-WAVE32-LABEL: name: gep_p3_sgpr_vgpr 332 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 333 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 334 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 335 ; GFX10-WAVE32: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 [[COPY]], [[COPY1]], 0, implicit $exec 336 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[V_ADD_U32_e64_]] 337 %0:sgpr(p3) = COPY $sgpr0 338 %1:vgpr(s32) = COPY $vgpr0 339 %2:vgpr(p3) = G_PTR_ADD %0, %1 340 S_ENDPGM 0, implicit %2 341 342... 343 344--- 345name: gep_p6_sgpr_sgpr 346legalized: true 347regBankSelected: true 348 349body: | 350 bb.0: 351 liveins: $sgpr0, $sgpr1 352 ; GFX6-LABEL: name: gep_p6_sgpr_sgpr 353 ; GFX6: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 354 ; GFX6: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 355 ; GFX6: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 356 ; GFX6: S_ENDPGM 0, implicit [[S_ADD_U32_]] 357 ; GFX8-LABEL: name: gep_p6_sgpr_sgpr 358 ; GFX8: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 359 ; GFX8: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 360 ; GFX8: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 361 ; GFX8: S_ENDPGM 0, implicit [[S_ADD_U32_]] 362 ; GFX9-LABEL: name: gep_p6_sgpr_sgpr 363 ; GFX9: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 364 ; GFX9: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 365 ; GFX9: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 366 ; GFX9: S_ENDPGM 0, implicit [[S_ADD_U32_]] 367 ; GFX10-WAVE64-LABEL: name: gep_p6_sgpr_sgpr 368 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 369 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 370 ; GFX10-WAVE64: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 371 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[S_ADD_U32_]] 372 ; GFX10-WAVE32-LABEL: name: gep_p6_sgpr_sgpr 373 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 374 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 375 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 376 ; GFX10-WAVE32: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 377 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[S_ADD_U32_]] 378 %0:sgpr(p6) = COPY $sgpr0 379 %1:sgpr(s32) = COPY $sgpr1 380 %2:sgpr(p6) = G_PTR_ADD %0, %1 381 S_ENDPGM 0, implicit %2 382 383... 384 385--- 386name: gep_p2_sgpr_sgpr 387legalized: true 388regBankSelected: true 389 390body: | 391 bb.0: 392 liveins: $sgpr0, $sgpr1 393 ; GFX6-LABEL: name: gep_p2_sgpr_sgpr 394 ; GFX6: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 395 ; GFX6: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 396 ; GFX6: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 397 ; GFX6: S_ENDPGM 0, implicit [[S_ADD_U32_]] 398 ; GFX8-LABEL: name: gep_p2_sgpr_sgpr 399 ; GFX8: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 400 ; GFX8: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 401 ; GFX8: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 402 ; GFX8: S_ENDPGM 0, implicit [[S_ADD_U32_]] 403 ; GFX9-LABEL: name: gep_p2_sgpr_sgpr 404 ; GFX9: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 405 ; GFX9: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 406 ; GFX9: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 407 ; GFX9: S_ENDPGM 0, implicit [[S_ADD_U32_]] 408 ; GFX10-WAVE64-LABEL: name: gep_p2_sgpr_sgpr 409 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 410 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 411 ; GFX10-WAVE64: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 412 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[S_ADD_U32_]] 413 ; GFX10-WAVE32-LABEL: name: gep_p2_sgpr_sgpr 414 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 415 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 416 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1 417 ; GFX10-WAVE32: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY]], [[COPY1]], implicit-def $scc 418 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[S_ADD_U32_]] 419 %0:sgpr(p2) = COPY $sgpr0 420 %1:sgpr(s32) = COPY $sgpr1 421 %2:sgpr(p2) = G_PTR_ADD %0, %1 422 S_ENDPGM 0, implicit %2 423 424... 425 426--- 427name: gep_p999_sgpr_sgpr 428legalized: true 429regBankSelected: true 430 431body: | 432 bb.0: 433 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 434 ; GFX6-LABEL: name: gep_p999_sgpr_sgpr 435 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 436 ; GFX6: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 437 ; GFX6: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 438 ; GFX6: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 439 ; GFX6: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 440 ; GFX6: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 441 ; GFX6: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 442 ; GFX6: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 443 ; GFX6: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 444 ; GFX6: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 445 ; GFX8-LABEL: name: gep_p999_sgpr_sgpr 446 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 447 ; GFX8: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 448 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 449 ; GFX8: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 450 ; GFX8: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 451 ; GFX8: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 452 ; GFX8: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 453 ; GFX8: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 454 ; GFX8: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 455 ; GFX8: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 456 ; GFX9-LABEL: name: gep_p999_sgpr_sgpr 457 ; GFX9: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 458 ; GFX9: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 459 ; GFX9: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 460 ; GFX9: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 461 ; GFX9: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 462 ; GFX9: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 463 ; GFX9: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 464 ; GFX9: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 465 ; GFX9: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 466 ; GFX9: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 467 ; GFX10-WAVE64-LABEL: name: gep_p999_sgpr_sgpr 468 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 469 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 470 ; GFX10-WAVE64: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 471 ; GFX10-WAVE64: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 472 ; GFX10-WAVE64: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 473 ; GFX10-WAVE64: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 474 ; GFX10-WAVE64: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 475 ; GFX10-WAVE64: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 476 ; GFX10-WAVE64: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 477 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 478 ; GFX10-WAVE32-LABEL: name: gep_p999_sgpr_sgpr 479 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 480 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 481 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 482 ; GFX10-WAVE32: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 483 ; GFX10-WAVE32: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub0 484 ; GFX10-WAVE32: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 485 ; GFX10-WAVE32: [[COPY5:%[0-9]+]]:sreg_32 = COPY [[COPY1]].sub1 486 ; GFX10-WAVE32: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY2]], [[COPY3]], implicit-def $scc 487 ; GFX10-WAVE32: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY4]], [[COPY5]], implicit-def $scc, implicit $scc 488 ; GFX10-WAVE32: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 489 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 490 %0:sgpr(p999) = COPY $sgpr0_sgpr1 491 %1:sgpr(s64) = COPY $sgpr2_sgpr3 492 %2:sgpr(p999) = G_PTR_ADD %0, %1 493 S_ENDPGM 0, implicit %2 494 495... 496 497--- 498name: gep_p999_vgpr_vgpr 499legalized: true 500regBankSelected: true 501 502body: | 503 bb.0: 504 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 505 ; GFX6-LABEL: name: gep_p999_vgpr_vgpr 506 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 507 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 508 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 509 ; GFX6: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 510 ; GFX6: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 511 ; GFX6: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 512 ; GFX6: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 513 ; GFX6: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 514 ; GFX6: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 515 ; GFX6: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 516 ; GFX8-LABEL: name: gep_p999_vgpr_vgpr 517 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 518 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 519 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 520 ; GFX8: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 521 ; GFX8: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 522 ; GFX8: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 523 ; GFX8: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 524 ; GFX8: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 525 ; GFX8: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 526 ; GFX8: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 527 ; GFX9-LABEL: name: gep_p999_vgpr_vgpr 528 ; GFX9: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 529 ; GFX9: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 530 ; GFX9: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 531 ; GFX9: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 532 ; GFX9: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 533 ; GFX9: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 534 ; GFX9: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 535 ; GFX9: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 536 ; GFX9: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 537 ; GFX9: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 538 ; GFX10-WAVE64-LABEL: name: gep_p999_vgpr_vgpr 539 ; GFX10-WAVE64: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 540 ; GFX10-WAVE64: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 541 ; GFX10-WAVE64: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 542 ; GFX10-WAVE64: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 543 ; GFX10-WAVE64: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 544 ; GFX10-WAVE64: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 545 ; GFX10-WAVE64: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_64_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 546 ; GFX10-WAVE64: %8:vgpr_32, dead %10:sreg_64_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 547 ; GFX10-WAVE64: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 548 ; GFX10-WAVE64: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 549 ; GFX10-WAVE32-LABEL: name: gep_p999_vgpr_vgpr 550 ; GFX10-WAVE32: $vcc_hi = IMPLICIT_DEF 551 ; GFX10-WAVE32: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 552 ; GFX10-WAVE32: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 553 ; GFX10-WAVE32: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub0 554 ; GFX10-WAVE32: [[COPY3:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub0 555 ; GFX10-WAVE32: [[COPY4:%[0-9]+]]:vgpr_32 = COPY [[COPY]].sub1 556 ; GFX10-WAVE32: [[COPY5:%[0-9]+]]:vgpr_32 = COPY [[COPY1]].sub1 557 ; GFX10-WAVE32: [[V_ADD_I32_e64_:%[0-9]+]]:vgpr_32, [[V_ADD_I32_e64_1:%[0-9]+]]:sreg_32_xm0_xexec = V_ADD_I32_e64 [[COPY2]], [[COPY3]], 0, implicit $exec 558 ; GFX10-WAVE32: %8:vgpr_32, dead %10:sreg_32_xm0_xexec = V_ADDC_U32_e64 [[COPY4]], [[COPY5]], killed [[V_ADD_I32_e64_1]], 0, implicit $exec 559 ; GFX10-WAVE32: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[V_ADD_I32_e64_]], %subreg.sub0, %8, %subreg.sub1 560 ; GFX10-WAVE32: S_ENDPGM 0, implicit [[REG_SEQUENCE]] 561 %0:vgpr(p999) = COPY $vgpr0_vgpr1 562 %1:vgpr(s64) = COPY $vgpr2_vgpr3 563 %2:vgpr(p999) = G_PTR_ADD %0, %1 564 S_ENDPGM 0, implicit %2 565 566... 567