- Apr 02, 2020
-
-
Matt Arsenault authored
-
- Mar 28, 2020
-
-
Yaxun (Sam) Liu authored
The main purpose of introducing these builtins is to add a range metadata [1, 1025) on the work group size loaded from dispatch ptr, which cannot be done by source code. Differential Revision: https://reviews.llvm.org/D76772
-
- Mar 25, 2020
-
-
Erich Keane authored
@Anastasia made a pair of comments on D75685 after it was committed requesting changes to the test. This patch updates the test based on her comments.
-
Erich Keane authored
SPIRV2.0 Spec only specifies Linux mangling, however our downstream has use for a Windows mangling for these types. Unfortunately, the SPIRV spec specifies a single mangling for all pipe types, despite clang allowing overloading on these types. Because of this, this patch chooses to mangle the read/writability and element type for the windows mangling. The windows manglings in the test all demangle according to demangler: "void __cdecl test1(struct __clang::ocl_pipe<int,1>) "void __cdecl test2(struct __clang::ocl_pipe<float,0>) "void __cdecl test2(struct __clang::ocl_pipe<int,1>) "void __cdecl test3(struct __clang::ocl_pipe<int const,1>) "void __cdecl test4(struct __clang::ocl_pipe<union __clang::__vector<unsigned char,3>,1>) "void __cdecl test5(struct __clang::ocl_pipe<union __clang::__vector<int,4>,1>) "void __cdecl test_reserved_read_pipe(struct __clang::_ASCLglobal<struct Person > * __ptr64,struct __clang::ocl_pipe<struct Person,1>) Differential Revision: https://reviews.llvm.org/D75685
-
- Mar 24, 2020
-
-
Erik Pilkington authored
This fixes a miscompile when the parameter is actually underaligned. rdar://58316406 Differential revision: https://reviews.llvm.org/D74183
-
- Mar 23, 2020
-
-
Matt Arsenault authored
These are equivalent. The generic rotate builtins do not directly map to the fshr intrinsic.
-
- Mar 09, 2020
-
-
Sjoerd Meijer authored
After a first attempt to fix the test-suite failures, my first recommit caused the same failures again. I had updated CMakeList.txt files of tests that needed -fcommon, but it turns out that there are also Makefiles which are used by some bots, so I've updated these Makefiles now too. See the original commit message for more details on this change: 0a9fc923
-
Sjoerd Meijer authored
This reverts commit 2c36c23f. Still problems in the test-suite, which I really thought I had fixed...
-
Sjoerd Meijer authored
This includes fixes for: - test-suite: some benchmarks need to be compiled with -fcommon, see D75557. - compiler-rt: one test needed -fcommon, and another a change, see D75520.
-
- Mar 06, 2020
-
-
Matt Arsenault authored
This reverts commit 737394c4. The fp-model test was failing on platforms that enable denormal flushing based on -ffast-math. This needs to reset to IEEE, not the default in these cases. Change-Id: Ibbad32f66d0d0b89b9c1173a3a96fb1a570ddd89
-
- Mar 05, 2020
-
-
Jeremy Morse authored
This reverts commit c64ca930. This patch tripped a few build bots: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/24703/ http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/13465/ http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/15994/ Reverting to clear the bots.
-
Matt Arsenault authored
The IR hasn't switched the default yet, so explicitly add the ieee attributes. I'm still not really sure how the target default denormal mode should interact with -fno-unsafe-math-optimizations. The target may have selected the default mode to be non-IEEE based on the flags or based on its true behavior, but we don't know which is the case. Since the only users of a non-IEEE mode without a flag still support IEEE mode, just reset to IEEE.
-
- Mar 03, 2020
-
-
Sjoerd Meijer authored
This reverts commit 0a9fc923. Going to look at the asan failures. I find the failures in the test suite weird, because they look like compile time test and I don't understand how that can be failing, but will have a brief look at that too.
-
Sjoerd Meijer authored
This makes -fno-common the default for all targets because this has performance and code-size benefits and is more language conforming for C code. Additionally, GCC10 also defaults to -fno-common and so we get consistent behaviour with GCC. With this change, C code that uses tentative definitions as definitions of a variable in multiple translation units will trigger multiple-definition linker errors. Generally, this occurs when the use of the extern keyword is neglected in the declaration of a variable in a header file. In some cases, no specific translation unit provides a definition of the variable. The previous behavior can be restored by specifying -fcommon. As GCC has switched already, we benefit from applications already being ported and existing documentation how to do this. For example: - https://gcc.gnu.org/gcc-10/porting_to.html - https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common Differential revision: https://reviews.llvm.org/D75056
-
- Feb 25, 2020
-
-
Yaxun (Sam) Liu authored
Differential Revision: https://reviews.llvm.org/D75028
-
- Feb 17, 2020
-
-
Yaxun (Sam) Liu authored
norecurse function attr indicates the function is not called recursively directly or indirectly. Add norecurse to OpenCL functions, SYCL functions in device compilation and CUDA/HIP kernels. Although there is LLVM pass adding norecurse to functions, it only works for whole-program compilation. Also FE adding norecurse can make that pass run faster since functions with norecurse do not need to be checked again. Differential Revision: https://reviews.llvm.org/D73651
-
- Jan 28, 2020
-
-
Konstantin Pyzhov authored
Corrected clang amdgpu-features.cl test for 6d614a82 (AMDGPU MFMA built-ins) Differential Revision: https://reviews.llvm.org/D72723
-
Konstantin Pyzhov authored
Differential Revision: https://reviews.llvm.org/D72723
-
Konstantin Pyzhov authored
This CL adds clang declarations of built-in functions for AMDGPU MFMA intrinsics and instructions. OpenCL tests for new built-ins are included. Differential Revision: https://reviews.llvm.org/D72723
-
- Jan 18, 2020
-
-
Matt Arsenault authored
Currently there are 4 different mechanisms for controlling denormal flushing behavior, and about as many equivalent frontend controls. - AMDGPU uses the fp32-denormals and fp64-f16-denormals subtarget features - NVPTX uses the nvptx-f32ftz attribute - ARM directly uses the denormal-fp-math attribute - Other targets indirectly use denormal-fp-math in one DAGCombine - cl-denorms-are-zero has a corresponding denorms-are-zero attribute AMDGPU wants a distinct control for f32 flushing from f16/f64, and as far as I can tell the same is true for NVPTX (based on the attribute name). Work on consolidating these into the denormal-fp-math attribute, and a new type specific denormal-fp-math-f32 variant. Only ARM seems to support the two different flush modes, so this is overkill for the other use cases. Ideally we would error on the unsupported positive-zero mode on other targets from somewhere. Move the logic for selecting the flush mode into the compiler driver, instead of handling it in cc1. denormal-fp-math/denormal-fp-math-f32 are now both cc1 flags, but denormal-fp-math-f32 is not yet exposed as a user flag. -cl-denorms-are-zero, -fcuda-flush-denormals-to-zero and -fno-cuda-flush-denormals-to-zero will be mapped to -fp-denormal-math-f32=ieee or preserve-sign rather than the old attributes. Stop emitting the denorms-are-zero attribute for the OpenCL flag. It has no in-tree users. The meaning would also be target dependent, such as the AMDGPU choice to treat this as only meaning allow flushing of f32 and not f16 or f64. The naming is also potentially confusing, since DAZ in other contexts refers to instructions implicitly treating input denormals as zero, not necessarily flushing output denormals to zero. This also does not attempt to change the behavior for the current attribute. The LangRef now states that the default is ieee behavior, but this is inaccurate for the current implementation. The clang handling is slightly hacky to avoid touching the existing denormal-fp-math uses. Fixing this will be left for a future patch. AMDGPU is still using the subtarget feature to control the denormal mode, but the new attribute are now emitted. A future change will switch this and remove the subtarget features.
-
- Jan 17, 2020
-
-
Matt Arsenault authored
-
- Dec 03, 2019
-
-
Sven van Haastregt authored
Commit 9a8d477a ("[OpenCL] Add builtin function attribute handling", 2019-11-05) stopped Clang from mangling single-overload builtins, which is incorrect.
-
- Nov 05, 2019
-
-
Sven van Haastregt authored
Add handling for the "pure", "const" and "convergent" function attributes for OpenCL builtin functions. Patch by Pierre Gondois and Sven van Haastregt. Differential Revision: https://reviews.llvm.org/D64319
-
- Sep 05, 2019
-
-
Matt Arsenault authored
llvm-svn: 371010
-
- Aug 27, 2019
-
-
Matt Arsenault authored
The backend default maximum should be the hardware maximum, so the frontend should set the implementation defined default maximum. llvm-svn: 370101
-
- Aug 06, 2019
-
-
Matt Arsenault authored
The implementation of the OpenCL builtin currently library uses 2 different hacks to get to the corresponding IR intrinsics from the source. This will allow removal of those. This is the set that is currently used (minus a few vector ones). llvm-svn: 367973
-
- Aug 05, 2019
-
-
Anastasia Stulova authored
Avoid checking alignment unnecessary that is not portable among targets. llvm-svn: 367823
-
- Aug 03, 2019
-
-
Tim Northover authored
For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
-
- Aug 02, 2019
-
-
Anastasia Stulova authored
Allow creating vector literals from other vectors. float4 a = (float4)(1.0f, 2.0f, 3.0f, 4.0f); float4 v = (float4)(a.s23, a.s01); Differential revision: https://reviews.llvm.org/D65286 llvm-svn: 367675
-
- Jul 31, 2019
-
-
Matt Arsenault authored
llvm-svn: 367431
-
- Jul 25, 2019
-
-
Anastasia Stulova authored
Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++ or -std=clc++/-std=CLC++. This aligns with OpenCL C conversion and removes ambiguity with OpenCL C++. Differential Revision: https://reviews.llvm.org/D65102 llvm-svn: 367008
-
- Jul 22, 2019
-
-
Christudasan Devadasan authored
Modified the intrinsics int_addressofreturnaddress, int_frameaddress & int_sponentry. This commit depends on the changes in rL366679 Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D64563 llvm-svn: 366683
-
- Jul 17, 2019
-
-
Matt Arsenault authored
llvm-svn: 366286
-
- Jul 16, 2019
-
-
Neil Hickey authored
Allow conversions between integer and sampler type. Differential Revision: https://reviews.llvm.org/D64791 llvm-svn: 366212
-
- Jul 10, 2019
-
-
Vyacheslav Zakharin authored
Differential Revision: https://reviews.llvm.org/D63846 llvm-svn: 365666
-
Christudasan Devadasan authored
To enable a new implicit kernel argument, increased the number of argument bytes from 48 to 56. Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D63756 llvm-svn: 365643
-
- Jul 09, 2019
-
-
Reid Kleckner authored
Certain OpenCL constructs cannot yet be mangled in the MS C++ ABI. Add a FIXME for it if anyone cares to implement it. llvm-svn: 365557
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D64430 llvm-svn: 365528
-
Marco Antognini authored
This patch ensures built-in functions are rewritten using the proper parent declaration. Existing tests are modified to run in C++ mode to ensure the functionality works also with C++ for OpenCL while not increasing the testing runtime. llvm-svn: 365499
-
- Jul 08, 2019
-
-
Brian Homerding authored
The revision at https://reviews.llvm.org/rL365336 added inference of the nofree attribute. This revision updates the test to reflect this. Differential Revision: https://reviews.llvm.org/D49165 llvm-svn: 365341
-