[llvm] AMDGPU/GlobalISel: RegBankLegalize rules for s_bitreplicate (PR #189138)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 06:11:06 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, Sgpr32_WF}});
----------------
arsenm wrote:

This should not require rewriting in a waterfall loop. It is possible to directly expand this one 

https://github.com/llvm/llvm-project/pull/189138


More information about the llvm-commits mailing list