summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/avx-shuffle-builtins.c
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] canonicalize select shuffles by commutingSanjay Patel2019-03-311-3/+3
| | | | | | | | | | | | | | | | | | | | In PR41304: https://bugs.llvm.org/show_bug.cgi?id=41304 ...we have a case where we want to fold a binop of select-shuffle (blended) values. Rather than try to match commuted variants of the pattern, we can canonicalize the shuffles and check for mask equality with commuted operands. We don't produce arbitrary shuffle masks in instcombine, but select-shuffles are a special case that the backend is required to handle because we already canonicalize vector select to this shuffle form. So there should be no codegen difference from this change. It's possible that this improves CSE in IR though. Differential Revision: https://reviews.llvm.org/D60016 llvm-svn: 357366
* [X86] Fix various type mismatches in intrinsic headers and intrinsic tests ↵Craig Topper2018-07-071-4/+4
| | | | | | | | that cause extra bitcasts to be emitted in the IR. Found via imprecise grepping of the -O0 IR. There could still be more bugs out there. llvm-svn: 336487
* [X86] Add subvector insert and extract builtins to enable target feature ↵Craig Topper2018-06-081-4/+4
| | | | | | | | checking and immediate range checking. Test changes are due to differences in how we generate undef elements now. We also changed the types used for extractf128_si256/insertf128_si256 to match the signature of the builtin that previously existed which this patch resurrects. This also matches gcc. llvm-svn: 334261
* Update test that relies on the optimizer to match new output.Michael Kuperstein2016-12-281-13/+3
| | | | llvm-svn: 290642
* [X86] Remove the mm_malloc.h include guard hack from the X86 builtins testsElad Cohen2016-09-281-3/+1
| | | | | | | | | | | | 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
* Canonicalize some of the x86 builtin tests and either remove or commentEric Christopher2015-10-141-0/+1
| | | | | | about optimization options. llvm-svn: 250271
* [X86] Add _mm256_set_m128 and its 5 variants.Michael Kuperstein2015-05-201-0/+35
| | | | | | Differential Revision: http://reviews.llvm.org/D9855 llvm-svn: 237778
* Adding back a CHECK that works with r233110Sanjay Patel2015-03-241-1/+2
| | | | llvm-svn: 233111
* Removing a CHECK that is about to go wrong.Sanjay Patel2015-03-241-2/+1
| | | | | | | | | | | | | | | | | | | | I'm about to commit a patch for: http://reviews.llvm.org/D8567 That patch will break this one existing test case in Clang. I'm not sure if this file is intending to create a Clang dependency on the LLVM IR optimizer, but that's the consequence of specifying -O3 on this test file. My hope is to avoid buildbot rage by removing this check, committing the LLVM patch, and then fixing this check. I don't know how to make a simultaneous commit to Clang and LLVM. I will commit the correct CHECK line fix for this test shortly. llvm-svn: 233109
* fixed vperm2* intrinsics to check for shufflesSanjay Patel2015-03-201-3/+3
| | | | | | | This corresponds to llvm r232852: http://reviews.llvm.org/rL232852 llvm-svn: 232857
* [X86, AVX] replace vextractf128 intrinsics with generic shufflesSanjay Patel2015-03-121-4/+42
| | | | | | | | | | | This is very much like D8088 (checked in at r231792). Now that we've replaced the vinsertf128 intrinsics, do the same for their extract twins. Differential Revision: http://reviews.llvm.org/D8275 llvm-svn: 232052
* [X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.Sanjay Patel2015-03-101-0/+39
| | | | | | | | | | | | | | We want to replace as much custom x86 shuffling via intrinsics as possible because pushing the code down the generic shuffle optimization path allows for better codegen and less complexity in LLVM. This is the sibling patch for the LLVM half of this change: http://reviews.llvm.org/D8086 Differential Revision: http://reviews.llvm.org/D8088 llvm-svn: 231792
* Implement AVX1 vbroadcast intrinsics with vector initializersAdam Nemet2014-05-291-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These intrinsics are special because they directly take a memory operand (AVX2 adds the register counterparts). Typically, other non-memop intrinsics take registers and then it's left to isel to fold memory operands. In order to LICM intrinsics directly reading memory, we require that no stores are in the loop (LICM) or that the folded load accesses constant memory (MachineLICM). When neither is the case we fail to hoist a loop-invariant broadcast. We can work around this limitation if we expose the load as a regular load and then just implement the broadcast using the vector initializer syntax. This exposes the load to LICM and other optimizations. At the IR level this is translated into a series of insertelements. The sequence is already recognized as a broadcast so there is no impact on the quality of codegen. _mm256_broadcast_pd and _mm256_broadcast_ps are not updated by this patch because right now we lack the DAG-combiner smartness to recover the broadcast instructions. This will be tackled in a follow-on. There will be completing changes on the LLVM side to remove the LLVM intrinsics and to auto-upgrade bitcode files. Fixes <rdar://problem/16494520> llvm-svn: 209846
* Convert vperm2f128 and vperm2i128 intrinsics back to using llvm intrinsics. ↵Craig Topper2012-04-171-3/+3
| | | | | | Unfortunately, these instructions have behavior that can't be modeled with shuffle vector. llvm-svn: 154906
* Fix shuffle vector calculation for mm_permute_ps. Fixes PR 12401.Craig Topper2012-03-301-0/+7
| | | | llvm-svn: 153724
* Remove vperm2f* and vperm2i builtins. Same effect can be achieved with ↵Craig Topper2012-02-081-0/+18
| | | | | | builtin_shufflevector. llvm-svn: 150064
* Remove vpermilp* builtins. Same effect can be achieved with ↵Craig Topper2012-02-081-0/+24
| | | | | | builtin_shufflevector. llvm-svn: 150056
* Add testcase for r138411Bruno Cardoso Lopes2011-08-241-0/+16
llvm-svn: 138422
OpenPOWER on IntegriCloud