[PATCH] R600/SI: Add support for v4i32 and v4f32 kernel args
Tom Stellard
tom at stellard.net
Wed Jun 19 08:44:49 PDT 2013
On Tue, Jun 18, 2013 at 08:26:53PM -0500, Aaron Watry wrote:
> Tested on Pitcairn by: Aaron Watry <awatry at gmail.com>
>
Thanks.
> Follow-up question: Would it be as easy as it looks to add v2i32 right away?
>
I think so.
-Tom
> On Tue, Jun 18, 2013 at 6:21 PM, Tom Stellard <tom at stellard.net> wrote:
> > From: Tom Stellard <thomas.stellard at amd.com>
> >
> > ---
> > lib/Target/R600/AMDGPUCallingConv.td | 9 +++++----
> > test/CodeGen/R600/128bit-kernel-args.ll | 16 ++++++++++------
> > 2 files changed, 15 insertions(+), 10 deletions(-)
> >
> > diff --git a/lib/Target/R600/AMDGPUCallingConv.td b/lib/Target/R600/AMDGPUCallingConv.td
> > index 84e4f3a..826932b 100644
> > --- a/lib/Target/R600/AMDGPUCallingConv.td
> > +++ b/lib/Target/R600/AMDGPUCallingConv.td
> > @@ -38,10 +38,11 @@ def CC_SI : CallingConv<[
> >
> > // Calling convention for SI compute kernels
> > def CC_SI_Kernel : CallingConv<[
> > - CCIfType<[i64], CCAssignToStack <8, 4>>,
> > - CCIfType<[i32, f32], CCAssignToStack <4, 4>>,
> > - CCIfType<[i16], CCAssignToStack <2, 4>>,
> > - CCIfType<[i8], CCAssignToStack <1, 4>>
> > + CCIfType<[v4i32, v4f32], CCAssignToStack <16, 4>>,
> > + CCIfType<[i64], CCAssignToStack < 8, 4>>,
> > + CCIfType<[i32, f32], CCAssignToStack < 4, 4>>,
> > + CCIfType<[i16], CCAssignToStack < 2, 4>>,
> > + CCIfType<[i8], CCAssignToStack < 1, 4>>
> > ]>;
> >
> > def CC_AMDGPU : CallingConv<[
> > diff --git a/test/CodeGen/R600/128bit-kernel-args.ll b/test/CodeGen/R600/128bit-kernel-args.ll
> > index 114f9e7..bd60385 100644
> > --- a/test/CodeGen/R600/128bit-kernel-args.ll
> > +++ b/test/CodeGen/R600/128bit-kernel-args.ll
> > @@ -1,16 +1,20 @@
> > -;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
> > -
> > -; CHECK: @v4i32_kernel_arg
> > -; CHECK: VTX_READ_128 T{{[0-9]+}}.XYZW, T{{[0-9]+}}.X, 40
> > +; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s --check-prefix=R600-CHECK
> > +; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s --check-prefix=SI-CHECK
> >
> > +; R600-CHECK: @v4i32_kernel_arg
> > +; R600-CHECK: VTX_READ_128 T{{[0-9]+}}.XYZW, T{{[0-9]+}}.X, 40
> > +; SI-CHECK: @v4i32_kernel_arg
> > +; SI-CHECK: BUFFER_STORE_DWORDX4
> > define void @v4i32_kernel_arg(<4 x i32> addrspace(1)* %out, <4 x i32> %in) {
> > entry:
> > store <4 x i32> %in, <4 x i32> addrspace(1)* %out
> > ret void
> > }
> >
> > -; CHECK: @v4f32_kernel_arg
> > -; CHECK: VTX_READ_128 T{{[0-9]+}}.XYZW, T{{[0-9]+}}.X, 40
> > +; R600-CHECK: @v4f32_kernel_arg
> > +; R600-CHECK: VTX_READ_128 T{{[0-9]+}}.XYZW, T{{[0-9]+}}.X, 40
> > +; SI-CHECK: @v4f32_kernel_arg
> > +; SI-CHECK: BUFFER_STORE_DWORDX4
> > define void @v4f32_kernel_args(<4 x float> addrspace(1)* %out, <4 x float> %in) {
> > entry:
> > store <4 x float> %in, <4 x float> addrspace(1)* %out
> > --
> > 1.7.11.4
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list