[llvm] AMDGPU/GlobalISel: RegBankLegalize rules for s_bitreplicate (PR #189138)
Petar Avramovic via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 03:41:27 PDT 2026
================
@@ -1451,6 +1451,10 @@ RegBankLegalizeRules::RegBankLegalizeRules(const GCNSubtarget &_ST,
using namespace Intrinsic;
+ addRulesForIOpcs({amdgcn_s_bitreplicate}, Standard)
+ .Uni(S64, {{Sgpr64}, {IntrId, Sgpr32}})
+ .Div(S64, {{Sgpr64ToVgprDst}, {IntrId, SgprB32_ReadFirstLane}});
----------------
petar-avramovic wrote:
This can be waterfall I think, here it is just bitreplaces value from first active lane and splat to dst, but with waterfall loop it would do it per lane and copy to lane in dst
https://github.com/llvm/llvm-project/pull/189138
More information about the llvm-commits
mailing list