Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@273044 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This is now handled by clang
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@273043 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@273042 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Fixes fdim piglit on Turks
v2: use CL fmax instead of __builtin
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@269807 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The scalar float/double function bodies are a direct copy/paste,
aside from the removed (optional) code in float function body that
requires subnormals.
reviewers: jvesely
Patch by: Vedran Miletić <rivanvx@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@268766 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Based on the amd-builtin, but explicitly vectorized for all sizes (not just
float4), and includes a vectorized double implementation.
Passes piglit (float) tests on pitcairn.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@268708 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This function has been removed from LLVM.
Patch By: Laurent Carlier
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@266430 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D18284
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@265713 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@264949 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@261714 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The scalar float/double function bodies are a direct copy/paste
with usage of the CLC wrappers to vectorize them.
This commit also adds in the FP_ILOGB0 and FP_ILOGBNAN macros which are
equal to the results of ilogb(0.0f) and ilogb(float nan) respectively.
v2: Add FP_ILOGB0 and FP_ILOGBNAN definitions
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
v1 Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@261639 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@261043 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@261042 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@260778 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Most files remain in a common amdgpu directory.
Also switches barriers to to use convergent,
and use llvm.amdgcn.s.barrier.
This now requires 3.9/trunk to build amdgcn.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@260777 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
we require llvm 3.7
reviewer: tstellard
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@260304 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Also remove definitions if provided by clang (3.7+)
This halves the size of builtin.opt.{cedar,barts}.bc
reviewer: tstellard
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@260303 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Make cl_khr_fp64 define per-device.
This patch does not change the generated Makefile (for llvm 3.6, 3.7)
v2: Make the device defines per LLVM version, 'all' for all versions
reviewer: tstellard
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@260302 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
reviewer: tstellard
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@260301 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The float implementation is almost a direct port from the amd-builtins,
but instead of just having a scalar and float4 implementation, it has
a scalar and arbitrary width vector implementation.
The double scalar is also a direct port from AMD's builtin release.
The double vector implementation copies the logic in the float vector
implementation using the values from the double scalar version.
Both have been tested in piglit using tests sent to that project's
mailing list.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@260114 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
V2: use the reference implementation as suggested by Matt Arsenault
Patch By: Pavel Ondračka
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@258933 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by: Pavel Ondračka
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@258932 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@255663 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by: Vedran Mileti
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@255662 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The spec says (section 6.12.3, CL version 1.2):
The macro names given in the following list must use the values
specified. The values shall all be constant expressions suitable
for use in #if preprocessing directives.
This commit addresses the second part of that statement.
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
CC: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk>
CC: Serge Martin <edb+libclc@sigluy.net>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@249445 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This is a port from the AMD builtin library.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@248780 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by: Zoltan Gilian
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@248163 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by: Zoltan Gilian
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@248162 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by: Zoltan Gilian
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@248161 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by: Zoltan Gilian
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@248160 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Added get_image_* OpenCL builtins to the headers.
Added implementation to the r600 target.
Patch by: Zoltan Gilian
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@248159 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The values for the char/short/integer/long minimums were declared with
their actual values, not the definitions from the CL spec (v1.1). As
a result, (-2147483648) was actually being treated as a long by the
compiler, not an int, which caused issues when trying to add/subtract
that value from a vector.
Update the definitions to use the values declared by the spec, and also
add explicit casts for the char/short/int minimums so that the compiler
actually treats them as shorts/chars. Without those casts, they
actually end up stored as integers, and the compiler may end up storing
the INT_MIN as a long.
The compiler can sign extend the values if it needs to convert the
char->short, short->int, or int->long
v2: Add explicit cast for INT_MIN and fix some type-o's and wrapping
in the commit message.
Reported-by: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk>
CC: Moritz Pflanzer <moritz.pflanzer14@imperial.ac.uk>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@247661 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@245894 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@244987 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
v2: Also remove LLVM 3.6 traces from prepare-builtins.cpp
Patch by: EdB
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@244310 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
We need to use M_LOG2E instead of M_LOG2E_F.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@243132 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Use the implementation was ported from the AMD builtin library rather
than LLVM Intrinsics.
This has been tested with piglit, OpenCV, and the ocl conformance tests.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@243131 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@243130 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
v2:
- Use same implementation for R600 and gcn.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@241907 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Passing values less than 0 to the llvm.sqrt() intrinsic results in
undefined behavior, so we need to check the input and return NaN if
is is less than 0.
v2:
- Fix build failures.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@241906 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by: Tomasz Borowik
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@241905 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@240881 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@240552 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Using exp2(x * M_LOG2E_F) does not give us accurate enough results for
OpenCL. If you look at the new exp implementation you'll see that
it does multiply the input by M_LOG2E_F, but it still uses the original
input in part of the calculation.
This exp implementation was ported from the AMD builtin library
and has been tested with piglit, OpenCV, and the ocl conformance tests.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@237229 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Not all targets support the intrinsic, so it's better to have a
generic implementation which does not use it.
This exp2 implementation was ported from the AMD builtin library
and has been tested with piglit, OpenCV, and the ocl conformance tests.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@237228 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This implementation was ported from the AMD builtin library
and has been tested with piglit, OpenCV, and the ocl conformance tests.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@237155 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This implementation was ported from the AMD builtin library
and has been tested with piglit, OpenCV, and the ocl conformance tests.
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@237154 91177308-0d34-0410-b5e6-96231b3b80d8
|