Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMDGPU] promote i1 arg type for amdgpu_cs #82971

Merged
merged 4 commits into from
Mar 1, 2024
Merged

Conversation

nickleus27
Copy link
Contributor

fixes #68087
Not sure where to put regression tests for this pr? Also, should i1 args not in reg also be promoted?

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 26, 2024

@llvm/pr-subscribers-backend-amdgpu

Author: Nick Anderson (nickleus27)

Changes

fixes #68087
Not sure where to put regression tests for this pr? Also, should i1 args not in reg also be promoted?


Full diff: https://github.com/llvm/llvm-project/pull/82971.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td (+1)
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,

@arsenm
Copy link
Contributor

arsenm commented Feb 26, 2024

fixes #68087 Not sure where to put regression tests for this pr? Also, should i1 args not in reg also be promoted?

test/CodeGen/AMDGPU/calling-conventions.ll is probably the best bet right now (although I'm not happy with how these tests are organized)

Both inreg and not inreg should be promoted. The inreg just flips from VGPR to SGPR.

llvm/test/CodeGen/AMDGPU/calling-conventions.ll Outdated Show resolved Hide resolved
llvm/test/CodeGen/AMDGPU/calling-conventions.ll Outdated Show resolved Hide resolved
llvm/test/CodeGen/AMDGPU/calling-conventions.ll Outdated Show resolved Hide resolved
llvm/test/CodeGen/AMDGPU/calling-conventions.ll Outdated Show resolved Hide resolved
@arsenm arsenm changed the title [AMDGPU] promote i1 arg type for admgpu_cs [AMDGPU] promote i1 arg type for amdgpu_cs Feb 28, 2024
@rovka
Copy link
Collaborator

rovka commented Feb 28, 2024

Hi, while you're at it, could you please make the same change for amdgpu_cs_chain and amdgpu_cs_chain_preserve?

@arsenm arsenm merged commit ba8e9ac into llvm:main Mar 1, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

i1 arguments do not work with amdgpu_cs
4 participants