From c9c322cc39aab82be8c031a57ebcc6e1206246bd Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 12 Jul 2013 18:15:26 +0000 Subject: [PATCH] R600/SI: Add support for f64 kernel arguments Patch by: Niels Ole Salscheider Reviewed-by: Tom Stellard git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186182 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/AMDGPUCallingConv.td | 2 +- test/CodeGen/R600/64bit-kernel-args.ll | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test/CodeGen/R600/64bit-kernel-args.ll diff --git a/lib/Target/R600/AMDGPUCallingConv.td b/lib/Target/R600/AMDGPUCallingConv.td index 826932b3b84..29a0326143b 100644 --- a/lib/Target/R600/AMDGPUCallingConv.td +++ b/lib/Target/R600/AMDGPUCallingConv.td @@ -39,7 +39,7 @@ def CC_SI : CallingConv<[ // Calling convention for SI compute kernels def CC_SI_Kernel : CallingConv<[ CCIfType<[v4i32, v4f32], CCAssignToStack <16, 4>>, - CCIfType<[i64], CCAssignToStack < 8, 4>>, + CCIfType<[i64, f64], CCAssignToStack < 8, 4>>, CCIfType<[i32, f32], CCAssignToStack < 4, 4>>, CCIfType<[i16], CCAssignToStack < 2, 4>>, CCIfType<[i8], CCAssignToStack < 1, 4>> diff --git a/test/CodeGen/R600/64bit-kernel-args.ll b/test/CodeGen/R600/64bit-kernel-args.ll new file mode 100644 index 00000000000..2020e6565a9 --- /dev/null +++ b/test/CodeGen/R600/64bit-kernel-args.ll @@ -0,0 +1,9 @@ +; RUN: llc < %s -march=r600 -mcpu=tahiti | FileCheck %s + +; SI-CHECK: @f64_kernel_arg +; SI-CHECK: BUFFER_STORE_DWORDX2 +define void @f64_kernel_arg(double addrspace(1)* %out, double %in) { +entry: + store double %in, double addrspace(1)* %out + ret void +}