[cfe-commits] r159965 - in /cfe/trunk: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenFunction.h lib/Sema/SemaDeclAttr.cpp test/CodeGenOpenCL/kernel-attributes.cl

Anton Lokhmotov Anton.Lokhmotov at arm.com
Tue Aug 7 09:01:23 PDT 2012


Hi Simon,

In principle I agree with the change but am a bit concerned that both the vector element type (float) and the number of elements (4) are lost from the test.  

I suggest you modify the kernel argument type to something that's not changed that radically by Clang for MIPS.  If you can't use a vector type, perhaps use another integer type e.g. short or long?

Thanks,
Anton.


> -----Original Message-----
> From: simon at atanasyan.com [mailto:simon at atanasyan.com] On Behalf Of
> Simon Atanasyan
> Sent: 07 August 2012 12:38
> To: Tanya Lattner
> Cc: Anton Lokhmotov; cfe-commits at cs.uiuc.edu
> Subject: Re: [cfe-commits] r159965 - in /cfe/trunk:
> include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td
> lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenFunction.h
> lib/Sema/SemaDeclAttr.cpp test/CodeGenOpenCL/kernel-attributes.cl
> 
> Hi,
> 
> On Tue, Jul 10, 2012 at 2:06 AM, Tanya Lattner <tonic at nondot.org>
> wrote:
> > Author: tbrethou
> > Date: Mon Jul  9 17:06:01 2012
> > New Revision: 159965
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=159965&view=rev
> > Log:
> > Patch by Anton Lokhmotov to add OpenCL work group size attributes.
> >
> > Added:
> >     cfe/trunk/test/CodeGenOpenCL/kernel-attributes.cl
> > ...
> 
> Unfortunately this test case failed on MIPS platform because
> mips-specific part of clang's codegen expands "kernel2(float4 a)"
> into:
> [[
>   @kernel2(i32 %a.coerce0, i32 %a.coerce1, i32 %a.coerce2, i32
> %a.coerce3)
> ]]
> not into:
> [[
>   @kernel2(<4 x float> %a)
> ]]
> 
> The attached patch fixes this problem and the test works correctly on
> all platforms. Could you please review the patch?
> 
> Thanks.
> 
> --
> Simon







More information about the cfe-commits mailing list