Jan Vesely
6b4a625438
native_exp10: Switch implementation to llvm intrinsic
...
v2: Use native_log2 instead of wrong constant
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317941
2017-11-10 22:16:41 +00:00
Jan Vesely
4301e6d0c9
native_sqrt: Switch implementation to llvm intrinsic
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317940
2017-11-10 22:16:39 +00:00
Jan Vesely
1f34c851e0
native_sin: Switch implementation to llvm intrinsic
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317939
2017-11-10 22:16:36 +00:00
Jan Vesely
0750b7df51
native_cos: Switch implementation to llvm intrinsic
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317938
2017-11-10 22:16:33 +00:00
Jan Vesely
edbde58de0
native_exp2: Switch implementation to llvm intrinsic
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317937
2017-11-10 22:16:31 +00:00
Jan Vesely
504f85c551
native_exp: Switch implementation to llvm intrinsic
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317936
2017-11-10 22:16:28 +00:00
Jan Vesely
8dc6e98d47
amdgpu: Add workaround for unimplemented llvm.exp intrinsic
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317935
2017-11-10 22:16:25 +00:00
Jan Vesely
adc1eaedf8
native_log10: Switch to generic native intrinsic inc file
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317934
2017-11-10 22:16:22 +00:00
Jan Vesely
086e796053
native_log: Switch to generic native intrinsic inc file
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317933
2017-11-10 22:16:20 +00:00
Jan Vesely
f58dee9f3a
native_log2: Switch to generic native intrinsic inc file
...
v2: Add __CLC_XCONCAT instead of function name redirection
Use __CLC_XCONCAT for intrinsic functions as well
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317932
2017-11-10 22:16:15 +00:00
Jan Vesely
39ef293533
tgamma: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317260
2017-11-02 19:49:00 +00:00
Jan Vesely
91d7b92d8a
tanh: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317259
2017-11-02 19:48:58 +00:00
Jan Vesely
e4d5d10076
tan: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317258
2017-11-02 19:48:57 +00:00
Jan Vesely
b0fab2696a
sqrt: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317257
2017-11-02 19:48:55 +00:00
Jan Vesely
e3802356e2
sinpi: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317256
2017-11-02 19:48:53 +00:00
Jan Vesely
4708b10878
sinh: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317255
2017-11-02 19:48:51 +00:00
Jan Vesely
a3febe3fa9
sin: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317254
2017-11-02 19:48:50 +00:00
Jan Vesely
25671b40d7
native_log: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317253
2017-11-02 19:48:48 +00:00
Jan Vesely
fd13434d83
native_log2: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317252
2017-11-02 19:48:46 +00:00
Jan Vesely
d6ad07687d
native_log10: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317251
2017-11-02 19:48:44 +00:00
Jan Vesely
139185dfc7
log: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317250
2017-11-02 19:48:43 +00:00
Jan Vesely
27dffff6e8
logb: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317249
2017-11-02 19:48:41 +00:00
Jan Vesely
7fc23fbdcb
log2: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317248
2017-11-02 19:48:39 +00:00
Jan Vesely
a9132ce347
log1p: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317247
2017-11-02 19:48:37 +00:00
Jan Vesely
4e062cb74e
lgamma: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317246
2017-11-02 19:48:35 +00:00
Jan Vesely
4cb612e140
exp2: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317245
2017-11-02 19:48:33 +00:00
Jan Vesely
e99ba9a23d
cospi: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317244
2017-11-02 19:48:31 +00:00
Jan Vesely
c708278f13
cosh: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317243
2017-11-02 19:48:30 +00:00
Jan Vesely
f76371d948
cos: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317242
2017-11-02 19:48:27 +00:00
Jan Vesely
50a3cccdbe
cbrt: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317241
2017-11-02 19:48:25 +00:00
Jan Vesely
a4df39bcad
atanpi: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317240
2017-11-02 19:48:23 +00:00
Jan Vesely
1bd2ac257a
atanh: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317239
2017-11-02 19:48:22 +00:00
Jan Vesely
0942b5e1bf
atan: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317238
2017-11-02 19:48:20 +00:00
Jan Vesely
d3d5e322e3
asinpi: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317237
2017-11-02 19:48:18 +00:00
Jan Vesely
48bda32986
asinh: Use unary_dec instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317236
2017-11-02 19:48:16 +00:00
Jan Vesely
ba4b98c691
asin: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317235
2017-11-02 19:48:15 +00:00
Jan Vesely
61171847b7
acospi: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317234
2017-11-02 19:48:13 +00:00
Jan Vesely
720783d9f5
acosh: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317233
2017-11-02 19:48:11 +00:00
Jan Vesely
caca914218
acos: Use unary_decl instead of custom inc file
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 317232
2017-11-02 19:48:06 +00:00
Jan Vesely
47e093da9b
math: Implement native_log10
...
Use llvm instrinsic by default
Provide amdgpu workaround
v2: drop old amd copyrights
Reviewer: Aaron Watry
Reviewed-by: Vedran Miletić <vedran@miletic.net>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 316588
2017-10-25 16:49:22 +00:00
Jan Vesely
9fedbb9d8e
amdgpu/math: Don't use llvm instrinsic for native_log
...
AMDGPU targets don't have insturction for it,
so it'll be expanded to C * log2 anyway.
v2: use native_log2 instead of the more precise sw implementation
v3: move to amdgpu
v4: drop old AMD copyright
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 316587
2017-10-25 16:49:17 +00:00
Jan Vesely
7ab2d0bdcd
shared: Implement aligned vector stores (vstorea_half)
...
Float version passes newly posted piglit tests on turks, float and double pass on carrizo.
v2: scalar vstorea_half
v3: fix typo
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 316291
2017-10-22 14:21:59 +00:00
Jan Vesely
12061c7125
shared: Implement aligned vector loads (vloada_half)
...
Passes newly posted piglits on turks and carrizo
v2: add scalar vloada_half
v3: fix typo
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 316290
2017-10-22 14:21:56 +00:00
Jan Vesely
c420b61b26
amdgcn: Add missing datalayout info to .ll files
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 316239
2017-10-20 21:10:18 +00:00
Jan Vesely
66b32ad9ad
r600: Add missing datalayout to .ll files
...
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 316238
2017-10-20 21:00:31 +00:00
Jan Vesely
577c52b9c7
travis: enable checks of nvptx libraries
...
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 315343
2017-10-10 18:10:25 +00:00
Jan Vesely
2601429bac
travis: Enable external function call checks on llvm-{4,5}
...
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 315342
2017-10-10 18:10:24 +00:00
Jan Vesely
3d349ea98e
Make image builtins r600/llvm-3.9 only
...
The implementation uses r600 sepcific intrinsics
LLVM-4 switched to _ro_t and _rw_t image types
Portions of the code can be moved back as more targets/llvm versions add image support
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 315341
2017-10-10 18:10:21 +00:00
Jeroen Ketema
1364d268a4
Implement mem_fence on ptx
...
PTX does not differentiate between read and write fences. Hence, these a
lowered to a mem_fence call. The mem_fence function compiles to the
“member.cta” instruction, which commits all outstanding reads and writes
of a thread such that these become visible to all other threads in the same
CTA (i.e., work-group). The instruction does not differentiate between
global and local memory. Hence, the flags parameter is ignored, except
for deciding whether a “member.cta” instruction should be issued at all.
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 315235
2017-10-09 19:43:04 +00:00
Jeroen Ketema
4f5a3d5d6f
Make ptx barrier work irrespective of the cl_mem_fence_flags
...
This generates a "bar.sync 0” instruction, which not only causes the
threads to wait, but does acts as a memory fence, as required by
OpenCL. The fence does not differentiate between local and global
memory. Unfortunately, there is no similar instruction which does
not include a memory fence. Hence, we cannot optimize the case
where neither CLK_LOCAL_MEM_FENCE nor CLK_GLOBAL_MEM_FENCE is
passed.
llvm-svn: 315228
2017-10-09 18:36:48 +00:00