aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenOpenCL
AgeCommit message (Collapse)Author
2013-03-30Use kernel metadata to differentiate between kernel and deviceJustin Holewinski
functions for the NVPTX target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178418 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-24Generate metadata to implement the -cl-kernel-arg-info option.Guy Benyei
OpenCL 1.2 spec. 5.7.3. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10Fix indirect byval passing of records in address spaced memory. Allocate ↵Guy Benyei
memory on stack, and memcpy the actual value before the call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176786 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08Add support for the OpenCL attribute 'vec_type_hint'.Joey Gouly
Patch by Murat Bolat! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176686 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21Add a 64-bit triple to these tests, to fix 32-bit bots.Joey Gouly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175736 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21Fix an OpenCL test case. Pointer arguments to kernels must be declared with theJoey Gouly
__global, __constant or __local qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175735 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21Add support to Sema and CodeGen for floating point vector types in OpenCL.Joey Gouly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175734 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08Use the target address space value when mangling names.Tanya Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174688 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei
restrictions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-23Add a new LangOpt NativeHalfType. This option allows for native half/fp16Joey Gouly
operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173254 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-20Implement OpenCL event_t as Clang builtin type, including event_t related ↵Guy Benyei
OpenCL restrictions (OpenCL 1.2 spec 6.9) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10r172047 lacked a test (due to incomplete OpenCL support in clang). Use a ↵David Tweed
modified version of a test by Joey Gouly to use attributes to materialise the unsupported types and test vector shifts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172053 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-08clang/test/CodeGenOpenCL/shifts.cl: Fixup for -Asserts.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171820 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07Scalar shifts in the OpenCL specification (as of v. 1.2) are defined to beDavid Tweed
with respect to the lower "left-hand-side bitwidth" bits, even when negative); see OpenCL spec 6.3j. This patch both implements this behaviour in the code generator and "constant folding" bits of Sema, and also prevents tests to detect undefinedness in terms of the weaker C99 or C++ specifications from being applied. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171755 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18Re-commit r170428 changes with Linux style file endings.Guy Benyei
Add OpenCL images as clang builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei
these files to Windows style. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18Add OpenCL images as clang builtin types.Guy Benyei
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-12Fix line ending is tests. No functional change.Richard Trieu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169947 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-11Add SPIR32/SPIR64 targets to ClangGuy Benyei
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169917 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02FP_CONTRACT: Fix two tests for -Asserts.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165024 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02Add FP_CONTRACT support for clang.Lang Hames
Clang will now honor the FP_CONTRACT pragma and emit LLVM fmuladd intrinsics for expressions of the form A * B + C (when they occur in a single statement). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164989 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Remove names from the CHECK lines.Tanya Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162003 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16Convert loads and stores of vec3 to vec4 to achieve better code generation. ↵Tanya Lattner
Add test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-09Fix the test case. Now it does not depend on the method used to pass vector ↵Simon Atanasyan
arguments to the function. Reviewed by Anton Lokhmotov. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161597 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-11Add OpenCL metadata for kernel arg names. This output is controlled via a ↵Tanya Lattner
flag as noted in the OpenCL Spec. Includes a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160092 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09Patch by Anton Lokhmotov to add OpenCL work group size attributes.Tanya Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159965 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-24Replace PTX back-end with NVPTX back-end in all places where Clang caresJustin Holewinski
NV_CONTRIB git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157403 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-14Rename "fpaccuracy" metadata to the more generic "fpmath". That's because I'mDuncan Sands
thinking of generalizing it to be able to specify other freedoms beyond accuracy (such as that NaN's don't have to be respected). I'd like the 3.1 release (the first one with this metadata) to have the more generic name already rather than having to auto-upgrade it in 3.2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154745 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-10Express the number of ULPs in fpaccuracy metadata as a real rather than a Duncan Sands
rational number, eg as 2.5 rather than 5, 2. OK'd by Peter Collingbourne. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154388 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19A few style changes.Tanya Lattner
Change CheckVectorLogicalOperands to pass params by ref. Add another test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148452 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-04Fix test so it doesn't depend on the host's calling convention lowering code.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147545 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-03Support constant evaluation for OpenCL nested vector literals. Patch by ↵Eli Friedman
Anton Lokhmotov. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147496 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-27Annotate imprecise FP division with fpaccuracy metadataPeter Collingbourne
The OpenCL single precision division operation is only required to be accurate to 2.5ulp. Annotate the fdiv instruction with metadata which signals to the backend that an imprecise divide instruction may be used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143136 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-05PTX: Set proper calling conventions for PTX in OpenCL mode.Justin Holewinski
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141193 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19OpenCL: introduce support for function scope __local variablesPeter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15This handles the missing cases of opencl vector literals.Tanya Lattner
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-07Do not violate the opencl casting rules. This test case still illustrates ↵Tanya Lattner
the problem. In the future, we should throw an error when doing invalid casting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134570 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-16Modify test for 32 and 64 bit.Tanya Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129627 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15Fix bug in vector initializer when initializing a vector with another vector.Tanya Lattner
Add test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129617 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18Add support for language-specific address spaces. On top of that,Peter Collingbourne
add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15OpenCL: standardise naming of test casesPeter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125590 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14OpenCL: add support for __kernel, kernel keywords and EXTENSION,Peter Collingbourne
FP_CONTRACT pragmas. Patch originally by ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8