[llvm] [AMDGPU] Optimize rotate/funnel shift pattern matching in instruction selection (PR #149817)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 03:05:21 PDT 2025


================
@@ -4089,6 +4089,12 @@ AMDGPURegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
   case AMDGPU::G_AMDGPU_SMED3:
   case AMDGPU::G_AMDGPU_FMED3:
     return getDefaultMappingVOP(MI);
+  case AMDGPU::G_ROTR:
+  case AMDGPU::G_ROTL: {
----------------
jmmartinez wrote:

Group these 2 new cases together with similar cases like `AMDGPU::G_SHL`, `AMDGPU::G_ADD`, `AMDGPU::G_SUB`, ... to avoid repeating the body of the case.

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


More information about the llvm-commits mailing list