summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/mmx-builtins.c
Commit message (Collapse)AuthorAgeFilesLines
* [X86] NFC Include immintrin.h in CodeGen testsGabor Buella2018-05-241-1/+1
| | | | | | | Following r333110: "Move all Intel defined intrinsic includes into immintrin.h" llvm-svn: 333160
* [X86][MMX] Add tests for _mm_set*_* intrinsicsSimon Pilgrim2017-03-221-0/+87
| | | | llvm-svn: 298511
* [X86] Remove the mm_malloc.h include guard hack from the X86 builtins testsElad Cohen2016-09-281-4/+2
| | | | | | | | | | | | The X86 clang/test/CodeGen/*builtins.c tests define the mm_malloc.h include guard as a hack for avoiding its inclusion (mm_malloc.h requires a hosted environment since it expects stdlib.h to be available - which is not the case in these internal clang codegen tests). This patch removes this hack and instead passes -ffreestanding to clang cc1. Differential Revision: https://reviews.llvm.org/D24825 llvm-svn: 282581
* After PR28761 use -Wall with -Werror in builtins tests to identifyEric Christopher2016-08-041-2/+2
| | | | | | possible problems in headers. llvm-svn: 277696
* [X86] Use __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi to ↵Craig Topper2016-07-091-0/+12
| | | | | | | | implement pextrw/pinsertw MMX intrinsics instead of trying to use native IR. Without this we end up generating code that doesn't use mmx registers and probably doesn't work well with other mmx intrinsics. llvm-svn: 274968
* [X86][SSE] Tidied up MMX/SSE/SSE2 builtin tests to the correct test fileSimon Pilgrim2016-05-171-5/+5
| | | | llvm-svn: 269852
* [X86] Add missing m64/int64 conversionsMichael Kuperstein2015-12-201-0/+12
| | | | | | | | Define the 64-bit equivalents of _m_to_int and _m_from_int. Differential Revision: http://reviews.llvm.org/D15572 llvm-svn: 256122
* [X86] Stripped backend codegen testsSimon Pilgrim2015-12-031-104/+0
| | | | | | | | | | As discussed on the ml, backend tests need to be put in llvm/test/CodeGen/X86 as fast-isel tests using IR that is as close to what is generated here as possible. The llvm tests will (re)added in a future commit I will update PR24580 on this new plan llvm-svn: 254594
* [X86][MMX] Added MMX IR + assembly codegen builtin tests for some missing ↵Simon Pilgrim2015-11-151-14/+81
| | | | | | cvt intrinsics llvm-svn: 253169
* [X86][MMX] Sorted MMX IR + assembly codegen builtin testsSimon Pilgrim2015-11-141-367/+374
| | | | | | Makes it easier to track what tests are missing.... llvm-svn: 253131
* [X86][MMX] Added MMX IR + assembly codegen builtin testsSimon Pilgrim2015-11-141-196/+358
| | | | | | Improved tests as discussed in PR24580 llvm-svn: 253130
* Canonicalize some of the x86 builtin tests and either remove or commentEric Christopher2015-10-141-2/+2
| | | | | | about optimization options. llvm-svn: 250271
* Fix the SSE4 byte sign extension in a cleaner way, and more thoroughlyChandler Carruth2015-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test that our intrinsics behave the same under -fsigned-char and -funsigned-char. This further testing uncovered that AVX-2 has a broken cmpgt for 8-bit elements, and has for a long time. This is fixed in the same way as SSE4 handles the case. The other ISA extensions currently work correctly because they use specific instruction intrinsics. As soon as they are rewritten in terms of generic IR, they will need to add these special casts. I've added the necessary testing to catch this however, so we shouldn't have to chase it down again. I considered changing the core typedef to be signed, but that seems like a bad idea. Notably, it would be an ABI break if anyone is reaching into the innards of the intrinsic headers and passing __v16qi on an API boundary. I can't be completely confident that this wouldn't happen due to a macro expanding in a lambda, etc., so it seems much better to leave it alone. It also matches GCC's behavior exactly. A fun side note is that for both GCC and Clang, -funsigned-char really does change the semantics of __v16qi. To observe this, consider: % cat x.cc #include <smmintrin.h> #include <iostream> int main() { __v16qi a = { 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; __v16qi b = _mm_set1_epi8(-1); std::cout << (int)(a / b)[0] << ", " << (int)(a / b)[1] << '\n'; } % clang++ -o x x.cc && ./x -1, 1 % clang++ -funsigned-char -o x x.cc && ./x 0, 1 However, while this may be surprising, both Clang and GCC agree. Differential Revision: http://reviews.llvm.org/D13324 llvm-svn: 249097
* [X86] Remove unnecessary MMX declarations from Intrin.hSimon Pilgrim2015-08-251-0/+10
| | | | | | | | | | | | As discussed in PR23648 - the intrinsics _m_from_int, _m_to_int and _m_prefetch are defined in mmintrin.h and prfchwintrin.h so we don't need to in Intrin.h Added tests for _m_from_int and _m_to_int D11338 already added a test for _m_prefetch Differential Revision: http://reviews.llvm.org/D12272 llvm-svn: 245975
* clang/test: REQUIRES: s/x86-64-registered-target/x86-registered-target/NAKAMURA Takumi2013-12-041-1/+1
| | | | llvm-svn: 196350
* These tests require particular registered targets. Declared as such.Galina Kistanova2011-06-031-0/+1
| | | | llvm-svn: 132600
* Linux still needs these hacks.Bill Wendling2010-10-201-0/+4
| | | | llvm-svn: 116888
* Now that mm_malloc.h was rewritten to *not* include errno.h (seeBill Wendling2010-10-191-4/+0
| | | | | | | http://llvm.org/viewvc/llvm-project?rev=116771&view=rev) we can get rid of these hacks. llvm-svn: 116853
* Erm...this isn't the same as PR6658.Bill Wendling2010-10-061-1/+0
| | | | llvm-svn: 115737
* Add same hack to mmx-builtins.c as in Headers/c89.c to get it to pass on ↵Bill Wendling2010-10-061-0/+5
| | | | | | Win32. PR6658. llvm-svn: 115735
* Do x86_64.Bill Wendling2010-10-031-1/+1
| | | | llvm-svn: 115460
* Test to verify that all of the MMX builtins are handled by the front-end.Bill Wendling2010-10-031-0/+448
llvm-svn: 115459
OpenPOWER on IntegriCloud