summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/masked_intrinsics.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] Convert a masked.load of a dereferenceable address to an ↵Philip Reames2019-04-231-2/+3
| | | | | | | | | | unconditional load If we have a masked.load from a location we know to be dereferenceable, we can simply issue a speculative unconditional load against that address. The key advantage is that it produces IR which is well understood by the optimizer. The select (cnd, load, passthrough) form produced should be pattern matchable back to hardware predication if profitable. Differential Revision: https://reviews.llvm.org/D59703 llvm-svn: 359000
* [Tests] Revise a test as requested by reviewer in D59703Philip Reames2019-04-221-13/+14
| | | | llvm-svn: 358907
* [Tests] Add a negative test for masked.gather part of D59703Philip Reames2019-04-221-0/+14
| | | | llvm-svn: 358906
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+261
| | | | | | | | The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
* Temporarily Revert "Add basic loop fusion pass."Eric Christopher2019-04-171-261/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] Fix a nasty miscompile introduced w/masked.gather demanded eltsPhilip Reames2019-04-121-2/+1
| | | | | | | | This fixes a miscompile which was introduced in r356510 (https://reviews.llvm.org/D57372). The problem is that the original patch removed pointer operands where the load results we're demanded, but without considering the legality of the load itself. If the masked.gather had active, but undemanded, lanes, then we could end up creating a load which loaded from an undef address. The result could be a segfault, or, in theory, an arbitrary read from a random memory location into an used register. llvm-svn: 358299
* [Tests] Checkin a test demonstrating a miscompile so that patch which fixes ↵Philip Reames2019-04-121-0/+15
| | | | | | it shows a clear diff llvm-svn: 358296
* [Tests] Add masked.gather tests for non-constant masks + speculation ↵Philip Reames2019-03-221-0/+37
| | | | | | possibilities llvm-svn: 356782
* [tests] Add a generic masked.gather test to show sometimes we can't transformPhilip Reames2019-03-221-10/+11
| | | | llvm-svn: 356779
* [tests] Add tests for converting masked.load to load speculativelyPhilip Reames2019-03-221-0/+60
| | | | llvm-svn: 356778
* [Tests] Use valid alignment in masked.gather testsPhilip Reames2019-03-221-5/+5
| | | | llvm-svn: 356775
* Simplify operands of masked stores and scatters based on demanded elementsPhilip Reames2019-03-201-5/+3
| | | | | | | | If we know we're not storing a lane, we don't need to compute the lane. This could be improved by using the undef element result to further prune the mask, but I want to separate that into its own change since it's relatively likely to expose other problems. Differential Revision: https://reviews.llvm.org/D57247 llvm-svn: 356590
* Demanded elements support for masked.load and masked.gatherPhilip Reames2019-03-191-8/+8
| | | | | | | | Teach instcombine to propagate demanded elements through a masked load or masked gather instruction. This is in the broader context of improving vector pointer instcombine under https://reviews.llvm.org/D57140. Differential Revision: https://reviews.llvm.org/D57372 llvm-svn: 356510
* [tests] Add a test for constexpr mask as requested in D57372Philip Reames2019-03-151-1/+9
| | | | llvm-svn: 356285
* [InstCombine] add tests for masked store/scatter; NFCSanjay Patel2019-03-151-0/+27
| | | | | | Baseline tests for D57247 llvm-svn: 356283
* Verifier: Make sure masked load/store alignment is a power of 2Matt Arsenault2019-03-131-1/+1
| | | | | | | The same should also be done for scatter/gather, but the verifier doesn't check those at all now. llvm-svn: 356094
* [Test] Add tests for gather/maked.load demanded elements, and convert the ↵Philip Reames2019-01-291-17/+67
| | | | | | whole file to auto generated checks. llvm-svn: 352452
* Support arbitrary address space pointers in masked gather/scatter intrinsics.Elad Cohen2017-05-031-4/+4
| | | | | | | | | | | | Fixes PR31789 - When loop-vectorize tries to use these intrinsics for a non-default address space pointer we fail with a "Calling a function with a bad singature!" assertion. This patch solves this by adding the 'vector of pointers' argument as an overloaded type which will determine the address space. Differential revision: https://reviews.llvm.org/D31490 llvm-svn: 302018
* [InstCombine] Masked loads with undef masks can fold to normal loadsDavid Majnemer2016-07-141-0/+9
| | | | | | | | We were able to fold masked loads with an all-ones mask to a normal load. However, we couldn't turn a masked load with a mask with mixed ones and undefs into a normal load. llvm-svn: 275380
* Support arbitrary addrspace pointers in masked load/store intrinsicsArtur Pilipenko2016-06-281-6/+6
| | | | | | | | | | | | | | This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details). This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace. The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics. Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17270 llvm-svn: 274043
* Revert -r273892 "Support arbitrary addrspace pointers in masked load/store ↵Artur Pilipenko2016-06-271-6/+6
| | | | | | intrinsics" since some of the clang tests don't expect to see the updated signatures. llvm-svn: 273895
* Support arbitrary addrspace pointers in masked load/store intrinsicsArtur Pilipenko2016-06-271-6/+6
| | | | | | | | | | | | | | This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details). This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace. The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics. Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17270 llvm-svn: 273892
* Revert "Support arbitrary addrspace pointers in masked load/store intrinsics"Adam Nemet2016-04-141-6/+6
| | | | | | | | This reverts commit r266086. It breaks the LTO build of gcc in SPEC2000. llvm-svn: 266282
* Support arbitrary addrspace pointers in masked load/store intrinsicsArtur Pilipenko2016-04-121-6/+6
| | | | | | | | | | | | | | This is a resubmittion of 263158 change. This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace. The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics. Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17270 llvm-svn: 266086
* Revert "Support arbitrary addrspace pointers in masked load/store intrinsics"Matthias Braun2016-03-221-6/+6
| | | | | | | | | | | This commit broke LTO builds. Reverting it to unbreak the bots while the issue is investigated. See also: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160321/341002.html This reverts r263158 llvm-svn: 264088
* Support arbitrary addrspace pointers in masked load/store intrinsicsArtur Pilipenko2016-03-101-6/+6
| | | | | | | | | | | | This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace. The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics. Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17270 llvm-svn: 263158
* [InstCombine] simplify masked scatter/gather intrinsics with zero masksSanjay Patel2016-02-011-3/+20
| | | | | | | | | | | A masked scatter with a zero mask means there's no store. A masked gather with a zero mask means the passthru arg is returned. This is a continuation of: http://reviews.llvm.org/rL259369 http://reviews.llvm.org/rL259392 llvm-svn: 259421
* [InstCombine] simplify masked store intrinsics with all ones or zeros masksSanjay Patel2016-02-011-0/+18
| | | | | | | | | | A masked store with a zero mask means there's no store. A masked store with an allOnes mask means it's a normal vector store. This is a continuation of: http://reviews.llvm.org/rL259369 llvm-svn: 259392
* fix broken check linesSanjay Patel2016-02-011-2/+2
| | | | | | Without the colon, it doesn't mean anything! llvm-svn: 259377
* [InstCombine] simplify masked load intrinsics with all ones or zeros masksSanjay Patel2016-02-011-21/+2
| | | | | | | | | A masked load with a zero mask means there's no load. A masked load with an allOnes mask means it's a normal vector load. Differential Revision: http://reviews.llvm.org/D16691 llvm-svn: 259369
* add masked intrinsic tests to show missed opportunitiesSanjay Patel2016-01-281-0/+41
llvm-svn: 259083
OpenPOWER on IntegriCloud