[llvm] [GlobalISel][AMDGPU][AArch64] Fix GlobalISel copy propagation (PR #188781)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 04:30:44 PDT 2026
================
@@ -1048,8 +1048,15 @@ static bool selectCopy(MachineInstr &I, const TargetInstrInfo &TII,
const TypeSize SrcSize = TRI.getRegSizeInBits(*SrcRC);
const TypeSize DstSize = TRI.getRegSizeInBits(*DstRC);
+ unsigned SrcSubReg = I.getOperand(1).getSubReg();
unsigned SubReg;
+ if (SrcSubReg) {
+ if (!RBI.constrainGenericRegister(DstReg, *DstRC, MRI))
+ return false;
+ return true;
----------------
arsenm wrote:
```suggestion
return RBI.constrainGenericRegister(DstReg, *DstRC, MRI);
```
https://github.com/llvm/llvm-project/pull/188781
More information about the llvm-commits
mailing list