| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217915
|
|
|
|
|
|
| |
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217914
|
|
|
|
|
|
|
|
| |
Not used yet.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217913
|
|
|
|
|
|
|
|
|
|
| |
Not used yet...
v2: Correct int/uint behavior
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217912
|
|
|
|
|
|
|
|
| |
We were missing the local versions of the atom_* before
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217911
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uses the algorithm:
tan(x) = sin(x) / sqrt(1-sin^2(x))
An alternative is:
tan(x) = sin(x) / cos(x)
Which produces more verbose bitcode and longer assembly.
Either way, the generated bitcode seems pretty nasty and a more optimized
but still precise-enough solution is welcome.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 217511
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
asin(x) = atan2(x, sqrt( 1-x^2 ))
alternatively:
asin(x) = PI/2 - acos(x)
Use the atan2 implementation since it produces slightly shorter bitcode and
R600 machine code.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 217510
|
|
|
|
|
|
|
|
|
|
| |
Passes the tests that were submitted to the piglit list
Tested on R600 (Pitcairn)
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 217509
|
|
|
|
|
|
| |
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217247
|
|
|
|
|
|
|
|
| |
v2: remove trailing newline
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217246
|
|
|
|
|
|
|
|
| |
v2: remove trailing newline
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217245
|
|
|
|
|
|
|
|
|
| |
v2: simplify and remove isnan leftovers
remove trailing newline
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217244
|
|
|
|
|
|
|
|
|
| |
v2: simplify and remove isinf leftovers
remove trailing newline
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217243
|
|
|
|
| |
llvm-svn: 217046
|
|
|
|
|
|
|
|
|
| |
This was previously implemented with a macro and we were using
__builtin_copysign(), which takes double inputs for the float
version of copysign().
Reviewed-and-Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217045
|
|
|
|
|
|
|
|
|
|
|
|
| |
v2: Fix trailing whitespace
Fix signed long overflow
improve comment
v3: fix typo
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 216923
|
|
|
|
|
|
|
|
| |
This reverts commit cf62eded8b623a1c10d3692d25e5882b7939f564.
I didn't mean to commit this... Jan has a v3 incoming
llvm-svn: 216322
|
|
|
|
|
|
|
|
| |
These were missing and caused mad24/mul24 with int3/uint3 arg type to fail
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 216321
|
|
|
|
|
|
|
|
|
| |
v2: Fix trailing whitespace
Fix signed long overflow
improve comment
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
llvm-svn: 216320
|
|
|
|
| |
llvm-svn: 216128
|
|
|
|
|
|
|
| |
The default implementation is a no-op. Targets should override this
with their own implementations.
llvm-svn: 216127
|
|
|
|
|
|
|
|
| |
v2: remove the initial undef
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 214568
|
|
|
|
|
|
|
|
| |
v2: remove the initial undef
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 214567
|
|
|
|
|
|
| |
This double version still uses @llvm.sin.
llvm-svn: 213762
|
|
|
|
|
|
| |
The double version still uses @llvm.cos.
llvm-svn: 213761
|
|
|
|
| |
llvm-svn: 213760
|
|
|
|
| |
llvm-svn: 213759
|
|
|
|
|
|
|
|
|
|
|
| |
These were present in CL 1.0, just not implemented yet.
v2: Use hex values and fix commit message
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk>
CC: Matt Arsenault <Matthew.Arsenault@amd.com>
llvm-svn: 213321
|
|
|
|
|
|
|
|
| |
v2: Use relational macros instead of hand-rolled ones
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 213320
|
|
|
|
|
|
|
|
| |
v2: Use relational macros instead of hand-rolled macros
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 213319
|
|
|
|
|
|
|
|
| |
v2: Use relational macros instead of hand-rolled macros
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 213318
|
|
|
|
|
|
| |
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 213317
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
relational.h includes relational macros for defining functions which need to
return 1 for scalar true and -1 for vector true.
I believe that this is the only place that this behavior is required, so the
macro is placed at its lowest useful level (same directory as it is used in).
This also creates re-usable unary/binary declaration and floatn includes which
should simplify relational builtin declarations.
Mostly patterned off of include/math/[binary_decl|unary_decl|floatn].inc
but with required changes for relational functions.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 213315
|
|
|
|
|
|
|
|
| |
Otherwise the test evaluates to true on OpenCL 1.1 and earlier. Since we
therefore cannot use the CL_VERSION_?_? macros move them to the proper
position in the top-level header.
llvm-svn: 211787
|
|
|
|
|
|
|
|
|
|
|
| |
v2 Changes:
- use __builtin_signbit instead of shifting by hand
- significantly improve vector shuffling
- Works correctly now for signbit(float16) on radeonsi
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 211696
|
|
|
|
|
| |
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211680
|
|
|
|
|
|
|
|
|
|
|
| |
These are apparently only defined in OpenCL 1.2.
HALF_MAX, HALF_MIN and HALF_EPSILON are currently omitted. Clang does
not seem to support the ‘h’ suffix for half float constants even with
the cl_khr_fp16 extension enabled.
Reviewed-by: Tom Sellard <tom@stellard.net>
llvm-svn: 211579
|
|
|
|
|
|
|
|
|
| |
Add these out-of-order in clc.h so we can use these in other headers.
v2: Take into account the lack of a definition in OpenCL 1.0
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211578
|
|
|
|
|
|
|
| |
Align definitions while we are here.
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211577
|
|
|
|
|
|
|
|
|
| |
v2: - use quotes instead of <>
- add include to r600/lib/math/nextafter.c changed
Reviewed-by: Tom Stellard <tom@stellard.net>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 211576
|
|
|
|
|
| |
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211211
|
|
|
|
|
| |
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
|