[llvm-branch-commits] [llvm] AMDGPU/GlobalISel: Improve readanylane combines in regbanklegalize (PR #142789)

Pierre van Houtryve via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 5 01:14:54 PDT 2025


================
@@ -137,7 +138,123 @@ class AMDGPURegBankLegalizeCombiner {
     return {MatchMI, MatchMI->getOperand(1).getReg()};
   }
 
+  std::tuple<GUnmerge *, int> tryMatchRALFromUnmerge(Register Src) {
+    auto *ReadAnyLane = MRI.getVRegDef(Src);
----------------
Pierre-vh wrote:

```suggestion
    MachineInstr *ReadAnyLane = MRI.getVRegDef(Src);
```
I think we generally use `auto` only if the type is already in the RHS

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


More information about the llvm-branch-commits mailing list