Commit Graph

550 Commits

Author SHA1 Message Date
Jan Vesely 3889c36d3f r600: Add datalayout to image builtin implementation
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346597
2018-11-10 21:43:40 +00:00
Jan Vesely 0ba9339cde Remove redundant OVERRRIDES file
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346086
2018-11-04 00:54:46 +00:00
Jan Vesely fd9d787b18 configure: Provide symlink for amdgcn-mesa3d instead of configure hack
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346085
2018-11-04 00:54:45 +00:00
Jan Vesely ee93cda9b4 travis: Check tahiti-amdgcn-mesa-mesa3d.bc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346084
2018-11-04 00:54:43 +00:00
Jan Vesely fa94c1a879 amdgcn-amdhsa: Convert get_{global,local}_size to clc for all llvm versions
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346083
2018-11-04 00:39:30 +00:00
Jan Vesely f663e7e6da amdgcn: Move __clc_amdgcn_s_waitcnt definition to clc file
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346082
2018-11-04 00:39:27 +00:00
Jan Vesely 0e95b6a579 amdgcn: Convert get_num_groups to clc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346081
2018-11-04 00:39:25 +00:00
Jan Vesely 97283de27d amdgcn: Convert get_global_size to clc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346080
2018-11-04 00:39:20 +00:00
Jan Vesely ea2f32b75d amdgcn: Convert get_local_size to clc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 346079
2018-11-04 00:39:16 +00:00
Jan Vesely 2d32cd1585 r600: Convert barrier to clc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346078
2018-11-04 00:35:15 +00:00
Jan Vesely 35b7ac4c30 r600: Convert get_num_groups to clc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346077
2018-11-04 00:35:12 +00:00
Jan Vesely cc6c2ef3b4 r600: Convert get_global_size to clc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346076
2018-11-04 00:35:08 +00:00
Jan Vesely 5fa4e06e27 r600: Convert get_local_size to clc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 346075
2018-11-04 00:35:03 +00:00
Jan Vesely 70c5f9dff8 configure: Rework support for gfx9+ devices that were added post LLVM 3.9
v2: Fix reference to Vega12/20 enabling commit

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 342341
2018-09-15 22:02:01 +00:00
Jan Vesely a1981c757b .travis: Add llvm-7 build
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry
llvm-svn: 342338
2018-09-15 20:00:37 +00:00
Jan Vesely bb93407831 .travis: Use source whitelist alias for llvm-6 repository
Fixes issue with unauthenticated packages.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry

llvm-svn: 342337
2018-09-15 20:00:12 +00:00
Jan Vesely faa1ff16c1 amdgcn: Use __constant AS for amdgcn builtins.
Fixes build after clang r338707.
Reviewer: Matthew.Arsenault@amd.com
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

llvm-svn: 338898
2018-08-03 15:14:08 +00:00
Jan Vesely 8382e5bc48 atom: Use volatile pointers for cl_khr_{global,local}_int32_{base,extended}_atomics
int64 versions were switched to volatile pointers in cl1.1
cl1.1 also renamed atom_ functions to atomic_ that use volatile pointers.
CTS and applications use volatile pointers.

Passes CTS on carrizo
no return piglit tests still pass on turks.

Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335280
2018-06-21 19:27:39 +00:00
Jan Vesely 65e3541b78 atom: Consolidate cl_khr_{local,global}_int32_{base,extended}_atomics implementation
These are just atomic_* wrappers.
Switch inc, dec to use atomic_* wrappers as well.

Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335279
2018-06-21 19:27:33 +00:00
Jan Vesely f965b46c8e atomic: Provide function implementation of atomic_{dec,inc}
Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335278
2018-06-21 19:27:26 +00:00
Jan Vesely b9cbe0bf51 atom: Consolidate cl_khr_int64_{base,extended}_atomics declarations
Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335277
2018-06-21 19:27:23 +00:00
Jan Vesely d1c3811ff7 atom: Consolidate cl_khr_{local,global}_int32_{base,extended}_atomics declarations
Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335276
2018-06-21 19:27:18 +00:00
Jan Vesely fe08de0c89 atomic: Cleanup atomic_cmpxchg header
It's easier to just list the four function declarations

Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335275
2018-06-21 19:27:12 +00:00
Jan Vesely eabc110372 atomic: Move define cleanup to shared include
Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335274
2018-06-21 19:27:07 +00:00
Paul Robinson 7555c589af Update copyright year to 2018.
llvm-svn: 334936
2018-06-18 12:22:17 +00:00
Jan Vesely e0edcaa4a9 r600/fmin: Flush denormals before calling builtin.
Same reason as amdgcn.
Fixes fmin, minmag CTS on turks.
Reviewer: Tom Stellard <tstellar@redhat.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

llvm-svn: 334228
2018-06-07 20:27:58 +00:00
Jan Vesely e23c0ec086 r600/fmax: Flush denormals before calling builtin.
Same reason as amdgcn.
Fixes fmax, maxmag CTS on turks.
Reviewer: Tom Stellard <tstellar@redhat.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

llvm-svn: 334227
2018-06-07 20:27:56 +00:00
Jan Vesely 6e85e6309d math/fma: Add fp32 software implementation
Passes CTS on carrizo (when forced to use sw fma) and turks.
Reviewer: Tom Stellard <tstellar@redhat.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

llvm-svn: 334226
2018-06-07 20:27:43 +00:00
Jan Vesely 70a270da5f Add initial support for half precision builtins
v2: fix fmax implementation
    use consistent checks for __CLC_FP_SIZE
    add missing TODOs
    fix whitespace in definitions.h
v3: undef ZERO in modf.inc

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Reviewed-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 332677
2018-05-17 22:55:30 +00:00
Jan Vesely 58fdb3b09a rootn: Use denormal path only
It's OK to either flush to 0 or return denormal result if the device
does not support denormals. See sec 7.2 and 7.5.3 of OCL specs
Use 0.0f explicitly intead of relying on GPU to flush it.
Fixes CTS on carrizo and turks

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 332324
2018-05-15 04:22:43 +00:00
Jan Vesely 21e77037c0 remquo: Flush denormals if not supported
It's OK to either flush to 0 or return denormal result if the device
does not support denormals. See sec 7.2 and 7.5.3 of OCL specs.
Fixes CTS on carrizo and turks.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>
llvm-svn: 331435
2018-05-03 05:44:28 +00:00
Jan Vesely 8db45e4cf1 remquo: Port from amd builtins
double version passes on carrizo. float version fails on denormals.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>
llvm-svn: 331434
2018-05-03 05:44:26 +00:00
Jan Vesely 6146eda75d math: Add helper function to flush denormals if not supported.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>
llvm-svn: 331433
2018-05-03 05:44:22 +00:00
Jan Vesely 616a38a693 clc_sqrt: Reuse unary_decl.inc
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 331366
2018-05-02 16:06:52 +00:00
Jan Vesely 1647e50359 relational/select: Condition types for half are short/ushort, not char/uchar
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 330851
2018-04-25 17:36:36 +00:00
Jan Vesely e7d567ee0d log10: Use sw implementation from amd builtins
Add missing table.
Fixes log10d CTS on carrizo.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>

llvm-svn: 330649
2018-04-23 21:10:42 +00:00
Jan Vesely 96591b6202 powr: Use denormal path only
It's OK to either flush to 0 or return denormal result if the device
does not support denormals. See sec 7.2 and 7.5.3 of OCL specs
Fixes CTS on carrizo and turks.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>

llvm-svn: 330207
2018-04-17 19:35:32 +00:00
Jan Vesely 4388d2883c pown: Use denormal path only
It's OK to either flush to 0 or return denormal result if the device
does not support denormals. See sec 7.2 and 7.5.3 of OCL specs
Fixes CTS on carrizo and turks.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>

llvm-svn: 330206
2018-04-17 19:35:30 +00:00
Jan Vesely 0d92f3047f pow: Use denormal path only
It's OK to either flush to 0 or return denormal result if the device
does not support denormals. See sec 7.2 and 7.5.3 of OCL specs
Fixes CTS on carrizo and turks.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>

llvm-svn: 330205
2018-04-17 19:35:28 +00:00
Jan Vesely 8fa100dfe3 amdgcn/fmin: Fix typos that reduced precision
Not sure how these sneaked in.
Fixes fminD and few other tests(fractD, cosD) on carrizo
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>

llvm-svn: 330198
2018-04-17 18:11:29 +00:00
Jan Vesely 15c388cd79 exp10: Port from amd builtins
Passes CTS on carrizo and turks.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed and Tested (on RX 580) by: Aaron Watry <awatry@gmail.com>

llvm-svn: 330197
2018-04-17 18:08:08 +00:00
Jan Vesely 4be0339023 hypot: Port from amd builtins
v2: Fix whitespace errors

Use only subnormal path.
Passes CTS on carrizo and turks.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>

llvm-svn: 329647
2018-04-10 00:11:58 +00:00
Jan Vesely 4c1112612c select: simplify implementation and fix fp16
Fix half precision implementation
Vector ?: operator should behave exactly as select
Passes CTS on carrizo

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
llvm-svn: 329462
2018-04-06 22:00:00 +00:00
Jan Vesely 93af966747 fmod: Port from amd_builtins
Uses only denormal path for fp32.
Passes CTS on carrizo and turks.

v2: whitespace fix

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewer: Aaron Watry <awatry@gmail.com>
llvm-svn: 329433
2018-04-06 17:43:08 +00:00
Jan Vesely 92357a2336 r600: Update datalayout after LLVM r328656
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 329291
2018-04-05 14:47:57 +00:00
Jan Vesely fd11db19c2 amdgcn: Update datalayout after LLVM r328656
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 329290
2018-04-05 14:47:44 +00:00
Jan Vesely 5b10494fa8 remainder: Port from amd builtins
Mostly ported from amd_builtins, uses only denormal path for fp32.
Passes CTS on carrizo and turks

Reviewer: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 327818
2018-03-19 01:01:10 +00:00
Jan Vesely b672f7a251 nan: Implement
Passes CTS on carrizo and turks

Reviewer: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 327324
2018-03-12 19:46:52 +00:00
Jan Vesely 08c96acb27 travis: Add build using llvm-6
Acked-by: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 327323
2018-03-12 19:46:48 +00:00
Jan Vesely f96b1b88f8 amdgcn/fmax: fcanonicalize operands
v_max instruction needs canonicalized operands.
Passes CTS on carrizo

Reviewer: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 327076
2018-03-08 23:01:01 +00:00