================
@@ -1278,7 +1278,11 @@ bool AMDGPUCallLowering::lowerTailCall(
       if (auto CI = dyn_cast<ConstantInt>(Arg.OrigValue)) {
         MIB.addImm(CI->getSExtValue());
       } else {
-        MIB.addReg(Arg.Regs[0]);
+        Register Reg = Arg.Regs[0];
+        if (!MRI.getVRegDef(Reg)->isCopy())
+          Reg = MIRBuilder.buildCopy(MRI.getType(Reg), Reg).getReg(0);
----------------
arsenm wrote:

If you need to adjust the class, should use constrainOperandRegClass instead of 
special casing copy 

https://github.com/llvm/llvm-project/pull/131329
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to