[llvm] [AMDGPU][GlobalISel] Add register bank legalize rules for amdgcn_icmp, amdgcn_fcmp (PR #172017)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 08:53:15 PDT 2026


================
@@ -1449,6 +1449,17 @@ bool RegBankLegalizeHelper::lower(MachineInstr &MI,
     return lowerAbsToNegMax(MI);
   case AbsToS32:
     return lowerAbsToS32(MI);
+  case IcmpI1ToBallot: {
+    // amdgcn.icmp(i1 src, i1 0, NE) -> ballot(src)
----------------
arsenm wrote:

This doesn't belong in the regbanklegalizer. Ideally we would just bitcode autoupgrade, but this can be normal legalization I suppose 

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


More information about the llvm-commits mailing list