Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
R600 probably doesn't support v2/v3 stores and chokes on types that aren't
32-bits in size.
These caveats could/should change in the future. For now, the
non-optimized implementations for other sizes/types are left intact.
|
|
|
|
|
|
R600 doesn't seem to support v2/v3 loads, doesn't support constant address
space well currently, and chokes on types that aren't 32-bits in size.
All of those caveats could/should change in the future. For now, the
non-optimized implementations for other sizes/types are left intact.
|
|
It creates a bunch of extra instructions in the assembly that may not get
optimized out.
|
|
Conflicts:
generic/include/clc/clc.h
generic/lib/SOURCES
generic/lib/shared/clamp.inc
|
|
|
|
Squashed commit of the following:
commit a0df0a0e86c55c1bdc0b9c0f5a739e5adef4b056
Author: Aaron Watry <awatry@gmail.com>
Date: Mon Apr 15 18:42:04 2013 -0500
libclc: Rename clz.ll to clz_if.ll to ensure it gets built.
configure.py treats files that have the same name with the .cl and .ll
extensions as overriding eachother.
E.g. If you have clz.cl and clz.ll both specified to be built in the same
SOURCES file, only the first file listed will actually be built.
Since the contents of clz.ll were an interface that is implemented in
clz_impl.ll, rename clz.ll to clz_if.ll to make sure that the interface is
built.
commit 931b62bed05c58f737de625bd415af09571a6a5a
Author: Aaron Watry <awatry@gmail.com>
Date: Sat Apr 13 12:32:54 2013 -0500
libclc: llvm assembly implementation of clz
Untested... currently crashes in the same manner as add_sat.
commit 6ef0b7b0b6d2e5584086b4b9a9243743b2e0538f
Author: Aaron Watry <awatry@gmail.com>
Date: Sat Mar 23 12:35:27 2013 -0500
libclc: Add stub clz builtin
For scalar int/uint, attempt to use the clz llvm builtin.. for all others
return 0 until an actual implementation is finished.
|
|
For any GENTYPE that isn't scalar, we need to implement a mixed
vector/scalar version of clamp/max.
This depends on the min() patches I sent to the list a few minutes ago.
|
|
Checks if the current GENTYPE is scalar, and if not, then defines a separate
implementation of the function which casts the second arg to vector before
proceeding.
|
|
This doesn't handle the integer cases for min(vector, scalar).
|
|
configure.py allows overloading *.cl with *.ll, but will only ever build
the first file listed in SOURCES of ${file}.cl and ${file}.ll
add_sat, sub_sat, (and the soon to be submitted clz) all define interfaces in
${function_name}.ll which are implemented in ${function_name}_impl.ll.
Renaming the interface files is enough to get them to build again, fixing
CL usage of these functions.
Tested on clover/r600g.
|
|
Caveats:
1) Does NOT implement half operations.
2) Assumes that cl_khr_byte_addressable_store is available for the char/short
store operations.
|
|
|
|
Everything except for halfN is implemented
|
|
|
|
The spec requires the first 2 inputs to be within the bounds of a 24-bit
integer's possible values. If they're not, then results are implementation
defined.
|
|
|
|
|
|
Conflicts:
generic/include/clc/clc.h
generic/include/clc/integer/gentype.inc
generic/lib/SOURCES
generic/lib/integer/rotate.inc
|
|
configure.py allows overloading *.cl with *.ll, but will only ever build
the first file listed in SOURCES of ${file}.cl and ${file}.ll
add_sat, sub_sat, (and the soon to be submitted clz) all define interfaces in
${function_name}.ll which are implemented in ${function_name}_impl.ll.
Renaming the interface files is enough to get them to build again, fixing
CL usage of these functions.
Tested on clover/r600g.
|
|
configure.py treats files that have the same name with the .cl and .ll
extensions as overriding eachother.
E.g. If you have clz.cl and clz.ll both specified to be built in the same
SOURCES file, only the first file listed will actually be built.
Since the contents of clz.ll were an interface that is implemented in
clz_impl.ll, rename clz.ll to clz_if.ll to make sure that the interface is
built.
|
|
Untested... currently crashes in the same manner as add_sat.
|
|
For any GENTYPE that isn't scalar, we need to implement a mixed
vector/scalar version of clamp/max.
This depends on the min() patches I sent to the list a few minutes ago.
|
|
|
|
Checks if the current GENTYPE is scalar, and if not, then defines a separate
implementation of the function which casts the second arg to vector before
proceeding.
|
|
|
|
This doesn't handle the integer cases for min(vector, scalar).
|
|
LLVM moved a bunch of IR-related headers for version 3.3.
This fixes the libclc build to follow suit.
|
|
|
|
|
|
Much more understandable/readable as a result, and probably more efficient.
|
|
This implementation does a lot of bit shifting and masking. Suffice to say,
this is somewhat suboptimal... but it does look to produce correct results
(after the piglit tests were corrected for sign extension issues).
Someone who knows LLVM better than I could re-write this more efficiently.
|
|
Max(x,y) is available for all integer/floating types.
|
|
Created under a new shared/ directory for functions which are available for
both integer and floating point types.
|
|
|
|
Adds this function for both int and floating data types.
|
|
|
|
|
|
|
|
Much more understandable/readable as a result, and probably more efficient.
|
|
For scalar int/uint, attempt to use the clz llvm builtin.. for all others
return 0 until an actual implementation is finished.
|
|
This implementation does a lot of bit shifting and masking. Suffice to say,
this is somewhat suboptimal... but it does look to produce correct results
(after the piglit tests were corrected for sign extension issues).
Someone who knows LLVM better than I could re-write this more efficiently.
|
|
Max(x,y) is available for all integer/floating types.
|
|
Created under a new shared/ directory for functions which are available for
both integer and floating point types.
|
|
|
|
Adds this function for both int and floating data types.
|
|
From: Tom Stellard <thomas.stellard at amd.com>
|