[llvm] [AMDGPU] promote i1 arg type for admgpu_cs (PR #82971)
Nick Anderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 27 00:10:36 PST 2024
https://github.com/nickleus27 updated https://github.com/llvm/llvm-project/pull/82971
>From e5fbf6a6654e031e1be27b0073be0916690f63bd Mon Sep 17 00:00:00 2001
From: Nick Anderson <nickleus27 at gmail.com>
Date: Mon, 26 Feb 2024 01:08:58 -0800
Subject: [PATCH] [AMDGPU] promote i1 arg type for admgpu_cs
---
llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td | 1 +
llvm/test/CodeGen/AMDGPU/calling-conventions.ll | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td b/llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td
index c5207228dc913f..a988140df3e89b 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td
@@ -66,6 +66,7 @@ def RetCC_SI_Gfx : CallingConv<[
def CC_SI_SHADER : CallingConv<[
+ CCIfType<[i1], CCPromoteToType<i16>>,
CCIfInReg<CCIfType<[f32, i32, f16, i16, v2i16, v2f16, bf16, v2bf16] , CCAssignToReg<[
SGPR0, SGPR1, SGPR2, SGPR3, SGPR4, SGPR5, SGPR6, SGPR7,
SGPR8, SGPR9, SGPR10, SGPR11, SGPR12, SGPR13, SGPR14, SGPR15,
diff --git a/llvm/test/CodeGen/AMDGPU/calling-conventions.ll b/llvm/test/CodeGen/AMDGPU/calling-conventions.ll
index ce1ce649c227d2..139116604d9c79 100644
--- a/llvm/test/CodeGen/AMDGPU/calling-conventions.ll
+++ b/llvm/test/CodeGen/AMDGPU/calling-conventions.ll
@@ -2078,4 +2078,13 @@ entry:
ret void
}
+; test that i1 argument for amdgpu_cs is working
+define amdgpu_cs void @amdgpu_cs_i1_arg(i1 %arg0) {
+; GCN-LABEL: amdgpu_cs_i1_arg:
+; GCN: ; %bb.0: ; %bb
+; GCN-NEXT: s_endpgm
+bb:
+ ret void
+}
+
attributes #0 = { nounwind noinline }
More information about the llvm-commits
mailing list