[llvm] AMDGPU/GlobalISel: RegBankLegalize rules for ds_add/sub_gs_reg_rtn (PR #185991)
Petar Avramovic via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 03:48:53 PDT 2026
================
@@ -1545,4 +1540,11 @@ RegBankLegalizeRules::RegBankLegalizeRules(const GCNSubtarget &_ST,
.Any({{UniB512}, {{SgprB512}, {IntrId, SgprB512}}})
.Any({{DivB512}, {{VgprB512}, {IntrId, VgprB512}}});
+ addRulesForIOpcs({amdgcn_ds_add_gs_reg_rtn, amdgcn_ds_sub_gs_reg_rtn},
+ Standard)
+ .Div(S32, {{Vgpr32}, {IntrId, Vgpr32}})
+ .Uni(S32, {{UniInVgprS32}, {IntrId, Vgpr32}})
----------------
petar-avramovic wrote:
This is most probably not correct, amdgcn_ds_add_gs_reg_rtn and amdgcn_ds_sub_gs_reg_rtn are atomics and should be marked as divergent.
Need to teach uniformity analysis that these opcodes are neveruniform first, then remove UniInVgpr rules
https://github.com/llvm/llvm-project/pull/185991
More information about the llvm-commits
mailing list