[llvm-branch-commits] [llvm] [AMDGPU] Update calling convention for true16 mode (PR #218463)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 1 09:08:50 PDT 2026


================
@@ -32,10 +32,14 @@ namespace {
 
 /// Wrapper around extendRegister to ensure we extend to a full 32-bit register.
 static Register extendRegisterMin32(CallLowering::ValueHandler &Handler,
-                                    Register ValVReg, const CCValAssign &VA) {
-  if (VA.getLocVT().getSizeInBits() < 32) {
+                                    Register ValVReg, const CCValAssign &VA,
+                                    bool isPhyRegSGPR, const GCNSubtarget &ST) {
+  if (VA.getLocVT().getSizeInBits() < 32 &&
+      (isPhyRegSGPR || !ST.useRealTrue16Insts())) {
----------------
arsenm wrote:

Shouldn't the type be known from the CCValAssign, and avoid the new reference to ST.useRealTrue16Insts? also shouldn't require isPhyRegSGPR

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


More information about the llvm-branch-commits mailing list