summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/icmp-dom.ll
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+350
| | | | | | | | 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-350/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] Add missing test for icmp transformation (NFC)Teresa Johnson2019-03-191-0/+28
| | | | | | | This was split out of D59378. There was no testing for the EQ case in foldICmpWithDominatingICmp, add one here. llvm-svn: 356463
* [InstCombine] simplify icmps with same operands based on dominating cmpSanjay Patel2018-12-051-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests here are based on the motivating cases from D54827. More background: 1. We don't get these cases in general with SimplifyCFG because the root of the pattern match is an icmp, not a branch. I'm not sure how often we encounter this pattern vs. the seemingly more likely case with branches, but I don't see evidence to leave the minimal pattern unoptimized. 2. This has a chance of increasing compile-time because we're using a ValueTracking call to handle the match. The motivating cases could be handled with a simpler pair of calls to isImpliedTrueByMatchingCmp/ isImpliedFalseByMatchingCmp, but I saw that we have a more comprehensive wrapper around those, so we might as well use it here unless there's evidence that it's significantly slower. 3. Ideally, we'd handle the fold to constants in InstSimplify, but as with the existing code here, we could extend this to handle cases where the result is not a constant, but a new combined predicate. That would mean splitting the logic across the 2 passes and possibly duplicating the pattern-matching cost. 4. As mentioned in D54827, this seems like the kind of thing that should be handled in Correlated Value Propagation, but that pass is currently limited to dealing with instructions with constant operands, so extending this bit of InstCombine is the smallest/easiest way to get these patterns optimized. llvm-svn: 348367
* [InstCombine] add tests for implied simplifications; NFCSanjay Patel2018-12-041-0/+168
| | | | | | | | | | | | | | Ideally, we would fold all of these in InstSimplify in a similar way to rL347896, but this is a bit awkward when we're trying to simplify a compare directly because the ValueTracking API expects the compare as an input, but in InstSimplify, we just have the operands of the compare. Given that we can do transforms besides just simplifications, we might as well just extend the code in InstCombine (which already does simplifications with constant operands). llvm-svn: 348312
* [InstCombine] auto-generate full checks for icmp dominator tests; NFCSanjay Patel2018-12-041-0/+162
llvm-svn: 348270
OpenPOWER on IntegriCloud