[llvm] [AMDGPU] Handle subregisters properly in generic operand legalizer (PR #108496)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 23:02:13 PDT 2024
================
@@ -6231,10 +6231,11 @@ void SIInstrInfo::legalizeGenericOperand(MachineBasicBlock &InsertMBB,
return;
Register DstReg = MRI.createVirtualRegister(DstRC);
+ Op.setSubReg(0);
----------------
arsenm wrote:
Instead of clearing this and using .add, could use .addReg
We probably don't want to be preserving the flags here. If this somehow ended up with a kill, it would be wrong
https://github.com/llvm/llvm-project/pull/108496
More information about the llvm-commits
mailing list