[llvm] AMDGPU: Use mi_match for more manual selector patterns (PR #216726)

Krzysztof Drewniak via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 10:21:01 PDT 2026


================
@@ -2942,18 +2942,16 @@ static bool isExtractHiElt(MachineRegisterInfo &MRI, Register In,
     }
   }
 
-  MachineInstr *Shuffle = MRI.getVRegDef(Trunc);
-  if (Shuffle->getOpcode() != AMDGPU::G_SHUFFLE_VECTOR)
+  ArrayRef<int> Mask;
----------------
krzysz00 wrote:

I assume we're not interested in variable masks here?

Also, is `int` the right type? (I've got a vague twitch around leaving the bitwidth of types unspecified, but that might be incorrect)

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


More information about the llvm-commits mailing list