summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/shufflevector.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstSimplify] fold splat of inserted constant to vector constantSanjay Patel2019-12-151-9/+3
| | | | | | | | | | | | | | | | | shuf (inselt ?, C, IndexC), undef, <IndexC, IndexC...> --> <C, C...> This is another missing shuffle fold pattern uncovered by the shuffle correctness fix from D70246. The problem was visible in the post-commit thread example, but we managed to overcome the limitation for that particular case with D71220. This is something like the inverse of the previous fix - there we didn't demand the inserted scalar, and here we are only demanding an inserted scalar. Differential Revision: https://reviews.llvm.org/D71488
* [InstSimplify] improve test coverage for insert+splat; NFCSanjay Patel2019-12-131-10/+21
|
* [InstSimplify] add tests for insert constant + splat; NFCSanjay Patel2019-12-101-0/+22
|
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+249
| | | | | | | | 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-249/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* InstructionSimplify: Relanding r301766Zvi Rackover2017-05-071-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Re-applying r301766 with a fix to a typo and a regression test. The log message for r301766 was: ================================================================================== InstructionSimplify: Canonicalize shuffle operands. NFC-ish. Summary: Apply canonicalization rules: 1. Input vectors with no elements selected from can be replaced with undef. 2. If only one input vector is constant it shall be the second one. This allows constant-folding to cover more ad-hoc simplifications that were in place and avoid duplication for RHS and LHS checks. There are more rules we may want to add in the future when we see a justification. e.g. mask elements that select undef elements can be replaced with undef. ================================================================================== Reviewers: spatel, RKSimon Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32863 llvm-svn: 302373
* InstructionSimplify: Simplify a shuffle with a undef mask to undefZvi Rackover2017-04-301-0/+8
| | | | | | | | | | | | | | | | Summary: Following the discussion in pr32486, adding the simplification: shuffle %x, %y, undef -> undef Reviewers: spatel, RKSimon, andreadb, davide Reviewed By: spatel Subscribers: jroelofs, davide, llvm-commits Differential Revision: https://reviews.llvm.org/D32293 llvm-svn: 301764
* [InstSimplify] fold identity shuffles (recursing if needed)Sanjay Patel2017-04-191-26/+41
| | | | | | | | | | | | | | | | | This patch simplifies the examples from D31509 and D31927 (PR30630) and catches the basic identity shuffle tests that Zvi recently added. I'm not sure if we have something like this in DAGCombiner, but we should? It's worth noting that "MaxRecurse / RecursionLimit" is only 3 on entry at the moment. We might want to bump that up if there are longer shuffle chains like this in the wild. For now, we're ignoring shuffles that have undef mask elements because it's not clear how those should be handled. Differential Revision: https://reviews.llvm.org/D31960 llvm-svn: 300714
* InstSimplify: A shuffle of a splat is always the splat itselfZvi Rackover2017-04-111-2/+75
| | | | | | | | | | | | | | | | Summary: Fold: shuffle (splat-shuffle), undef, M --> splat-shuffle Reviewers: spatel, RKSimon, craig.topper Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31527 llvm-svn: 299990
* [InstSimplify] add tests for chains of shuffles; NFCSanjay Patel2017-04-111-0/+45
| | | | llvm-svn: 299984
* InstSimplify: Add a hook for shufflevectorZvi Rackover2017-04-031-6/+20
| | | | | | | | | | | | | | | | | | Summary: Add a hook for simplification of shufflevector's with the following rules: - Constant folding - NFC, as it was already being done by the default handler. - If only one of the operands is constant, constant fold the shuffle if the mask does not select elements from the variable operand - to show the hook is firing and affecting the test-cases. Reviewers: RKSimon, craig.topper, spatel, sanjoy, nlopes, majnemer Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31525 llvm-svn: 299393
* Add another interesting shufflevector test case for InstSimplify. NFC.Zvi Rackover2017-04-021-0/+9
| | | | | | | Test case shows opportunity to constant fold a shuffle with one variable input vector operand. llvm-svn: 299327
* Instsimplify: Adding shufflevector test. NFC.Zvi Rackover2017-03-311-0/+71
Adding some test-cases demonstrating cases that need to be improved. To be followed by patches that improve these cases. llvm-svn: 299189
OpenPOWER on IntegriCloud