summaryrefslogtreecommitdiffstats
path: root/lib/Headers
Commit message (Collapse)AuthorAgeFilesLines
...
* Added doxygen comments to smmintrin.h's intrinsics.Ekaterina Romanova2017-02-172-1/+2012
| | | | | | | | | | | | | Note: The doxygen comments are automatically generated based on Sony's intrinsic s document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295404 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Correct ndrange_t implementationAnastasia Stulova2017-02-161-4/+0
| | | | | | | | | | | | | | | | Removed ndrange_t as Clang builtin type and added as a struct type in the OpenCL header. Use type name to do the Sema checking in enqueue_kernel and modify IR generation accordingly. Review: D28058 Patch by Dmitry Borisenkov! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295311 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX-512] Replace 512-bit masked packss/packus builtins and replace with new ↵Craig Topper2017-02-161-64/+40
| | | | | | | | unmasked builtins. These new unmasked builtins will enable us to easily support optimizing these builtins in InstCombine in the backend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295291 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some warnings in intrin.hReid Kleckner2017-02-141-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295082 91177308-0d34-0410-b5e6-96231b3b80d8
* [MS] Implement the __fastfail intrinsic as a builtinReid Kleckner2017-02-091-1/+0
| | | | | | | | | | __fastfail terminates the process immediately with a special system call. It does not run any process shutdown code or exception recovery logic. Fixes PR31854 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294606 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Clzero flag addition and inclusion under znver1Craig Topper2017-02-094-0/+56
| | | | | | | | | | | | | 1. Adds the command line flag for clzero. 2. Includes the clzero flag under znver1. 3. Defines the macro for clzero. 4. Adds a new file which has the intrinsic definition for clzero instruction. Patch by Ganesh Gopalasubramanian with some additional tests from me. Differential revision: https://reviews.llvm.org/D29386 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294559 91177308-0d34-0410-b5e6-96231b3b80d8
* Doxygen comments for prfchwintrin.hEkaterina Romanova2017-02-011-0/+24
| | | | | | | | | | | | | | | | Added doxygen comments to prfchwintrin.h's intrinsics. Note: The doxygen comments are automatically generated based on Sony's intrinsic s document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293745 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Diagnose write_only image3d when extension is disabledAnastasia Stulova2017-01-251-0/+34
| | | | | | | | | | | | | | | | | Prior to OpenCL 2.0, image3d_t can only be used with the write_only access qualifier when the cl_khr_3d_image_writes extension is enabled, see e.g. OpenCL 1.1 s6.8b. Require the extension for write_only image3d_t types and guard uses of write_only image3d_t in the OpenCL header. Patch by Sven van Haastregt! Review: https://reviews.llvm.org/D28860 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293050 91177308-0d34-0410-b5e6-96231b3b80d8
* Guard __gnuc_va_list typedef.Paul Robinson2017-01-231-2/+1
| | | | | | | Differential Revision: http://reviews.llvm.org/D28620 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292819 91177308-0d34-0410-b5e6-96231b3b80d8
* [Altivec] Change vec_sl to a << (b % (sizeof(a) * 8))Tim Shen2017-01-201-19/+25
| | | | | | | | | | | | | | | | | For a << b (as original vec_sl does), if b >= sizeof(a) * 8, the behavior is undefined. However, Power instructions do define the behavior, which is equivalent to a << (b % (sizeof(a) * 8)). This patch changes altivec.h to use a << (b % (sizeof(a) * 8)), to ensure the consistent semantic of the instructions. Then it combines the generated multiple instructions back to a single shift. This patch handles left shift only. Right shift, on the other hand, is more complicated, considering arithematic/logical right shift. Differential Revision: https://reviews.llvm.org/D28037 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292659 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX-512] Replace subvector broadcast builtins with shufflevectors and selects.Craig Topper2017-01-184-151/+133
| | | | | | Verified that the backend codegens this equally well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292329 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Documentation for the newly added x86 intrinsics.Ekaterina Romanova2017-01-135-12/+64
| | | | | | | | | | | | | | | | | Added doxygen comments for the newly added intrinsics in avxintrin.h, namely _mm256_cvtsd_f64, _mm256_cvtsi256_si32 and _mm256_cvtss_f32 Added doxygen comments for the new intrinsics in emmintrin.h, namely _mm_loadu_si64 and _mm_load_sd. Explicit parameter names were added for _mm_clflush and _mm_setcsr The rest of the changes are editorial, removing trailing spaces at the end of the lines. Differential Revision: https://reviews.llvm.org/D28503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291876 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Fix the wrong implementation of builtin vec_rlnm.Tony Jiang2017-01-111-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291702 91177308-0d34-0410-b5e6-96231b3b80d8
* Add vec_insert4b and vec_extract4b functions to altivec.hSean Fertile2017-01-051-0/+3
| | | | | | | | | Add builtins for the functions and custom codegen mapping the builtins to their corresponding intrinsics and handling the endian related swapping. https://reviews.llvm.org/D26546 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291179 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Rename keywords used in macro so they don't conflict with MSVC.Justin Lebar2017-01-051-21/+21
| | | | | | | | | | | | | | Summary: MSVC seems to use "__in" and "__out" for its own purposes, so we have to pick different names in this macro. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28325 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291138 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Don't define functions that the CUDA headers themselves define on ↵Justin Lebar2017-01-051-2/+8
| | | | | | | | | | | | Windows. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28324 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291137 91177308-0d34-0410-b5e6-96231b3b80d8
* [Windows] Remove functions in intrin.h that are defined in Builtin.def.Justin Lebar2017-01-051-90/+0
| | | | | | | | | | | | | | | | | | | | Summary: These duplicate declarations cause a problem for CUDA compiles on Windows. All implicitly-defined functions are host+device, and this applies to the declarations in Builtin.def. But then when we see the declarations in intrin.h, they have no attributes, so are host-only functions. This is an error. (A better fix might be to make these builtins host-only, but that is a much bigger change.) Reviewers: rnk Subscribers: cfe-commits, echristo Differential Revision: https://reviews.llvm.org/D28317 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291128 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Pre-include sm_60 and sm_61 headers.Artem Belevich2017-01-041-0/+5
| | | | | | | | | CUDA-8.0 comes with new headers which nvcc pre-includes via cuda_runtime.h Clang now makes them available as well. Differential Revision: https://reviews.llvm.org/D28301 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290982 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments for xmmintrin.h intrinsics.Ekaterina Romanova2016-12-271-105/+171
| | | | | | | | | | Added \n commands to insert a line breaks where necessary, since one long line of documentation is nearly unreadable. Formatted comments to fit into 80 chars. In some cases added \a command in front of the parameter names to display them in italics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290619 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX-512] Replace masked 512-bit pmuldq and pmuludq builtins with the newly ↵Craig Topper2016-12-271-30/+18
| | | | | | added unmasked versions and selects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290580 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r290574 "foo"Craig Topper2016-12-271-18/+30
| | | | | | This was supposed to be merged with another commit with a real commit message. Sorry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290579 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r290575 "[AVX-512] Replace masked 512-bit pmuldq and pmuludq builtins ↵Craig Topper2016-12-271-4/+4
| | | | | | | | with the newly added unmasked versions and selects." I failed to merge this with r290574. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290578 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX-512] Replace masked 512-bit pmuldq and pmuludq builtins with the newly ↵Craig Topper2016-12-271-4/+4
| | | | | | added unmasked versions and selects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290575 91177308-0d34-0410-b5e6-96231b3b80d8
* fooCraig Topper2016-12-271-30/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290574 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments for x86 intrinsics.Ekaterina Romanova2016-12-278-203/+217
| | | | | | | | | | | | | | Improved doxygen comments for the following intrinsics headers: __wmmintrin_pclmul.h, bmiintrin.h, emmintrin.h, f16cintrin.h, immintrin.h, mmintrin.h, pmmintrin.h, tmmintrin.h Added \n commands to insert a line breaks where necessary, since one long line of documentation is nearly unreadable. Formatted comments to fit into 80 chars. In some cases added \a command in front of the parameter names to display them in italics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290561 91177308-0d34-0410-b5e6-96231b3b80d8
* [inline-asm]No error for conflict between inputs\outputs and clobber listMarina Yatsina2016-12-261-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to extended asm syntax, a case where the clobber list includes a variable from the inputs or outputs should be an error - conflict. for example: const long double a = 0.0; int main() { char b; double t1 = a; __asm__ ("fucompp": "=a" (b) : "u" (t1), "t" (t1) : "cc", "st", "st(1)"); return 0; } This should conflict with the output - t1 which is st, and st which is st aswell. The patch fixes it. Commit on behald of Ziv Izhar. Differential Revision: https://reviews.llvm.org/D15075 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290539 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments for tmmintrin.h intrinsics.Ekaterina Romanova2016-12-231-605/+606
| | | | | | | | | Added \n commands to insert a line breaks where necessary to make the documentation more readable. Formatted comments to fit into 80 chars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290458 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments for tmmintrin.h intrinsics.Ekaterina Romanova2016-12-231-14/+14
| | | | | | | | | | Tagged parameter names with \a doxygen command to display parameters in italics. Added \n commands to insert a line break to make the documentation more readable. Formatted comments to fit into 80 chars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290455 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r289979 [OpenCL] Allow disabling types and declarations associated ↵Yaxun Liu2016-12-181-0/+4
| | | | | | | | | with extensions Fixed undefined behavior due to cast integer to bool in initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290056 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r289979 due to regressionsYaxun Liu2016-12-161-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289991 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Allow disabling types and declarations associated with extensionsYaxun Liu2016-12-161-0/+4
| | | | | | | | | | | | | | | | | | | Added a map to associate types and declarations with extensions. Refactored existing diagnostic for disabled types associated with extensions and extended it to declarations for generic situation. Fixed some bugs for types associated with extensions. Allow users to use pragma to declare types and functions for supported extensions, e.g. #pragma OPENCL EXTENSION the_new_extension_name : begin // declare types and functions associated with the extension here #pragma OPENCL EXTENSION the_new_extension_name : end Differential Revision: https://reviews.llvm.org/D21698 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289979 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Headers] Add #include_next for tgmath.h on Darwin"Bruno Cardoso Lopes2016-12-121-9/+0
| | | | | | | | | Reverts r289181: it's currently breaking modules using simd.h in 10.12 SDK. This reverts commit 6e73e3464e96a4e00492c24aa790d36e1adb5702. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289487 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX-512] Remove masking from 512-bit vpermil builtins. The backend now has ↵Craig Topper2016-12-111-34/+20
| | | | | | | | versions without masking so wrap it with select. This will allow the backend to constant fold these to generic shuffle vectors like 128-bit and 256-bit without having to working about handling masking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289351 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX-512] Remove masking from 512-bit pshufb builtin. The backend now has a ↵Craig Topper2016-12-101-16/+10
| | | | | | | | version without masking so wrap it with select. This will allow the backend to constant fold these to generic shuffle vectors like 128-bit and 256-bit without having to working about handling masking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289345 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX-512] Remove 128/256-bit masked vpermilvar builtins and replace with ↵Craig Topper2016-12-101-50/+32
| | | | | | select and the avx unmasked builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289338 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments for x86 intrinsics headers.Ekaterina Romanova2016-12-0913-615/+615
| | | | | | | | | | | | Tagged instruction names with <c> INSTR_NAME </c> to display them in typewriter font. In the past, \c command was used, unfortunately it applied to only one word. <c> .. </c> has the same meaning, but applies to all words in between the tags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289249 91177308-0d34-0410-b5e6-96231b3b80d8
* [Headers] Add #include_next for tgmath.h on DarwinBruno Cardoso Lopes2016-12-091-0/+9
| | | | | | | | | Allow darwin to provide additional definitions and implementation specifc values for tgmath.h on Apple platforms. rdar://problem/19019845 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289181 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments for xmmintrin.h intrinsics.Ekaterina Romanova2016-12-081-26/+26
| | | | | | | | | | | Tagged parameter names with \a doxygen command to display parameters in italics. Formatted comments to fit into 80 chars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289159 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments.Ekaterina Romanova2016-12-082-14/+18
| | | | | | | | | | | Improved doxygen comments for fxsrintrin.h and mmintrin.h intrinsics by taagging parameter names with \a doxygen command to display parameters in italics. Formatted comments to fit into 80 chars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289154 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments for emmintrin.h intrinsics.Ekaterina Romanova2016-12-081-100/+100
| | | | | | | | | | Tagged parameter names with \a doxygen command to display parameters in italics. Formatted comments to fit into 80 chars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289116 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments.Ekaterina Romanova2016-12-082-37/+38
| | | | | | | | | | | | Improved doxygen comments for __wmmintrin_pclmul.h and ammintrin.h intrinsics by taagging parameter names with \a doxygen command to display parameters in italics. Formatted comments to fit into 80 chars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289083 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Improved doxygen comments for avxintrin.h intrinsics.Ekaterina Romanova2016-12-081-135/+142
| | | | | | | | | | Tagged parameter names with \a doxygen command to display them in italics. Formatted comments to fit into 80 chars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289022 91177308-0d34-0410-b5e6-96231b3b80d8
* [Headers] Enable #include_next<float.h> on DarwinBruno Cardoso Lopes2016-12-081-2/+5
| | | | | | | | | Allows darwin targets to provide additional definitions and implementation specifc values for float.h rdar://problem/21961491 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289018 91177308-0d34-0410-b5e6-96231b3b80d8
* [DOXYGEN] Updated instruction names corresponding to avxintrin.h intrinsics.Ekaterina Romanova2016-11-261-166/+188
| | | | | | | | | | | Documentation for some of the avxintrin.h's intrinsics errorneously said that non VEX-prefixed instructions could be generated. This was fixed. I tried several different solutions to achieve pretty printing of unordered lists (nested and non-nested) in param sections in doxygen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287990 91177308-0d34-0410-b5e6-96231b3b80d8
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-241-1/+176
| | | | | | | | | | | | | | | | | | | | | | (commit again after fixing the buildbot failures) This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287872 91177308-0d34-0410-b5e6-96231b3b80d8
* [PPC] revert r287795Ehsan Amiri2016-11-231-176/+1
| | | | | | | A test that passed locally is failing on one of the build bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287796 91177308-0d34-0410-b5e6-96231b3b80d8
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-231-1/+176
| | | | | | | | | | | | | | | | | | | | | (commit again after fixing the buildbot failures) This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287795 91177308-0d34-0410-b5e6-96231b3b80d8
* [PPC] Reverting r287772Ehsan Amiri2016-11-231-175/+1
| | | | | | | Due to buildbot failure, I revert. Will recommit after investigation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287775 91177308-0d34-0410-b5e6-96231b3b80d8
* [PPC] support for arithmetic builtins in the FEEhsan Amiri2016-11-231-1/+175
| | | | | | | | | | | | | | | | | | | | This adds various overloads of the following builtins to altivec.h: vec_neg vec_nabs vec_adde vec_addec vec_sube vec_subec vec_subc Note that for vec_sub builtins on 32 bit integers, the semantics is similar to what ISA describes for instructions like vsubecuq that work on quadwords: the first operand is added to the one's complement of the second operand. (As opposed to two's complement which I expected). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287772 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Replace valignd/q builtins with appropriate __builtin_shufflevector.Craig Topper2016-11-232-72/+90
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287733 91177308-0d34-0410-b5e6-96231b3b80d8