summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/select_meta.ll
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+345
| | | | | | | | 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-345/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] use 'match' to handle vectors and simplify codeSanjay Patel2018-10-231-3/+2
| | | | | | | This is another step towards completely removing the fake binop queries for not/neg/fneg. llvm-svn: 345036
* [InstCombine] swap select profile metadata when swapping select opsSanjay Patel2018-10-231-5/+5
| | | | llvm-svn: 345034
* [InstCombine] add/move tests for select with inverted condition; NFCSanjay Patel2018-10-231-0/+39
| | | | | | | The transform is broken in 2 ways - it doesn't correct metadata (or even drop it), and it doesn't work with vectors with undef elements. llvm-svn: 345033
* [InstCombine] Fold (min/max ~X, Y) -> ~(max/min X, ~Y) when Y is freely ↵Craig Topper2018-09-221-16/+16
| | | | | | | | | | | | | | | | invertible Summary: This restores the combine that was reverted in r341883. The infinite loop from the failing test no longer occurs due to changes from r342163. Reviewers: spatel, dmgreen Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52070 llvm-svn: 342797
* [InstCombine] Partially revert rL341674 due to PR38897.Alina Sbirlea2018-09-101-16/+16
| | | | | | | | | | | | | | | Summary: Revert min/max changes in rL341674 dues to high compile times causing timeouts (PR38897). Checking in to unblock failing builds. Patch available for post-commit review and re-revert once resolved. Working on a smaller reproducer for PR38897. Reviewers: craig.topper, spatel Subscribers: sanjoy, jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D51897 llvm-svn: 341883
* [InstCombine] Fold (min/max ~X, Y) -> ~(max/min X, ~Y) when Y is freely ↵Craig Topper2018-09-071-16/+16
| | | | | | | | | | | | invertible If the ~X wasn't able to simplify above the max/min, we might be able to simplify it by moving it below the max/min. I had to modify the ~(min/max ~X, Y) transform to prevent getting stuck in a loop when we saw the new ~(max/min X, ~Y) before the ~Y had been folded away to remove the new not. Differential Revision: https://reviews.llvm.org/D51398 llvm-svn: 341674
* extend binop folds for selects to include true and false binops flag ↵Michael Berg2018-08-201-2/+2
| | | | | | | | | | | | | | intersection Summary: This change address bug 38641 Reviewers: spatel, wristow Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D50996 llvm-svn: 340222
* add a missed case for binary op FMF propagation under select foldsMichael Berg2018-08-161-1/+1
| | | | llvm-svn: 339938
* [InstCombine] choose 1 form of abs and nabs as canonicalSanjay Patel2018-05-201-7/+8
| | | | | | | | | | | | | | | We already do this for min/max (see the blob above the diff), so we should do the same for abs/nabs. A sign-bit check (<s 0) is used as a predicate for other IR transforms and it's likely the best for codegen. This might solve the motivating cases for D47037 and D47041, but I think those patches still make sense. We can't guarantee this canonicalization if the icmp has more than one use. Differential Revision: https://reviews.llvm.org/D47076 llvm-svn: 332819
* Fix some misc. -enable-var-scope violationsMatt Arsenault2017-11-131-25/+25
| | | | llvm-svn: 318006
* [InstCombine] canonicalize non-obivous forms of integer min/maxSanjay Patel2017-02-211-20/+12
| | | | | | | | | | | | | | | | This is part of trying to clean up our handling of min/max patterns in IR. By converting these to canonical form, we're more likely to recognize them because there are various places in InstCombine that don't use matchSelectPattern or m_SMax and friends. The backend fixups referenced in the now deleted TODO comment were added with: https://reviews.llvm.org/rL291392 https://reviews.llvm.org/rL289738 If there's any codegen fallout from this change, we should be able to address it in DAGCombiner or target-specific lowering. llvm-svn: 295758
* [InstCombine] don't drop metadata in FoldOpIntoSelect()Sanjay Patel2016-11-261-0/+11
| | | | llvm-svn: 287980
* [InstCombine] canonicalize min/max constant to select's false valueSanjay Patel2016-11-211-12/+128
| | | | | | | | | | | | | | | | | | | | This is a first step towards canonicalization and improved folding/codegen for integer min/max as discussed here: http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html Here, we're just matching the simplest min/max patterns and adjusting the icmp predicate while swapping the select operands. I've included FIXME tests in test/Transforms/InstCombine/select_meta.ll so it's easier to see how this might be extended (corresponds to the TODO comment in the code). That's also why I'm using matchSelectPattern() rather than a simpler check; once the backend is patched, we can just remove some of the restrictions to allow the obfuscated min/max patterns in the FIXME tests to be matched. Differential Revision: https://reviews.llvm.org/D26525 llvm-svn: 287585
* [InstCombine] auto-generate better checks; NFCSanjay Patel2016-11-101-30/+67
| | | | | | | | Note that the existing metadata checking was re-added by hand because the script doesn't currently know how to generate checks for lines outside of functions. llvm-svn: 286460
* [ValueTracking] fix matchSelectPattern to allow vector splat folds of ↵Sanjay Patel2016-10-271-7/+2
| | | | | | min/max/abs/nabs llvm-svn: 285303
* [InstCombine] add tests for missing folds of vector abs/nabs/min/maxSanjay Patel2016-10-271-0/+20
| | | | llvm-svn: 285299
* [Profile] Propagate branch metadata properly in instcombineXinliang David Li2016-08-251-0/+135
Differential Revision: http://reviews.llvm.org/D23590 llvm-svn: 279693
OpenPOWER on IntegriCloud