[PATCH] D37701: AMDGPU: Allow coldcc calls
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 10:41:42 PDT 2017
arsenm created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.
https://reviews.llvm.org/D37701
Files:
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
test/CodeGen/AMDGPU/calling-conventions.ll
Index: test/CodeGen/AMDGPU/calling-conventions.ll
===================================================================
--- test/CodeGen/AMDGPU/calling-conventions.ll
+++ test/CodeGen/AMDGPU/calling-conventions.ll
@@ -43,3 +43,17 @@
%add = fadd half %arg0, 1.0
ret half %add
}
+
+; GCN-LABEL: {{^}}fastcc:
+; GCN: v_add_f32_e32 v0, 4.0, v0
+define fastcc float @fastcc(float %arg0) {
+ %add = fadd float %arg0, 4.0
+ ret float %add
+}
+
+; GCN-LABEL: {{^}}coldcc:
+; GCN: v_add_f32_e32 v0, 4.0, v0
+define coldcc float @coldcc(float %arg0) {
+ %add = fadd float %arg0, 4.0
+ ret float %add
+}
Index: lib/Target/AMDGPU/AMDGPUISelLowering.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -871,6 +871,7 @@
return RetCC_SI_Shader;
case CallingConv::C:
case CallingConv::Fast:
+ case CallingConv::Cold:
return RetCC_AMDGPU_Func;
default:
report_fatal_error("Unsupported calling convention.");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37701.114633.patch
Type: text/x-patch
Size: 1036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170911/f575ffdb/attachment.bin>
More information about the llvm-commits
mailing list