summaryrefslogtreecommitdiffstats
path: root/libclc/generic
Commit message (Collapse)AuthorAgeFilesLines
...
* Add bitselect() builtinTom Stellard2013-07-082-0/+2
| | | | | Reviewed-By: Aaron Watry <awatry@gmail.com> llvm-svn: 185836
* libclc: Add assembly versions of vstore for global [u]int4/8/16Tom Stellard2013-06-264-6/+168
| | | | | | | | | | | | | 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-264-2/+162
| | | | | | | | | | | | | 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-264-0/+94
| | | | | | | | | | Assumes that the target supports byte-addressable stores. Completely unoptimized. Patch by: Aaron Watry llvm-svn: 185007
* libclc: Initial vload implementationTom Stellard2013-06-264-0/+86
| | | | | | | | Should work for all targets and data types. Completely unoptimized. Patch by: Aaron Watry llvm-svn: 185006
* libclc: Implement clz() builtinTom Stellard2013-06-267-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add clamp(vec, scalar, scalar) and max(vec, scalar)Tom Stellard2013-06-264-0/+20
| | | | | | | | | | | For any GENTYPE that isn't scalar, we need to implement a mixed vector/scalar version of clamp/max. This depends on the min() patches I sent to the list a few minutes ago. Patch by: Aaron Watry llvm-svn: 185003
* libclc: Implement the min(vec, scalar) version of the min builtin.Tom Stellard2013-06-264-0/+41
| | | | | | | | | | Checks if the current GENTYPE is scalar, and if not, then defines a separate implementation of the function which casts the second arg to vector before proceeding. Patch by: Aaron Watry llvm-svn: 185002
* libclc: implement initial version of min()Tom Stellard2013-06-266-0/+22
| | | | | | | | 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-263-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
* Add a another TODO note.Tom Stellard2013-06-261-0/+3
| | | | | | Patch by: Aaron Watry llvm-svn: 184999
* Add a TODO note.Tom Stellard2013-06-261-0/+4
| | | | | | Patch by: Aaron Watry llvm-svn: 184998
* Simplify rotate implementation a bit..Tom Stellard2013-06-262-21/+37
| | | | | | | | Much more understandable/readable as a result, and probably more efficient. Patch by: Aaron Watry llvm-svn: 184997
* libclc: implement rotate builtinTom Stellard2013-06-267-0/+55
| | | | | | | | | | | | 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-2611-16/+10
| | | | | | | | 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-266-0/+24
| | | | | | | | | 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-262-1/+2
| | | | | | Patch by: Aaron Watry llvm-svn: 184993
* libclc: Add max() builtin functionTom Stellard2013-06-2610-0/+28
| | | | | | | | Adds this function for both int and floating data types. Patch by: Aaron Watry llvm-svn: 184992
* Implement ceil() builtinTom Stellard2013-06-262-0/+7
| | | | llvm-svn: 184988
* Implement fmax() and fmin() builtinsTom Stellard2013-06-269-0/+76
| | | | llvm-svn: 184987
* Remove the static keyword from the _CLC_INLINE macroTom Stellard2013-06-261-1/+1
| | | | | | static functions are not allowed in OpenCL C llvm-svn: 184986
* Use brackets around include files in length.cl and normalize.clTom Stellard2013-06-262-2/+2
| | | | | | These functions were not being compiled llvm-svn: 184985
* Fix typo in include/clc/geometric/length.incTom Stellard2013-06-261-1/+1
| | | | llvm-svn: 184984
* PTX: move implementations of work-item and synchronisation functionsTom Stellard2013-06-262-2/+2
| | | | | | | to lib, and add header files in generic. Incorporates a patch by Tom Stellard! llvm-svn: 184979
* Move R600 headers into generic directoryTom Stellard2013-06-262-2/+2
| | | | llvm-svn: 184978
* Implement any() builtin. Patch by Tom Stellard!Peter Collingbourne2012-10-084-0/+48
| | | | llvm-svn: 165386
* Add native_powr builtin. Patch by Tom Stellard!Peter Collingbourne2012-10-082-0/+2
| | | | llvm-svn: 165385
* Add rsqrt builtin. Based on patch by Cassie Epps!Peter Collingbourne2012-08-212-0/+2
| | | | llvm-svn: 162274
* Add floor builtin. Patch by Cassie Epps!Peter Collingbourne2012-08-212-0/+7
| | | | llvm-svn: 162273
* Do not use linkonce_odr linkage in .ll files. This prevented themPeter Collingbourne2012-08-054-32/+32
| | | | | | from being linked into the library under lazy linkage. llvm-svn: 161314
* PTX: move implementations of work-item and synchronisation functionsPeter Collingbourne2012-08-0510-0/+19
| | | | | | | 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-057-0/+197
| | | | llvm-svn: 161312
* Fix declarations of __clc_add_sat_*. Patch by Lei Mou!Peter Collingbourne2012-08-051-8/+8
| | | | llvm-svn: 161311
* Add pow builtin.Peter Collingbourne2012-05-293-0/+25
| | | | llvm-svn: 157629
* Enable cl_khr_fp64 when building the library, and fix several bugsPeter Collingbourne2012-05-294-1/+13
| | | | | | uncovered when doing so. llvm-svn: 157617
* Add missing dot.h include.Peter Collingbourne2012-05-293-0/+24
| | | | llvm-svn: 157615
* Define FLOAT in floatn.inc.Peter Collingbourne2012-05-291-0/+10
| | | | llvm-svn: 157614
* Add fma, hypot builtins.Peter Collingbourne2012-05-298-0/+41
| | | | llvm-svn: 157613
* Implement mad builtin.Peter Collingbourne2012-05-297-0/+63
| | | | llvm-svn: 157599
* Implement exp, exp2, log, log2, native_exp, native_exp2, native_log,Peter Collingbourne2012-05-299-0/+32
| | | | | | native_log2. Patch by Joshua Cranmer! llvm-svn: 157598
* Fix typo in double precision case.Peter Collingbourne2012-05-291-1/+1
| | | | llvm-svn: 157597
* Add fabs builtin.Peter Collingbourne2012-05-282-0/+7
| | | | llvm-svn: 157595
* Explicit conversions.Peter Collingbourne2012-05-284-0/+208
| | | | llvm-svn: 157590
* Initial commit.Peter Collingbourne2012-01-0846-0/+1022
llvm-svn: 147756
OpenPOWER on IntegriCloud