Commit Graph

456 Commits

Author SHA1 Message Date
Jan Vesely
3c0e19b61a half_exp2: Implement using exp2
Passes CTS on carrizo
v2: Use full precision implementation

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322891
2018-01-18 21:11:45 +00:00
Jan Vesely
caa9000b1c half_exp: Implement using exp
Passes CTS on carrizo
v2: Use full precision implementation

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322890
2018-01-18 21:11:43 +00:00
Jan Vesely
b5d556061d half_cos: Implement using cos
Passes CTS on carrizo
v2: Use full precision implementation

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322889
2018-01-18 21:11:40 +00:00
Jan Vesely
e53ae3b596 half_sqrt: Cleanup implementation
Passes CTS on carrizo
v2: Use full precision implementation

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322888
2018-01-18 21:11:38 +00:00
Jan Vesely
a95db14461 half_rsqrt: Cleanup implementation
Passes CTS on carrizo
v2: Use full precision implementation

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322887
2018-01-18 21:11:35 +00:00
Jan Vesely
fe8e00bc3c rootn: Port from amd_builtins
Passes piglit on turks and carrizo
fp64 passes ctx on carrizo

v2: fix formatting
    check fp32 denormal support at runtime

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322763
2018-01-17 21:22:14 +00:00
Jan Vesely
c45ec604f5 powr: Port from amd_builtins
Passes piglit on turks and carrizo
fp64 passes cts on carrizo

v2: fix formatting
    check fp32 denormal support at runtime

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322762
2018-01-17 21:22:06 +00:00
Jan Vesely
5efc8fe321 pown: Port from amd_builtins
Passes piglit on turks and carrizo
fp64 passes CTS on carrizo

v2: fix formatting
    check fp32 denormal support at runtime

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322761
2018-01-17 21:22:03 +00:00
Jan Vesely
cc5c65b2c2 pow: Port from amd_builtins
Passes piglit on turks and carrizo
fp64 passes CTS on carrizo

v2: fix formatting
    check fp32 denormal support at runtime

Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322760
2018-01-17 21:21:35 +00:00
Vedran Miletic
79b7f4c125 configure.py: Add gfx900 (Vega, Raven)
Sort amdgcn-- and amdgcn--amdhsa in a consistent way.

llvm-svn: 319017
2017-11-27 11:14:06 +00:00
Jan Vesely
fe7c045753 math: Implement minmag
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318265
2017-11-15 04:10:39 +00:00
Jan Vesely
7ba243cc3d math: Implement maxmag
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318264
2017-11-15 04:10:37 +00:00
Jan Vesely
383fbd050c native_powr: Switch implementation to native_exp2 and native_log2
v2: don't use assume
    check only for x<0, the other conditions are handled transparently
v3: don't check inputs at all, nan propagation works as expected

Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318204
2017-11-14 21:55:41 +00:00
Jan Vesely
f38b40daf7 native_divide: provide function implementation instead of macro
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318067
2017-11-13 18:28:56 +00:00
Jan Vesely
1b9825f982 native_recip: provide function implementation instead of macro
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318066
2017-11-13 18:28:53 +00:00
Jan Vesely
a6758c94ef native_rsqrt: Switch implementation to 1 / native_sqrt
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318065
2017-11-13 18:28:51 +00:00
Jan Vesely
541a3f0758 native_tan: Switch implementation to use native_sin/native_cos
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318064
2017-11-13 18:28:48 +00:00
Jan Vesely
79b7566210 math: Use precomputed constant for log2(10.0)
exp10 CTS fails with or without this change

Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318063
2017-11-13 18:28:45 +00:00
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