================
@@ -119,7 +126,13 @@ struct AMDGPUIncomingArgHandler : public 
CallLowering::IncomingValueHandler {
   }
 
   void copyToReg(Register ValVReg, Register PhysReg, const CCValAssign &VA) {
-    if (VA.getLocVT().getSizeInBits() < 32) {
+    const GCNSubtarget &ST = MIRBuilder.getMF().getSubtarget<GCNSubtarget>();
+    const SIRegisterInfo *TRI =
+        static_cast<const SIRegisterInfo *>(MRI.getTargetRegisterInfo());
+    bool isPhyRegSGPR = TRI->isSGPRReg(MRI, PhysReg);
+
+    if (VA.getLocVT().getSizeInBits() < 32 &&
+        (isPhyRegSGPR || !ST.useRealTrue16Insts())) {
----------------
arsenm wrote:

same 

https://github.com/llvm/llvm-project/pull/218463
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to