[llvm] [AMDGPU] Allocate i1 argument to SGPRs (PR #72461)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 06:33:32 PDT 2024


================
@@ -131,6 +131,12 @@ bool AMDGPUInstructionSelector::selectCOPY(MachineInstr &I) const {
   Register SrcReg = Src.getReg();
 
   if (isVCC(DstReg, *MRI)) {
+    if (SrcReg.isPhysical() && SrcReg != AMDGPU::SCC) {
+      const TargetRegisterClass *DstRC = MRI->getRegClassOrNull(DstReg);
+      if (DstRC)
+        return DstRC->contains(SrcReg);
+    }
----------------
arsenm wrote:

Can you split this into a separate change, with MIR tests? I suspect you can just directly return true. 

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


More information about the llvm-commits mailing list