summaryrefslogtreecommitdiffstats
path: root/libclc/generic/lib/SOURCES
Commit message (Collapse)AuthorAgeFilesLines
...
* Add sincosTom Stellard2014-03-211-0/+1
| | | | | | | Patch by: Jeroen Ketema Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 204478
* Implement builtins for cl_khr_global_int32_base_atomics extensionTom Stellard2013-11-181-0/+4
| | | | llvm-svn: 195021
* Implement sign() builtinTom Stellard2013-10-101-0/+1
| | | | llvm-svn: 192384
* Implement nextafter() builtinTom Stellard2013-10-101-0/+2
| | | | | | | | | | | | | | There are two implementations of nextafter(): 1. Using clang's __builtin_nextafter. Clang replaces this builtin with a call to nextafter which is part of libm. Therefore, this implementation will only work for targets with an implementation of libm (e.g. most CPU targets). 2. The other implementation is written in OpenCL C. This function is known internally as __clc_nextafter and can be used by targets that don't have access to libm. llvm-svn: 192383
* Implement isnan() builtinTom Stellard2013-10-101-0/+1
| | | | llvm-svn: 192382
* Add atomic_inc and atomic_add builtinsAaron Watry2013-09-051-0/+1
| | | | | Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 190058
* Add mul_hi implementation [v2]Aaron Watry2013-08-191-0/+1
| | | | | | | | | | | | | | | Everything except long/ulong is handled by just casting to the next larger type, doing the math and then shifting/casting the result. For 64-bit types, we break the high/low parts of each operand apart, and do a FOIL-based multiplication. v2: Discard the stack-overflow implementation due to copyright concerns. - The implementation is still FOIL-based, but discards the previous code. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 188684
* Add rhadd builtinAaron Watry2013-08-151-0/+1
| | | | | | | | | | | | rhadd = (x+y+1)>>1 Implemented as: (x>>1) + (y>>1) + ((x&1)|(y&1)) This prevents us having to do assembly addition and overflow detection Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 188477
* Add hadd builtinAaron Watry2013-08-151-0/+1
| | | | | | | | | | (x + y) >> 1 gets changed to: (x>>1) + (y>>1) + (x&y&1) Saves us having to do any llvm assembly and overflow checking in the addition. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 188476
* Implement generic upsample()Aaron Watry2013-07-191-0/+1
| | | | | | | | | | | | | | Reduces all vector upsamples down to its scalar components, so probably not the most efficient thing in the world, but it does what the spec says it needs to do. Another possible implementation would be to convert/cast everything as unsigned if necessary, upsample the input vectors, create the upsampled value, and then cast back to signed if required. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard at amd.com> llvm-svn: 186691
* libclc: vload/vstore disable assembly and fix offset calculationAaron Watry2013-07-161-2/+0
| | | | | | | | | | | This commit gets us back to pure CLC and fixes offset calculations. The next commit will re-enable the assembly implementation for R600, fix bugs related to 64-bit address spaces, and also fix the incorrect assumption that address space identifiers are the same in all architectures. llvm-svn: 186415
* Implement mad24() and mul24() builtinsTom Stellard2013-07-081-0/+2
| | | | | Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 185839
* libclc: Add assembly versions of vstore for global [u]int4/8/16Tom Stellard2013-06-261-0/+2
| | | | | | | | | | | | | The assembly should be generic, but at least currently R600 only supports 32-bit stores of [u]int1/4, and I believe that only global is well-supported. R600 lowers the 8/16 component stores to multiple 4-component stores. The unoptimized C versions of the other stuff is left in place. Patch by: Aaron Watry llvm-svn: 185009
* libclc: Add assembly versions of vload for global int4/8/16Tom Stellard2013-06-261-0/+2
| | | | | | | | | | | | | The assembly should be generic, but at least currently R600 only supports 32-bit loads of int1/4, and I believe that only global is well-supported. R600 lowers the 8/16 component vectors to multiple 4-bit loads. The unoptimized C versions of the other stuff is left in place. Patch by: Aaron Watry llvm-svn: 185008
* libclc: Initial vstore implementationTom Stellard2013-06-261-0/+1
| | | | | | | | | | Assumes that the target supports byte-addressable stores. Completely unoptimized. Patch by: Aaron Watry llvm-svn: 185007
* libclc: Initial vload implementationTom Stellard2013-06-261-0/+1
| | | | | | | | Should work for all targets and data types. Completely unoptimized. Patch by: Aaron Watry llvm-svn: 185006
* libclc: Implement clz() builtinTom Stellard2013-06-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit a0df0a0e86c55c1bdc0b9c0f5a739e5adef4b056 Author: Aaron Watry <awatry@gmail.com> Date: Mon Apr 15 18:42:04 2013 -0500 libclc: Rename clz.ll to clz_if.ll to ensure it gets built. configure.py treats files that have the same name with the .cl and .ll extensions as overriding eachother. E.g. If you have clz.cl and clz.ll both specified to be built in the same SOURCES file, only the first file listed will actually be built. Since the contents of clz.ll were an interface that is implemented in clz_impl.ll, rename clz.ll to clz_if.ll to make sure that the interface is built. commit 931b62bed05c58f737de625bd415af09571a6a5a Author: Aaron Watry <awatry@gmail.com> Date: Sat Apr 13 12:32:54 2013 -0500 libclc: llvm assembly implementation of clz Untested... currently crashes in the same manner as add_sat. commit 6ef0b7b0b6d2e5584086b4b9a9243743b2e0538f Author: Aaron Watry <awatry@gmail.com> Date: Sat Mar 23 12:35:27 2013 -0500 libclc: Add stub clz builtin For scalar int/uint, attempt to use the clz llvm builtin.. for all others return 0 until an actual implementation is finished. Patch by: Aaron Watry llvm-svn: 185004
* libclc: implement initial version of min()Tom Stellard2013-06-261-0/+1
| | | | | | | | This doesn't handle the integer cases for min(vector, scalar). Patch by: Aaron Watry llvm-svn: 185001
* libclc: Rename [add|sub]_sat.ll to [add|sub]_sat_if.llTom Stellard2013-06-261-2/+2
| | | | | | | | | | | | | | | | | configure.py allows overloading *.cl with *.ll, but will only ever build the first file listed in SOURCES of ${file}.cl and ${file}.ll add_sat, sub_sat, (and the soon to be submitted clz) all define interfaces in ${function_name}.ll which are implemented in ${function_name}_impl.ll. Renaming the interface files is enough to get them to build again, fixing CL usage of these functions. Tested on clover/r600g. Patch by: Aaron Watry llvm-svn: 185000
* libclc: implement rotate builtinTom Stellard2013-06-261-0/+1
| | | | | | | | | | | | This implementation does a lot of bit shifting and masking. Suffice to say, this is somewhat suboptimal... but it does look to produce correct results (after the piglit tests were corrected for sign extension issues). Someone who knows LLVM better than I could re-write this more efficiently. Patch by: Aaron Watry llvm-svn: 184996
* libclc: Move max builtin to shared/Tom Stellard2013-06-261-2/+1
| | | | | | | | Max(x,y) is available for all integer/floating types. Patch by: Aaron Watry llvm-svn: 184995
* libclc: Add clamp() builtin for integer/floating pointTom Stellard2013-06-261-0/+1
| | | | | | | | | Created under a new shared/ directory for functions which are available for both integer and floating point types. Patch by: Aaron Watry llvm-svn: 184994
* libclc: Fix abs_diff builtin integer functionTom Stellard2013-06-261-0/+1
| | | | | | Patch by: Aaron Watry llvm-svn: 184993
* libclc: Add max() builtin functionTom Stellard2013-06-261-0/+2
| | | | | | | | Adds this function for both int and floating data types. Patch by: Aaron Watry llvm-svn: 184992
* Implement fmax() and fmin() builtinsTom Stellard2013-06-261-0/+2
| | | | llvm-svn: 184987
* Implement any() builtin. Patch by Tom Stellard!Peter Collingbourne2012-10-081-0/+1
| | | | llvm-svn: 165386
* PTX: move implementations of work-item and synchronisation functionsPeter Collingbourne2012-08-051-0/+2
| | | | | | | to lib, and add header files in generic. Incorporates a patch by Tom Stellard! llvm-svn: 161313
* Implement sub_sat builtin. Patch by Lei Mou!Peter Collingbourne2012-08-051-0/+3
| | | | llvm-svn: 161312
* Add fma, hypot builtins.Peter Collingbourne2012-05-291-0/+1
| | | | llvm-svn: 157613
* Implement mad builtin.Peter Collingbourne2012-05-291-0/+1
| | | | llvm-svn: 157599
* Explicit conversions.Peter Collingbourne2012-05-281-0/+1
| | | | llvm-svn: 157590
* Initial commit.Peter Collingbourne2012-01-081-0/+8
llvm-svn: 147756
OpenPOWER on IntegriCloud