summaryrefslogtreecommitdiffstats
path: root/libclc
Commit message (Collapse)AuthorAgeFilesLines
...
* amdgcn: Use new workitem intrinsicsMatt Arsenault2016-02-179-38/+124
| | | | llvm-svn: 261042
* Update page to list supported targetsMatt Arsenault2016-02-131-2/+2
| | | | llvm-svn: 260778
* Split sources for amdgcn and r600Matt Arsenault2016-02-1334-38/+75
| | | | | | | | | | | Most files remain in a common amdgpu directory. Also switches barriers to to use convergent, and use llvm.amdgcn.s.barrier. This now requires 3.9/trunk to build amdgcn. llvm-svn: 260777
* configure: Remove llvm 3.6 definesJan Vesely2016-02-091-3/+3
| | | | | | | | we require llvm 3.7 reviewer: tstellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260304
* configure: Remove cl_khr_fp64 for device that don't support doublesJan Vesely2016-02-091-5/+5
| | | | | | | | | Also remove definitions if provided by clang (3.7+) This halves the size of builtin.opt.{cedar,barts}.bc reviewer: tstellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260303
* configure: Introduce per device definesJan Vesely2016-02-091-11/+24
| | | | | | | | | | | Make cl_khr_fp64 define per-device. This patch does not change the generated Makefile (for llvm 3.6, 3.7) v2: Make the device defines per LLVM version, 'all' for all versions reviewer: tstellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260302
* math: Fix log2 vectorization on non-fp64 hwJan Vesely2016-02-091-0/+2
| | | | | | reviewer: tstellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260301
* math: Add frexp ported from amd-builtinsAaron Watry2016-02-087-0/+151
| | | | | | | | | | | | | | | | | | The float implementation is almost a direct port from the amd-builtins, but instead of just having a scalar and float4 implementation, it has a scalar and arbitrary width vector implementation. The double scalar is also a direct port from AMD's builtin release. The double vector implementation copies the logic in the float vector implementation using the values from the double scalar version. Both have been tested in piglit using tests sent to that project's mailing list. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260114
* Implement modf math builtinTom Stellard2016-01-276-0/+120
| | | | | | | | V2: use the reference implementation as suggested by Matt Arsenault Patch By: Pavel Ondračka llvm-svn: 258933
* Add _CLC_V_V_VP_VECTORIZE macroTom Stellard2016-01-271-0/+22
| | | | | | Patch by: Pavel Ondračka llvm-svn: 258932
* AMDGPU: Add aliases for all VI targetsTom Stellard2015-12-151-1/+1
| | | | llvm-svn: 255663
* AMDGPU: Add alias for tongaTom Stellard2015-12-151-1/+1
| | | | | | Patch by: Vedran Mileti llvm-svn: 255662
* integer: remove explicit casts from _MIN definitionsAaron Watry2015-10-061-3/+3
| | | | | | | | | | | | | | | The spec says (section 6.12.3, CL version 1.2): The macro names given in the following list must use the values specified. The values shall all be constant expressions suitable for use in #if preprocessing directives. This commit addresses the second part of that statement. Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <tom@stellard.net> CC: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk> CC: Serge Martin <edb+libclc@sigluy.net> llvm-svn: 249445
* Implement tanh builtinNiels Ole Salscheider2015-09-295-0/+195
| | | | | | This is a port from the AMD builtin library. llvm-svn: 248780
* Add sampler defines.Tom Stellard2015-09-211-0/+18
| | | | | | Patch by: Zoltan Gilian llvm-svn: 248163
* Add image attribute defines.Tom Stellard2015-09-212-0/+32
| | | | | | Patch by: Zoltan Gilian llvm-svn: 248162
* r600: Add image writing builtins.Tom Stellard2015-09-216-0/+90
| | | | | | Patch by: Zoltan Gilian llvm-svn: 248161
* r600: Add image reading builtins.Tom Stellard2015-09-216-0/+123
| | | | | | Patch by: Zoltan Gilian llvm-svn: 248160
* Add image attribute getter builtinsTom Stellard2015-09-2111-0/+183
| | | | | | | | | Added get_image_* OpenCL builtins to the headers. Added implementation to the r600 target. Patch by: Zoltan Gilian llvm-svn: 248159
* integer: Update integer limits to comply with specAaron Watry2015-09-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The values for the char/short/integer/long minimums were declared with their actual values, not the definitions from the CL spec (v1.1). As a result, (-2147483648) was actually being treated as a long by the compiler, not an int, which caused issues when trying to add/subtract that value from a vector. Update the definitions to use the values declared by the spec, and also add explicit casts for the char/short/int minimums so that the compiler actually treats them as shorts/chars. Without those casts, they actually end up stored as integers, and the compiler may end up storing the INT_MIN as a long. The compiler can sign extend the values if it needs to convert the char->short, short->int, or int->long v2: Add explicit cast for INT_MIN and fix some type-o's and wrapping in the commit message. Reported-by: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk> CC: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Aaron Watry <awatry@gmail.com> llvm-svn: 247661
* Update mailing list reference.Peter Collingbourne2015-08-241-1/+1
| | | | llvm-svn: 245894
* Remove files accidentally not removed in r244310Jeroen Ketema2015-08-132-9/+0
| | | | llvm-svn: 244987
* Require LLVM >=3.7 and bump version to 0.2.0Jeroen Ketema2015-08-072-19/+8
| | | | | | | | v2: Also remove LLVM 3.6 traces from prepare-builtins.cpp Patch by: EdB llvm-svn: 244310
* Fix double implementation of logTom Stellard2015-07-244-3/+73
| | | | | | We need to use M_LOG2E instead of M_LOG2E_F. llvm-svn: 243132
* Implement accurate log2 functionTom Stellard2015-07-248-6/+517
| | | | | | | | | Use the implementation was ported from the AMD builtin library rather than LLVM Intrinsics. This has been tested with piglit, OpenCV, and the ocl conformance tests. llvm-svn: 243131
* Use llvm intrinsics for native_log and native_log2Tom Stellard2015-07-249-2/+216
| | | | llvm-svn: 243130
* R600: Implement accurate double precision sqrt v2Tom Stellard2015-07-102-0/+60
| | | | | | | v2: - Use same implementation for R600 and gcn. llvm-svn: 241907
* Fix implementation of sqrt v2Tom Stellard2015-07-108-6/+168
| | | | | | | | | | | Passing values less than 0 to the llvm.sqrt() intrinsic results in undefined behavior, so we need to check the input and return NaN if is is less than 0. v2: - Fix build failures. llvm-svn: 241906
* prepare-builtins: Fix build with LLVM 3.6Tom Stellard2015-07-101-1/+1
| | | | | | Patch by: Tomasz Borowik llvm-svn: 241905
* Properly initialize Module pointerJeroen Ketema2015-06-271-1/+1
| | | | llvm-svn: 240881
* prepare-builtins: Fix build with LLVM 3.7Tom Stellard2015-06-241-6/+19
| | | | llvm-svn: 240552
* Use a more accurate implementation for expTom Stellard2015-05-132-13/+85
| | | | | | | | | | | | Using exp2(x * M_LOG2E_F) does not give us accurate enough results for OpenCL. If you look at the new exp implementation you'll see that it does multiply the input by M_LOG2E_F, but it still uses the original input in part of the calculation. This exp implementation was ported from the AMD builtin library and has been tested with piglit, OpenCV, and the ocl conformance tests. llvm-svn: 237229
* Implement exp2 using OpenCL C rather than using an intrinsicTom Stellard2015-05-138-6/+303
| | | | | | | | | | Not all targets support the intrinsic, so it's better to have a generic implementation which does not use it. This exp2 implementation was ported from the AMD builtin library and has been tested with piglit, OpenCV, and the ocl conformance tests. llvm-svn: 237228
* Implement sin for double typesTom Stellard2015-05-121-7/+16
| | | | | | | This implementation was ported from the AMD builtin library and has been tested with piglit, OpenCV, and the ocl conformance tests. llvm-svn: 237155
* Implement cos for double typesTom Stellard2015-05-125-7/+289
| | | | | | | This implementation was ported from the AMD builtin library and has been tested with piglit, OpenCV, and the ocl conformance tests. llvm-svn: 237154
* Implement atan2pi builtinTom Stellard2015-05-125-0/+270
| | | | | | | This implementation was ported from the AMD builtin library and has been tested with piglit, OpenCV, and the ocl conformance tests. llvm-svn: 237138
* Implement atan2 for doublesTom Stellard2015-05-123-2/+412
| | | | | | | This implementation was ported from the AMD builtin library and has been tested with piglit, OpenCV, and the ocl conformance tests. llvm-svn: 237131
* math: limit half_sqrt to single precisionJan Vesely2015-05-092-6/+4
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 236941
* geometric: Limit fast_{distance,length} functions to single precisionJan Vesely2015-05-094-25/+6
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 236940
* Fix ldexp fp64 build errorJan Vesely2015-05-091-1/+1
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 236939
* Implement fast_normalize builtin v4Tom Stellard2015-05-097-0/+125
| | | | | | | | | | | | | | | | | This implementation was ported from the AMD builtin library and has been tested with piglit, OpenCV, and the ocl conformance tests. v2: - Remove f suffix from constant in double implementations. - Consolidate implementations using the .cl/.inc approach. v3: - Use __CLC_FPSIZE instead of __CLC_FP{32,64} v4 (Jan Vesely): - Limit to single precision. llvm-svn: 236920
* Implement half_rsqrt builtin v3Tom Stellard2015-05-086-0/+88
| | | | | | | | | | | | | This is a generic implementation which just calls rsqrt. Targets should override this if they want a faster implementation. v2: - Alphabettize SOURCES v3 (Jan Vesely): Limit to single precision types. llvm-svn: 236915
* r600: Use __clc_ldexp on asics that don't implement the intructionJan Vesely2015-05-061-1/+10
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 236649
* Move ldexp soft implementation to a separate fileJan Vesely2015-05-064-100/+138
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 236648
* Implement sinpi builtinJan Vesely2015-05-065-0/+137
| | | | | | | | Ported from AMD builtin library, passes piglit on Turks. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 236647
* math: Add ldexp implementationTom Stellard2015-05-065-1/+144
| | | | | | | | | | | | Signed-off-by: Aaron Watry <awatry@gmail.com> Tom Stellard: - Add denormal handling. - Share vectorization code with r600 implementation. Patch By: Aaron Watry llvm-svn: 236639
* Implement ldexp for R600/SITom Stellard2015-05-067-0/+142
| | | | llvm-svn: 236638
* Fix implementation of normalize builtinTom Stellard2015-05-062-6/+152
| | | | | | | The new implementation was ported from the AMD builtin library and has been tested with piglit, OpenCV, and the ocl conformance tests. llvm-svn: 236608
* Allow compilation depending to the LLVM versionTom Stellard2015-04-293-1/+24
| | | | | | | | | It allows to keep temporary compatibilty with older version. For exemple, this can be use when change are not to large. Patch by: EdB llvm-svn: 236113
* Fix compilation warnings without cl_khr_fp64Jan Vesely2015-04-243-6/+32
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 235762
OpenPOWER on IntegriCloud