[llvm] [AArch64][GlobalISel] Fix creation of incorrect COPY gpr32, grp32.sub_32 (PR #171100)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 8 06:31:50 PST 2025


================
@@ -3015,6 +3015,8 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
         return false;
 
       // Generate a subreg copy.
+      if (RB.getID() == AArch64::GPRRegBankID && ValTy.getSizeInBits() < 32)
+        SubReg = 0;
----------------
arsenm wrote:

```suggestion
        SubReg = AArch64::NoSubRegister;
```

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


More information about the llvm-commits mailing list