summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenOpenCL
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for llvm api change.Rafael Espindola2014-06-062-2/+2
| | | | llvm-svn: 210303
* Bug 18567: Fix constantexpr pointer casts with address spaces.Matt Arsenault2014-04-171-0/+20
| | | | | | | Getting a pointer into a struct at a non-zero offset would try to use the default address space. llvm-svn: 206478
* When printing types for the OpenCL kernel metadata, use the PrintingPolicy.Joey Gouly2014-04-041-0/+8
| | | | | | | | This allows 'half' to be printed as 'half' and not as '__fp16'. Patch by Fraser Cormack! llvm-svn: 205624
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-142-3/+3
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
* Update tests in preparation for using the MS ABI for Win32 targetsHans Wennborg2014-01-132-3/+3
| | | | | | | | | | In preparation for making the Win32 triple imply MS ABI mode, make all tests pass in this mode, or make them use the Itanium mode explicitly. Differential Revision: http://llvm-reviews.chandlerc.com/D2401 llvm-svn: 199130
* The OpenCL specification states that images are allocated Pekka Jaaskelainen2014-01-091-1/+1
| | | | | | | | | | | from the global address space (6.5.1 of the OpenCL 1.2 specification). This makes clang construct the image arguments in the global address space and generate the argument metadata with the correct address space descriptor. Patch by Pedro Ferreira! llvm-svn: 198868
* Fix a crash in EmitStoreThroughExtVectorComponentLValue for vectors of odd ↵Joey Gouly2013-11-211-0/+17
| | | | | | | | | | | | | | | | | | | sizes. In OpenCL a vector of 3 elements, acts like a vector of four elements. So for a vector of size 3 the '.hi' and '.odd' accessors, would access the elements {2, 3} and {1, 3} respectively. However, in EmitStoreThroughExtVectorComponentLValue we are still operating on a vector of size 3, so we should only access {2} and {1}. We do this by checking the last element to be accessed, and ignore it if it is out-of-bounds. EmitLoadOfExtVectorElementLValue doesn't have a similar problem, because it does a direct shufflevector with undef, so an out-of-bounds access just gives an undef value. Patch by Anastasia Stulova! llvm-svn: 195367
* [OpenCL] Make sure we put string literals in the constant address space.Joey Gouly2013-11-141-0/+9
| | | | llvm-svn: 194717
* Certain multi-platform languages, such as OpenCL, have the concept ofDavid Tweed2013-09-132-2/+32
| | | | | | | | | | | | | | address spaces which is both (1) a "semantic" concept and (2) possibly a hardware level restriction. It is desirable to be able to discard/merge the LLVM-level address spaces on arguments for which there is no difference to the current backend while keeping track of the semantic address spaces in a funciton prototype. To do this enable addition of the address space into the name-mangling process. Add some tests to document this behaviour against inadvertent changes. Patch by Michele Scandale! llvm-svn: 190684
* Don't pass -O0 to clang_cc1, it is the default.Rafael Espindola2013-09-041-1/+1
| | | | llvm-svn: 189910
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-154-6/+6
| | | | | | tests fail. llvm-svn: 188447
* Use kernel metadata to differentiate between kernel and deviceJustin Holewinski2013-03-302-5/+7
| | | | | | functions for the NVPTX target. llvm-svn: 178418
* Generate metadata to implement the -cl-kernel-arg-info option.Guy Benyei2013-03-241-3/+16
| | | | | | OpenCL 1.2 spec. 5.7.3. llvm-svn: 177839
* Fix indirect byval passing of records in address spaced memory. Allocate ↵Guy Benyei2013-03-101-0/+23
| | | | | | memory on stack, and memcpy the actual value before the call. llvm-svn: 176786
* Add support for the OpenCL attribute 'vec_type_hint'.Joey Gouly2013-03-081-4/+8
| | | | | | Patch by Murat Bolat! llvm-svn: 176686
* Add a 64-bit triple to these tests, to fix 32-bit bots.Joey Gouly2013-02-211-1/+1
| | | | llvm-svn: 175736
* Fix an OpenCL test case. Pointer arguments to kernels must be declared with theJoey Gouly2013-02-211-1/+1
| | | | | | __global, __constant or __local qualifier. llvm-svn: 175735
* Add support to Sema and CodeGen for floating point vector types in OpenCL.Joey Gouly2013-02-211-0/+56
| | | | llvm-svn: 175734
* Use the target address space value when mangling names.Tanya Lattner2013-02-081-0/+5
| | | | llvm-svn: 174688
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-071-0/+13
| | | | | | restrictions. llvm-svn: 174601
* Add a new LangOpt NativeHalfType. This option allows for native half/fp16Joey Gouly2013-01-231-0/+15
| | | | | | | | operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. llvm-svn: 173254
* Implement OpenCL event_t as Clang builtin type, including event_t related ↵Guy Benyei2013-01-202-0/+14
| | | | | | OpenCL restrictions (OpenCL 1.2 spec 6.9) llvm-svn: 172973
* r172047 lacked a test (due to incomplete OpenCL support in clang). Use a ↵David Tweed2013-01-101-0/+29
| | | | | | | | | modified version of a test by Joey Gouly to use attributes to materialise the unsupported types and test vector shifts. llvm-svn: 172053
* clang/test/CodeGenOpenCL/shifts.cl: Fixup for -Asserts.NAKAMURA Takumi2013-01-081-8/+8
| | | | llvm-svn: 171820
* Scalar shifts in the OpenCL specification (as of v. 1.2) are defined to beDavid Tweed2013-01-071-0/+28
| | | | | | | | | | 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. llvm-svn: 171755
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-181-0/+22
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-181-22/+0
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-181-0/+22
| | | | llvm-svn: 170428
* Fix line ending is tests. No functional change.Richard Trieu2012-12-122-37/+37
| | | | llvm-svn: 169947
* Add SPIR32/SPIR64 targets to ClangGuy Benyei2012-12-112-0/+43
| | | | llvm-svn: 169917
* FP_CONTRACT: Fix two tests for -Asserts.NAKAMURA Takumi2012-10-021-1/+1
| | | | llvm-svn: 165024
* Add FP_CONTRACT support for clang.Lang Hames2012-10-021-2/+1
| | | | | | | | 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). llvm-svn: 164989
* Remove names from the CHECK lines.Tanya Lattner2012-08-161-1/+1
| | | | llvm-svn: 162003
* Convert loads and stores of vec3 to vec4 to achieve better code generation. ↵Tanya Lattner2012-08-161-0/+9
| | | | | | Add test case. llvm-svn: 162002
* Fix the test case. Now it does not depend on the method used to pass vector ↵Simon Atanasyan2012-08-091-4/+2
| | | | | | | | arguments to the function. Reviewed by Anton Lokhmotov. llvm-svn: 161597
* Add OpenCL metadata for kernel arg names. This output is controlled via a ↵Tanya Lattner2012-07-111-0/+7
| | | | | | | | flag as noted in the OpenCL Spec. Includes a test case. llvm-svn: 160092
* Patch by Anton Lokhmotov to add OpenCL work group size attributes.Tanya Lattner2012-07-091-0/+14
| | | | llvm-svn: 159965
* Replace PTX back-end with NVPTX back-end in all places where Clang caresJustin Holewinski2012-05-242-2/+2
| | | | | | NV_CONTRIB llvm-svn: 157403
* Rename "fpaccuracy" metadata to the more generic "fpmath". That's because I'mDuncan Sands2012-04-141-3/+3
| | | | | | | | | 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. llvm-svn: 154745
* Express the number of ULPs in fpaccuracy metadata as a real rather than a Duncan Sands2012-04-101-1/+1
| | | | | | rational number, eg as 2.5 rather than 5, 2. OK'd by Peter Collingbourne. llvm-svn: 154388
* A few style changes.Tanya Lattner2012-01-191-0/+19
| | | | | | | Change CheckVectorLogicalOperands to pass params by ref. Add another test case. llvm-svn: 148452
* Fix test so it doesn't depend on the host's calling convention lowering code.Eli Friedman2012-01-041-6/+6
| | | | llvm-svn: 147545
* Support constant evaluation for OpenCL nested vector literals. Patch by ↵Eli Friedman2012-01-031-0/+23
| | | | | | Anton Lokhmotov. llvm-svn: 147496
* Annotate imprecise FP division with fpaccuracy metadataPeter Collingbourne2011-10-271-0/+25
| | | | | | | | | 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. llvm-svn: 143136
* PTX: Set proper calling conventions for PTX in OpenCL mode.Justin Holewinski2011-10-052-0/+22
| | | | llvm-svn: 141193
* OpenCL: introduce support for function scope __local variablesPeter Collingbourne2011-09-191-0/+7
| | | | llvm-svn: 140068
* This handles the missing cases of opencl vector literals.Tanya Lattner2011-07-151-0/+22
| | | | | | Test cases provided by Anton Lokhmot. llvm-svn: 135322
* Do not violate the opencl casting rules. This test case still illustrates ↵Tanya Lattner2011-07-071-4/+3
| | | | | | the problem. In the future, we should throw an error when doing invalid casting. llvm-svn: 134570
* Modify test for 32 and 64 bit.Tanya Lattner2011-04-161-5/+5
| | | | llvm-svn: 129627
* Fix bug in vector initializer when initializing a vector with another vector.Tanya Lattner2011-04-151-0/+12
| | | | | | Add test case. llvm-svn: 129617
OpenPOWER on IntegriCloud