Jan Vesely
ae50c89589
r600: Fix get_work_dim range metadata
...
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 220388
2014-10-22 14:32:53 +00:00
Jan Vesely
260827caa2
r600: Use llvm intrinsic to read work dimension information
...
v2: Fix function declaration
Add range metadata to r600 implementation
v3: change prefix to AMDGPU
Reviewed-by: Tom Stellard <tom@stellard.net>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 219793
2014-10-15 15:08:06 +00:00
Tom Stellard
bf9f76fbe0
Implement log1p builtin
...
llvm-svn: 219230
2014-10-07 20:22:42 +00:00
Jan Vesely
8f64c3d842
Implement fmod
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 219087
2014-10-05 20:24:52 +00:00
Tom Stellard
081e778d22
Implement async_work_group_copy builtin v3
...
This is a simple implementation which just copies data synchronously.
v2:
- Use size_t.
v3:
- Fix possible race condition by splitting the copy among multiple
work items.
llvm-svn: 219008
2014-10-03 19:49:39 +00:00
Tom Stellard
ed5bbfdb1b
Implement async_work_group_strided_copy builtin v2
...
This is a simple implementation which just copies data synchronously.
v2:
- Use size_t.
llvm-svn: 219007
2014-10-03 19:49:37 +00:00
Tom Stellard
b5064f79ef
Implement wait_group_events builtin v2
...
This is a simple default implemetation which just calls barrier().
v2:
- Only call barrier() once.
llvm-svn: 219006
2014-10-03 19:49:34 +00:00
Jeroen Ketema
87d2ca57d7
Remove more redundant semi-colons
...
llvm-svn: 218039
2014-09-18 09:23:40 +00:00
Aaron Watry
db770b5bb5
atomic: undef macros that are included from atomic_decl.inc
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk>
llvm-svn: 217958
2014-09-17 15:27:39 +00:00
Jeroen Ketema
839b8a62d9
Remove redundant semi-colons
...
llvm-svn: 217954
2014-09-17 14:40:48 +00:00
Aaron Watry
f4133b8a10
R600: Map Address spaces for atomic_cmpxchg
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217925
2014-09-16 22:34:59 +00:00
Aaron Watry
e210cae126
R600: Map address spaces for atomic_xchg
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217924
2014-09-16 22:34:58 +00:00
Aaron Watry
0545fa3fb0
R600: Map address spaces for atomic_min
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217923
2014-09-16 22:34:56 +00:00
Aaron Watry
dd754f4b33
R600: Map address spaces for atomic_xor
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217922
2014-09-16 22:34:55 +00:00
Aaron Watry
ea32a57060
R600: Map addr spaces and use atomic_max
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217921
2014-09-16 22:34:53 +00:00
Aaron Watry
5ab82be926
R600: Map address spaces for atomic_or
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217920
2014-09-16 22:34:52 +00:00
Aaron Watry
348db3c666
R600: Map atomic_and address spaces
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217919
2014-09-16 22:34:51 +00:00
Aaron Watry
0d976ba497
atomic: Add generic atom[ic]_cmpxchg
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217918
2014-09-16 22:34:49 +00:00
Aaron Watry
025d79ad6c
atomic: Implement generic atom[ic]_xchg
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217917
2014-09-16 22:34:45 +00:00
Aaron Watry
7cfa12c2a5
atomic: Add generic atomic_min implementation
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217916
2014-09-16 22:34:41 +00:00
Aaron Watry
3f0a1a4c27
atomic: Add generic atom[ic]_xor
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217915
2014-09-16 22:34:36 +00:00
Aaron Watry
31e67d1cff
atomic: Add atom[ic]_or
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217914
2014-09-16 22:34:32 +00:00
Aaron Watry
cc68405761
atomics: Add generic atom[ic]_and
...
Not used yet.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 217913
2014-09-16 22:34:28 +00:00
Aaron Watry
49614fbfd9
atomic: Add generic implementation of atom[ic]_max
...
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
2014-09-16 22:34:24 +00:00
Aaron Watry
c9b88d32be
atomic: define extension functions for existing atomic implementations
...
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
2014-09-16 22:34:21 +00:00
Aaron Watry
947bdd059a
math: Add tan implementation
...
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
2014-09-10 15:43:35 +00:00
Aaron Watry
951ab64d19
math: Add asin implementation
...
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
2014-09-10 15:43:32 +00:00
Aaron Watry
268beab921
math: Add acos implementation
...
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
2014-09-10 15:43:29 +00:00
Jan Vesely
05a60b7ac3
add isordered builtin
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217247
2014-09-05 13:59:15 +00:00
Jan Vesely
63486c1f0e
add isunordered builtin
...
v2: remove trailing newline
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217246
2014-09-05 13:59:13 +00:00
Jan Vesely
41a0c491de
add islessgreater builtin
...
v2: remove trailing newline
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217245
2014-09-05 13:59:11 +00:00
Jan Vesely
369e20353c
add isnormal builtin
...
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
2014-09-05 13:59:09 +00:00
Jan Vesely
a5a3b023b4
add isfinite builtin
...
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
2014-09-05 13:59:06 +00:00
Tom Stellard
7a9e2c6879
Implement isinf builtin
...
llvm-svn: 217046
2014-09-03 15:55:40 +00:00
Tom Stellard
d8a73abfc3
Fix implementation of copysign
...
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
2014-09-03 15:55:38 +00:00
Jan Vesely
ef513d392b
Implement generic mad_sat
...
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
2014-09-02 17:55:02 +00:00
Jan Vesely
62496142d5
configure: Add rpath to prepare-builtins util
...
v2: use space instead of '=' to make Mac happy
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk>
llvm-svn: 216922
2014-09-02 17:54:59 +00:00
Michel Danzer
7b77ab7b2c
Fix build against LLVM SVN >= r216488
...
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 216654
2014-08-28 06:19:37 +00:00
Michel Danzer
a10b492ce3
Fix build against LLVM SVN >= r216393
...
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 216653
2014-08-28 06:19:33 +00:00
Aaron Watry
9447097636
Revert "Implement generic mad_sat"
...
This reverts commit cf62eded8b623a1c10d3692d25e5882b7939f564.
I didn't mean to commit this... Jan has a v3 incoming
llvm-svn: 216322
2014-08-23 14:06:01 +00:00
Aaron Watry
a4fdda01b8
Add int3/uint3 to integer-gentype.inc
...
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
2014-08-23 14:04:36 +00:00
Aaron Watry
6bfac7ae69
Implement generic mad_sat
...
v2: Fix trailing whitespace
Fix signed long overflow
improve comment
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
llvm-svn: 216320
2014-08-23 14:04:33 +00:00
Niels Ole Salscheider
109ce69e75
Include llvm-config.h instead of config.h
...
Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 216296
2014-08-22 22:24:28 +00:00
Tom Stellard
b8478abd2e
Add missing file from r216127
...
llvm-svn: 216128
2014-08-20 21:28:44 +00:00
Tom Stellard
2ad4243bf7
Implement prefetch builtin
...
The default implementation is a no-op. Targets should override this
with their own implementations.
llvm-svn: 216127
2014-08-20 21:23:03 +00:00
Tom Stellard
425c181fb4
R600: Add aliases for hainan and mullins
...
llvm-svn: 216126
2014-08-20 21:23:01 +00:00
Aaron Watry
f991505d02
vload/vstore: Use casts instead of scalarizing everything in CLC version
...
This generates bitcode which is indistinguishable from what was
hand-written for int32 types in v[load|store]_impl.ll.
v4: Use vec2+scalar for vec3 load/stores to prevent corruption (per Tom)
v3: Also remove unused generic/lib/shared/v[load|store]_impl.ll
v2: (Per Matt Arsenault) Fix alignment issues with vector load stores
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
CC: Matt Arsenault <Matthew.Arsenault@amd.com>
CC: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 216069
2014-08-20 13:58:57 +00:00
Jan Vesely
12c660827e
relational: Add islessequal(floatN) builtin
...
v2: remove the initial undef
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 214568
2014-08-01 21:50:59 +00:00
Jan Vesely
acba2c98eb
relational: Add isless(floatN) builtin
...
v2: remove the initial undef
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 214567
2014-08-01 21:50:55 +00:00
Tom Stellard
903a78b7c6
Implement sin builtin for float types
...
This double version still uses @llvm.sin.
llvm-svn: 213762
2014-07-23 15:16:21 +00:00
Tom Stellard
c0ab2f81e3
Implement cos builtin for float types
...
The double version still uses @llvm.cos.
llvm-svn: 213761
2014-07-23 15:16:18 +00:00
Tom Stellard
f9caca8b9d
Implement atan2 builtin
...
llvm-svn: 213760
2014-07-23 15:16:16 +00:00
Tom Stellard
47882923c7
Implement atan builtin
...
llvm-svn: 213759
2014-07-23 15:16:13 +00:00
Aaron Watry
9ef589e9cf
Add several missing double constant definitions
...
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
2014-07-17 22:07:35 +00:00
Aaron Watry
d7f022a582
relational: Implement isnotequal
...
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
2014-07-17 22:07:32 +00:00
Aaron Watry
30102536c0
relational: Implement isgreaterequal
...
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
2014-07-17 22:07:27 +00:00
Aaron Watry
803a992f04
relational: Implement isgreater
...
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
2014-07-17 22:07:19 +00:00
Aaron Watry
9335fe8eff
relational/signbit: Refactor to use relational macros
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 213317
2014-07-17 22:05:25 +00:00
Aaron Watry
d5aace4874
Fix isnan definition for vector results
...
Vector true is -1, not 1, which means we need to use the relational unary
macro instead of the normal unary builtin one.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 213316
2014-07-17 22:05:22 +00:00
Aaron Watry
13116cf01a
relational: create re-usable macros for relational declarations
...
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
2014-07-17 22:05:16 +00:00
Tom Stellard
8d92c396d9
prepare-builtins: Fix broken build due to recent LLVM API change
...
llvm-svn: 212470
2014-07-07 17:46:45 +00:00
Jeroen Ketema
575fb84cc3
OpenCL 1.1 does not define CL_VERSION_1_2 so use hardcoded number instead
...
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
2014-06-26 15:26:38 +00:00
Aaron Watry
d7f158e006
relational: Fix signbit
...
The vector components were mistakenly using () instead of {}, which caused
all but the last vector component to be dropped on the floor.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jeroen Ketema <j.ketema@imperial.ac.uk>
llvm-svn: 211733
2014-06-25 21:08:38 +00:00
Aaron Watry
d9ee196eab
relational: Implement signbit
...
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
2014-06-25 13:29:23 +00:00
Jeroen Ketema
42df5d2a8f
Add exp10
...
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211680
2014-06-25 10:06:35 +00:00
Jeroen Ketema
dd1fbc0082
Add half limits
...
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
2014-06-24 09:51:01 +00:00
Jeroen Ketema
046b47fbbe
Introduce CLC_VERSION macros v2
...
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
2014-06-24 09:46:52 +00:00
Jeroen Ketema
985a1381b2
Add MAXFLOAT
...
Align definitions while we are here.
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211577
2014-06-24 09:41:28 +00:00
Jeroen Ketema
526fe2d501
Move clcmacro.h to avoid cluttering user namespace v2
...
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
2014-06-24 09:36:32 +00:00
Jeroen Ketema
bfdb1c0c2f
Protect functions taking double by #ifdef cl_khr_fp64
...
Also change the order of the functions to be consistent with
the order in the header files.
llvm-svn: 211496
2014-06-23 14:15:39 +00:00
Jeroen Ketema
d253e66ec7
Fix breakage after r211259
...
While we are here introduce the proper headers for the error code.
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211432
2014-06-21 09:20:31 +00:00
Jeroen Ketema
09516fa27d
Add pown
...
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211211
2014-06-18 19:42:23 +00:00
Jeroen Ketema
fdee0d3efe
Add missing undefs
...
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211210
2014-06-18 19:37:34 +00:00
Aaron Watry
d9afe9def0
Fix definition of INFINITY and add NAN/HUGE_VAL[F]
...
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
2014-06-16 22:32:58 +00:00
Jeroen Ketema
f3bd08ae63
Add remaining float constants
...
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 211062
2014-06-16 22:15:50 +00:00
Aaron Watry
50f518be65
Revert "clctypes.h: Don't rely on stddef.h for size_t and ptrdiff_t"
...
This reverts commit 4cf021ae67b6ea8cfd42aa76ce6f5e1c329e145a.
llvm-svn: 211049
2014-06-16 20:21:19 +00:00
Aaron Watry
6af2969a61
math: Implement mix builtin
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211047
2014-06-16 19:53:59 +00:00
Aaron Watry
f7f79d2a94
relational: Add isequal(floatN) builtin
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211046
2014-06-16 19:53:57 +00:00
Aaron Watry
e167db9238
Add all(igentype) builtin
...
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211045
2014-06-16 19:53:54 +00:00
Aaron Watry
c164fc384b
clctypes.h: Don't rely on stddef.h for size_t and ptrdiff_t
...
llvm-svn: 211044
2014-06-16 19:53:52 +00:00
Jan Vesely
bd37b6884c
Add intptr types
...
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
2014-06-13 19:43:18 +00:00
Jeroen Ketema
e2a0f050d8
Add files forgotten in the previous commit
...
llvm-svn: 210896
2014-06-13 12:33:40 +00:00
Jeroen Ketema
82aaa41286
Implementations for exp(float) and exp(double) v2
...
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
2014-06-13 09:40:09 +00:00
Tom Stellard
0ab103422d
prepare-builtins: Use std:: prefix for error_code
...
This fixes the build with with newer LLVM.
llvm-svn: 210867
2014-06-13 01:30:14 +00:00
Jeroen Ketema
a3089bd7e5
Remove unused include which breaks build after r210803
...
Tested with llvm 3.4 and trunk.
llvm-svn: 210825
2014-06-12 21:10:17 +00:00
Jeroen Ketema
f3943efe17
Fix build broken by LLVM commit r209103
...
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 210111
2014-06-03 15:43:57 +00:00
Jeroen Ketema
75c1a0c6e2
Add more log related float constants
...
llvm-svn: 209850
2014-05-29 21:30:28 +00:00
Jeroen Ketema
d1bb82a722
Fix _F definitions
...
The 'f' was missing and, hence, the values were
considered to be doubles instead of floats.
Reviewed by: Tom Stellard
llvm-svn: 209849
2014-05-29 21:29:34 +00:00
Jeroen Ketema
a16fdbfac2
Add definition for M_PI
...
Reviewed by: Tom Stellard
llvm-svn: 209848
2014-05-29 21:24:57 +00:00
Tom Stellard
98dccb109b
Fix build broken by LLVM commit r207593
...
llvm-svn: 207685
2014-04-30 18:35:20 +00:00
Tom Stellard
998602dac2
Remove clc/gentype.inc
...
This file duplicates clc/math/gentype.inc and is not
actually being used.
Patch by: Jeroen Ketema
llvm-svn: 207684
2014-04-30 18:35:17 +00:00
Tom Stellard
f83fe5a6dc
Introduce M_LOG2E_F and M_LOG2E
...
Patch by: Jeroen Ketema
llvm-svn: 205055
2014-03-28 21:19:03 +00:00
Tom Stellard
ce43db105e
Replace tabs by spaces
...
Patch by: Jeroen Ketema
llvm-svn: 205054
2014-03-28 21:19:00 +00:00
Tom Stellard
6378f7a5e2
Add definition for M_PI_F v3
...
v2:
- Use a hexadecimal constant.
v3:
- Use a hexadecimal constant in floating-point notation.
llvm-svn: 204666
2014-03-24 20:36:44 +00:00
Tom Stellard
3a12fc6a07
Add sincos
...
Patch by: Jeroen Ketema
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 204478
2014-03-21 16:22:01 +00:00
Tom Stellard
074e7a8ed0
Add cross for double3 and double4
...
Patch by: Jeroen Ketema
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 204477
2014-03-21 16:21:58 +00:00
Tom Stellard
7aee1cfa99
Fix build since r202052
...
sys::fs_F_Binary has been replaced with sys::fs_F_Text
llvm-svn: 202081
2014-02-24 21:31:56 +00:00
Tom Stellard
d873c8e05a
Add generic nvptx targets
...
These do not import the code specific to nvidiacl
Patch by: Jeroen Ketema
llvm-svn: 201431
2014-02-14 20:33:53 +00:00
Tom Stellard
55d3746dbe
Revert "Enforce python2 for systems that use python3 as their default."
...
This reverts commit r200413.
This was breaking the build on systems where the python 2.x executable
was called python.
llvm-svn: 201239
2014-02-12 14:54:17 +00:00
Tom Stellard
0d35ed912a
Updated README.TXT with information about using DESTDIR and building with Ninja.
...
Patch by: Dan Liew
llvm-svn: 200416
2014-01-29 20:03:28 +00:00