Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
Andy Gibbs 8e8fb3be5b 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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-19 12:44:48 +00:00
Tanya Lattner a95b4f73c4 Disable the warning for missing prototypes for OpenCL kernels. Includes testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160766 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 00:08:28 +00:00
Tanya Lattner 5e94d6fa2e 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158759 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19 23:09:52 +00:00
Eli Friedman 3edd5a9933 Support constant evaluation for OpenCL nested vector literals. Patch by Anton Lokhmotov.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147496 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-03 23:24:20 +00:00
Peter Collingbourne 63cf68a4fc TypePrinter: print OpenCL address space names. Patch by Richard
Membarth, test case by myself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144063 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 02:52:58 +00:00
Tanya Lattner 6ec96438ed 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142250 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-17 21:00:38 +00:00
Tobias Grosser 9df05ea69b 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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140300 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-22 13:03:14 +00:00
Tobias Grosser 37c31c2e05 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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140270 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 18:28:29 +00:00
Peter Collingbourne 8c25fc584c OpenCL: introduce support for function scope __local variables
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19 21:14:35 +00:00
Tanya Lattner 61b4bc80e9 This handles the missing cases of opencl vector literals.
Test cases provided by Anton Lokhmot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135322 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 23:07:01 +00:00
Peter Collingbourne f4f7cb814f OpenCL: if double precision floating point constant encountered
without cl_khr_fp64, warn and cast to single precision

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127476 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-11 19:24:59 +00:00
Peter Collingbourne f4e3cfbe8a Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof.  Original
patch by Guy Benyei.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-11 19:24:49 +00:00
Peter Collingbourne db27d82dee OpenCL: standardise naming of test cases
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125590 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 19:46:41 +00:00
Peter Collingbourne 39d3e7a26c OpenCL: semantic analysis support for cl_khr_fp64 extension
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125588 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 19:46:23 +00:00