Matt Arsenault
efb38192b0
Error on more illegal kernel argument types for OpenCL
...
bool, half, pointers and structs / unions containing any
of these are not allowed. Does not yet reject size_t and
related integer types that are also disallowed.
llvm-svn: 186908
2013-07-23 01:23:36 +00:00
Tanya Lattner
713eef4f7c
Add an error to check that all program scope variables are in the constant address space in OpenCL.
...
llvm-svn: 178906
2013-04-05 20:14:50 +00:00
Tanya Lattner
9a13c3e683
Revert 178811 until I fix the unit tests.
...
llvm-svn: 178813
2013-04-04 23:45:52 +00:00
Tanya Lattner
9812634c52
Add an error to check that all program scope variables are in the constant address space in OpenCL.
...
llvm-svn: 178811
2013-04-04 23:36:11 +00:00
Joey Gouly
0608ae89a2
Add support for the 'endian' attribute for OpenCL.
...
llvm-svn: 177035
2013-03-14 09:54:43 +00:00
Joey Gouly
4bd55d9356
Add a test case for the 'vec_type_hint' attribute that was introduced in
...
r176686. I missed this file in the previous commit.
llvm-svn: 176803
2013-03-11 12:38:45 +00:00
Joey Gouly
c975cdcc58
Add a 64-bit triple to these tests, to fix 32-bit bots.
...
llvm-svn: 175736
2013-02-21 13:42:33 +00:00
Joey Gouly
7d00f00f1d
Add support to Sema and CodeGen for floating point vector types in OpenCL.
...
llvm-svn: 175734
2013-02-21 11:49:56 +00:00
John McCall
6ced97aaae
Diagnose loads of 'half' l-values in OpenCL.
...
Patch by Joey Gouly!
llvm-svn: 174928
2013-02-12 01:29:43 +00:00
Guy Benyei
259f9f4531
Enable overloading of OpenCL events - this is needed for the overloaded OpenCL builtin functions.
...
llvm-svn: 174630
2013-02-07 16:05:33 +00:00
Guy Benyei
610541989a
Add OpenCL samplers as Clang builtin types and check sampler related restrictions.
...
llvm-svn: 174601
2013-02-07 10:55:47 +00:00
Tanya Lattner
0f86433efb
Add OpenCL error that a kernel function must have void return type. Includes a test case.
...
llvm-svn: 173963
2013-01-30 19:48:52 +00:00
Joey Gouly
0942e0b5e1
Fix a crash in OpenCL code by using the proper (RHS) bit-width.
...
llvm-svn: 173802
2013-01-29 15:09:40 +00:00
Joey Gouly
39989dadd3
Add a diagnostic for an OpenCL kernel with a pointer pointer argument.
...
Also refactor the surrounding code a little.
llvm-svn: 173791
2013-01-29 10:54:06 +00:00
Joey Gouly
130a91e494
Fix a non-conformant OpenCL test case.
...
Program scope variables must be declared in the constant address space
and are required to be initialized.
llvm-svn: 173354
2013-01-24 15:24:54 +00:00
Joey Gouly
f9283a51b8
Fix an OpenCL test case that was OpenCL conformant.
...
It had program scope variables that were not in the constant address space,
make them to be function scope variables instead.
Also move the test to the SemaOpenCL directory.
llvm-svn: 173352
2013-01-24 15:14:22 +00:00
Joey Gouly
dd7f4566b1
Add a new LangOpt NativeHalfType. This option allows for native half/fp16
...
operations (as opposed to storage only half/fp16).
Also add some semantic checks for OpenCL half types.
llvm-svn: 173254
2013-01-23 11:56:20 +00:00
Guy Benyei
1b4fb3e08b
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)
...
llvm-svn: 172973
2013-01-20 12:31:11 +00:00
Joey Gouly
1d58cdbf4e
Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.
...
llvm-svn: 172732
2013-01-17 17:35:00 +00:00
Andy Gibbs
c6e68daac0
Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.
...
llvm-svn: 166280
2012-10-19 12:44:48 +00:00
Tanya Lattner
4bfc355094
Disable the warning for missing prototypes for OpenCL kernels. Includes testcase.
...
llvm-svn: 160766
2012-07-26 00:08:28 +00:00
Tanya Lattner
4fdce3faa8
Extend the support for cl-std to include 1.2.
...
Add error checking for the static qualifier which is now allowed in certain situations for OpenCL 1.2. Use the CL version to turn on this feature.
Added test case for 1.2 static storage class feature.
llvm-svn: 158759
2012-06-19 23:09:52 +00:00
Eli Friedman
b9c7129012
Support constant evaluation for OpenCL nested vector literals. Patch by Anton Lokhmotov.
...
llvm-svn: 147496
2012-01-03 23:24:20 +00:00
Peter Collingbourne
5ad3ebaefd
TypePrinter: print OpenCL address space names. Patch by Richard
...
Membarth, test case by myself.
llvm-svn: 144063
2011-11-08 02:52:58 +00:00
Tanya Lattner
49b3841398
The comparison of two vectors should return a signed result. hasIntegerRepresentation() used to always return false for vectors, but since it was changed, it also
...
changed the return type of a compare of two unsigned vectors to be unsigned. This patch removes the check for hasIntegerRepresentation since its not needed and returns the appropriate signed type.
I added a new test case and updated exisiting test cases that assumed an unsigned result.
llvm-svn: 142250
2011-10-17 21:00:38 +00:00
Tobias Grosser
766bcc27dc
In OpenCL, conversions between different vector types are disallowed
...
OpenCL 6.2.1 says: "Implicit conversions between built-in vector data types are
disallowed." OpenCL 6.2.2 says: "Explicit casts between vector types are not
legal." For example:
uint4 u = (uint4)(1);
int4 i = u; // invalid implicit conversion
int4 e = (int4)u; // invalid explicit conversion
Fixes PR10967. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com>
llvm-svn: 140300
2011-09-22 13:03:14 +00:00
Tobias Grosser
0a3a22fe66
In the OpenCL mode, the AltiVec mode must be off and checks must be strict
...
OpenCL is different from AltiVec in the way it supports vector literals. OpenCL
is strict with regards to semantic checks. For example, implicit conversions
and explicit casts between vectors of different types are disallowed.
Fixes PR10975. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com>
llvm-svn: 140270
2011-09-21 18:28:29 +00:00
Peter Collingbourne
2dbb708b8a
OpenCL: introduce support for function scope __local variables
...
llvm-svn: 140068
2011-09-19 21:14:35 +00:00
Tanya Lattner
8355938fcd
This handles the missing cases of opencl vector literals.
...
Test cases provided by Anton Lokhmot.
llvm-svn: 135322
2011-07-15 23:07:01 +00:00
Peter Collingbourne
c77f85b4b0
OpenCL: if double precision floating point constant encountered
...
without cl_khr_fp64, warn and cast to single precision
llvm-svn: 127476
2011-03-11 19:24:59 +00:00
Peter Collingbourne
e190dee7a5
Add support for the OpenCL vec_step operator, by generalising and
...
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.
llvm-svn: 127475
2011-03-11 19:24:49 +00:00
Peter Collingbourne
e91b2dbdf1
OpenCL: standardise naming of test cases
...
llvm-svn: 125590
2011-02-15 19:46:41 +00:00
Peter Collingbourne
e87167b7d8
OpenCL: semantic analysis support for cl_khr_fp64 extension
...
llvm-svn: 125588
2011-02-15 19:46:23 +00:00