| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211210
|
|
|
|
|
|
|
|
|
|
|
|
| |
v3: change __builtin_nanf() to __builtin_nanf("")
This doesn't work yet, but it was agreed to commit as-is with the logic
that "broken" is better than "completely missing" and this should be
fixed in clang.
v2: use __builtin_inff() and also add nan/huge_val definitions
Signed-off-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 211065
|
|
|
|
|
| |
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 211062
|
|
|
|
|
|
| |
This reverts commit 4cf021ae67b6ea8cfd42aa76ce6f5e1c329e145a.
llvm-svn: 211049
|
|
|
|
|
|
| |
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211047
|
|
|
|
|
|
| |
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211046
|
|
|
|
|
|
| |
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211045
|
|
|
|
| |
llvm-svn: 211044
|
|
|
|
|
|
|
|
| |
Based on clang's stdint.h
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 210933
|
|
|
|
| |
llvm-svn: 210896
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use separate implementations instead of a macro
to ensure the constant multiplied with is of
higher precision.
v2: Use the correct formula, spotted by Dan Liew <daniel.liew@imperial.ac.uk>
Reviewed-by: Aaron Warty <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 210891
|
|
|
|
| |
llvm-svn: 209850
|
|
|
|
|
|
|
|
|
| |
The 'f' was missing and, hence, the values were
considered to be doubles instead of floats.
Reviewed by: Tom Stellard
llvm-svn: 209849
|
|
|
|
|
|
| |
Reviewed by: Tom Stellard
llvm-svn: 209848
|
|
|
|
|
|
|
|
|
| |
This file duplicates clc/math/gentype.inc and is not
actually being used.
Patch by: Jeroen Ketema
llvm-svn: 207684
|
|
|
|
|
|
| |
Patch by: Jeroen Ketema
llvm-svn: 205055
|
|
|
|
|
|
| |
Patch by: Jeroen Ketema
llvm-svn: 205054
|
|
|
|
|
|
|
|
|
|
| |
v2:
- Use a hexadecimal constant.
v3:
- Use a hexadecimal constant in floating-point notation.
llvm-svn: 204666
|
|
|
|
|
|
|
| |
Patch by: Jeroen Ketema
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 204478
|
|
|
|
|
|
|
| |
Patch by: Jeroen Ketema
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 204477
|
|
|
|
|
|
|
|
| |
v2:
- Fix typo.
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 197784
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenCL C lang says that trunc rounds towards zero.
llvm.trunc.* intrinsic rounds to integer not larger in magnitude.
These definitions are equivalent.
Patch by: Jan Vesely
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 197769
|
|
|
|
|
|
|
| |
Patch by: Kai Wasserbäch
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
llvm-svn: 195898
|
|
|
|
| |
llvm-svn: 195022
|
|
|
|
| |
llvm-svn: 195021
|
|
|
|
|
|
|
|
|
| |
Some function definitions were using _CLC_DECL, which meant that they
weren't being marked as always_inline.
Reviewed-by and Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 193754
|
|
|
|
|
|
|
| |
This script generates implementations for the entire set of convert_*
functions,
llvm-svn: 192385
|
|
|
|
| |
llvm-svn: 192384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 192382
|
|
|
|
| |
llvm-svn: 192381
|
|
|
|
|
|
| |
Thanks to Jordon Rose <jordan_rose@apple.com> for pointing this out.
llvm-svn: 190310
|
|
|
|
|
|
|
|
|
| |
We already have a working mul_hi, and the spec gives us the implementation as:
Returns mul_hi(a,b)+c.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190211
|
|
|
|
|
| |
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 190201
|
|
|
|
|
| |
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 190059
|
|
|
|
|
| |
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 190058
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
| |
Not hooked up to R600 yet due to current lack of support, at least on EG.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 188181
|
|
|
|
|
|
| |
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 188179
|
|
|
|
| |
llvm-svn: 188131
|
|
|
|
| |
llvm-svn: 188130
|
|
|
|
|
|
|
|
| |
Found in CL 1.1 spec section 6.11.3
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 187200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The assembly optimizations were making unsafe assumptions about which address
spaces had which identifiers.
Also, fix vload/vstore with 64-bit pointers. This was broken previously on
Radeon SI.
This version still only has assembly versions of int/uint 2/4/8/16 for global
loads and stores on R600, but it does it in a way that would be very easily
extended to private/local/constant and could also be handled easily on other
architectures.
v2: 1) Leave v[load|store]_impl.ll in generic/lib
2) Remove vload_if.ll and vstore_if.ll interfaces
3) Fix address+offset calculations
3) Remove offset from assembly arg list
llvm-svn: 186416
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 186326
|
|
|
|
|
| |
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 185839
|
|
|
|
|
|
|
|
|
|
|
| |
libclc was defining and undefing GENTYPE and several other macros with
common names in its header files. This was preventing applications from
defining macros with identical names as command line arguments to the
compiler, because the definitions in the header files were masking the
macros defined as compiler arguements.
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 185838
|