summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers/bmiintrin.h
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Always define the tzcnt intrinsics even when _MSC_VER is defined.Craig Topper2019-10-111-83/+92
| | | | | | | | | | | | These intrinsics use llvm.cttz intrinsics so are always available even without the bmi feature. We already don't check for the bmi feature on the intrinsics themselves. But we were blocking the include of the header file with _MSC_VER unless BMI was enabled on the command line. Fixes PR30506. llvm-svn: 374516
* Move the builtin headers to use the new license file header.Chandler Carruth2019-04-081-17/+3
| | | | | | | | | | | | | | | | | | Summary: These all had somewhat custom file headers with different text from the ones I searched for previously, and so I missed them. Thanks to Hal and Kristina and others who prompted me to fix this, and sorry it took so long. Reviewers: hfinkel Subscribers: mcrosier, javed.absar, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60406 llvm-svn: 357941
* [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef ↵Craig Topper2018-09-261-5/+5
| | | | | | | | | | | | flag set to false. Previously we used a select and the zero_undef=true intrinsic. In -O2 this pattern will get optimized to zero_undef=false. But in -O0 this optimization won't happen. This results in a compare and cmov being wrapped around a tzcnt/lzcnt instruction. By using the zero_undef=false intrinsic directly without the select, we can improve the -O0 codegen to just an lzcnt/tzcnt instruction. Differential Revision: https://reviews.llvm.org/D52392 llvm-svn: 343126
* [DOXYGEN] Formatting changes for better intrinsics documentation renderingEkaterina Romanova2018-05-231-0/+4
| | | | | | | | (1) I added some \see cross-references to a few select intrinsics that are related (and have the same or similar semantics). (2) pmmintrin.h, smmintrin.h, xmmintrin.h have very few minor formatting changes. They make rendering of our intrinsics documentation better. llvm-svn: 333065
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-17/+17
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* [DOXYGEN] Corrected typos and incorrect parameters description.Ekaterina Romanova2017-07-121-1/+1
| | | | | | | | | | Corrected several typos and incorrect parameters description that Sony 's techinical writer found during review. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 307838
* [DOXYGEN] Corrected several typos and incorrect parameters description that ↵Ekaterina Romanova2017-06-061-4/+4
| | | | | | | | | Sony's techinical writer found during review. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 304840
* [DOXYGEN] Minor improvements in doxygen comments.Ekaterina Romanova2017-04-281-166/+0
| | | | | | | | | | | | - I removed doxygen comments for the intrinsics that "alias" the other existing documented intrinsics and that only sligtly differ in spelling (single underscores vs. double underscores). #define _tzcnt_u16(a) (__tzcnt_u16((a))) It will be very hard to keep the documentation for these "aliases" in sync with the documentation for the intrinsics they alias to. Out of sync documentation will be more confusing than no documentation. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 301652
* [DOXYGEN] Improved doxygen comments for x86 intrinsics.Ekaterina Romanova2016-12-271-4/+4
| | | | | | | | | | 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. llvm-svn: 290561
* [DOXYGEN] Improved doxygen comments for x86 intrinsics headers.Ekaterina Romanova2016-12-091-28/+28
| | | | | | | | | 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. llvm-svn: 289249
* [Clang][bmi][intrinsics] Adding _mm_tzcnt_64 _mm_tzcnt_32 intrinsics to clang.Michael Zuckerman2016-06-221-0/+32
| | | | | | Differential Revision: http://reviews.llvm.org/D21373 llvm-svn: 273401
* Doxygen comments for avxintrin.h.Ekaterina Romanova2016-05-161-1/+1
| | | | | | | | | | | | | | | Added doxygen comments to avxintrin.h's intrinsics. As of now, only around 50% of the intrinsics in this file are documented here. The patches for the other half will be sent out later. Updated bmiintrin.h to fix an incorrect section name. Updated f16cintrin.h to fix incorect parameter names. The doxygen comments are automatically generated based on Sony's intrinsics document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 269718
* Add doxygen comments to bmiintrin.h's intrinsics.Ekaterina Romanova2016-03-081-0/+361
| | | | | | | | The doxygen comments are automatically generated based on Sony's intrinsics document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 262895
* bmiintrin.h: Allow using the tzcnt intrinsics for non-BMI targetsHans Wennborg2015-11-171-3/+9
| | | | | | | | | | | | The tzcnt intrinsics are used non non-BMI targets by code (e.g. ffmpeg) that uses it as a potentially faster BSF. The TZCNT instruction is special in that it's encoded in a backward-compatible way and behaves as BSF on non-BMI targets. Differential Revision: http://reviews.llvm.org/D14748 llvm-svn: 253358
* [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTRMichael Kuperstein2015-06-301-17/+17
| | | | llvm-svn: 241065
* Update the intel intrinsic headers to use the target attribute support.Eric Christopher2015-06-171-5/+1
| | | | | | | | | | | | | | | | | | | This involved removing the conditional inclusion and replacing them with target attributes matching the original conditional inclusion and checks. The testcase update removes the macro checks for each file and replaces them with usage of the __target__ attribute, e.g.: int __attribute__((__target__(("sse3")))) foo(int a) { _mm_mwait(0, 0); return 4; } This usage does require the enclosing function have the requisite __target__ attribute for inlining and code generation - also for any macro intrinsic uses in the enclosing function. There's no change for existing uses of the intrinsic headers. llvm-svn: 239883
* Use a define for per-file function attributes for the Intel intrinsic headers.Eric Christopher2015-06-171-15/+20
| | | | | | | This is a precursor to changing them to use the new target attribute code. llvm-svn: 239882
* Avoid undefined behavior in the x86 bmi header file by explicitly checking ↵Craig Topper2014-11-011-3/+3
| | | | | | for 0 before calling __builtin_ctz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.cttz with defined zero behavior. llvm-svn: 221065
* added Intel's BMI intrinsic variants Sanjay Patel2014-05-281-1/+34
| | | | | | (fixes PR19431 - http://llvm.org/bugs/show_bug.cgi?id=19431) llvm-svn: 209769
* Rename tzcnt intrinsics to match gcc.Craig Topper2012-07-021-3/+3
| | | | llvm-svn: 159515
* Add the rest of the BMI intrinsics.Craig Topper2011-12-251-0/+60
| | | | llvm-svn: 147265
* Add intrinsics for lzcnt and tzcnt instructions.Craig Topper2011-12-251-0/+55
llvm-svn: 147263
OpenPOWER on IntegriCloud