AMDGPU/GlobalISel: RegBankLegalize rules for reloc_constant (#188315)

This commit is contained in:
vangthao95 2026-03-25 09:11:01 -07:00 committed by GitHub
parent 69f9ff6c19
commit 3dd98b7423
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -1463,7 +1463,8 @@ RegBankLegalizeRules::RegBankLegalizeRules(const GCNSubtarget &_ST,
.Any({{S32}, {{Sgpr32}, {}}})
.Any({{S64}, {{Sgpr64}, {}}});
addRulesForIOpcs({amdgcn_groupstaticsize, amdgcn_pops_exiting_wave_id},
addRulesForIOpcs({amdgcn_groupstaticsize, amdgcn_pops_exiting_wave_id,
amdgcn_reloc_constant},
Standard)
.Uni(S32, {{Sgpr32}, {IntrId}});

View File

@ -1,8 +1,8 @@
; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s
; RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx900 -filetype=obj -o %t.o < %s && llvm-readobj -r %t.o | FileCheck --check-prefix=ELF %s
; RUN: llc -global-isel -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s
; RUN: llc -global-isel -mtriple=amdgcn--amdpal -mcpu=gfx900 -filetype=obj -o %t.o < %s && llvm-readobj -r %t.o | FileCheck --check-prefix=ELF %s
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn--amdpal -mcpu=gfx900 -filetype=obj -o %t.o < %s && llvm-readobj -r %t.o | FileCheck --check-prefix=ELF %s
; GCN-LABEL: {{^}}ps_main:
; GCN: v_mov_b32_{{.*}} v[[relocreg:[0-9]+]], doff_0_0_b@abs32@lo