summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/xor.ll
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+914
| | | | | | | | 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-914/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] add/move tests for select with inverted condition; NFCSanjay Patel2018-10-231-10/+0
| | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | 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] Fold (xor (min/max X, Y), -1) -> (max/min ~X, ~Y) when X and Y ↵Craig Topper2018-09-131-36/+28
| | | | | | | | | | | | | | are freely invertible. This allows the xor to be removed completely. This might help with recomitting r341674, but seems good regardless. Coincidentally fixes PR38915. Differential Revision: https://reviews.llvm.org/D51964 llvm-svn: 342163
* [InstCombine] Add test cases for D51964. NFCCraig Topper2018-09-131-0/+128
| | | | llvm-svn: 342162
* [InstCombine] Partially revert rL341674 due to PR38897.Alina Sbirlea2018-09-101-1/+1
| | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | 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
* [InstCombine] add xor+not foldsSanjay Patel2018-09-061-6/+6
| | | | | | | | | | This fold is needed to avoid a regression when we try to recommit rL300977. We can't see the most basic win currently because demanded bits changes the patterns: https://rise4fun.com/Alive/plpp llvm-svn: 341559
* [InstCombine] add tests for xor-not; NFCSanjay Patel2018-09-061-0/+72
| | | | | | | | These tests demonstrate a missing fold that would also be needed to avoid a regression when we try to recommit rL300977. llvm-svn: 341557
* [InstCombine] improve xor+and/or testsSanjay Patel2018-09-041-90/+172
| | | | | | | | | | | The tests attempted to check for commuted variants of these folds, but complexity-based canonicalization meant we had no coverage for at least 1/2 of the cases. Also, the folds correctly check hasOneUse(), but there was no coverage for that. llvm-svn: 341394
* [InstCombine] consolidate tests for ~(X+C); NFCSanjay Patel2018-09-031-40/+0
| | | | llvm-svn: 341332
* [InstCombine] move/add tests for not+sub; NFCSanjay Patel2018-09-021-20/+0
| | | | llvm-svn: 341291
* [InstCombine] move/add tests for xor+add fold; NFCSanjay Patel2018-07-311-11/+0
| | | | llvm-svn: 338364
* Eliminate a bitwise 'not' op of 'not' min/max by inverting the min/max.Artur Gainullin2018-04-111-0/+144
| | | | | | | | | | | | | | | | | | | | | Bitwise 'not' of the min/max could be eliminated in the pattern: %notx = xor i32 %x, -1 %cmp1 = icmp sgt[slt/ugt/ult] i32 %notx, %y %smax = select i1 %cmp1, i32 %notx, i32 %y %res = xor i32 %smax, -1 https://rise4fun.com/Alive/lCN Reviewers: spatel Reviewed by: spatel Subscribers: a.elovikov, llvm-commits Differential Revision: https://reviews.llvm.org/D45317 llvm-svn: 329791
* [InstCombine] move/add tests for xor-of-icmps (PR36682); NFCSanjay Patel2018-03-211-21/+0
| | | | llvm-svn: 328109
* [InstCombine] Support '(C - X) ^ signmask -> (C + signmask - X)' and '(X + ↵Craig Topper2017-08-061-0/+20
| | | | | | C) ^ signmask -> (X + C + signmask)' for vector splats. llvm-svn: 310232
* [InstCombine] Support ~(c-X) --> X+(-c-1) and ~(X-c) --> (-c-1)-X for splat ↵Craig Topper2017-08-061-0/+30
| | | | | | vectors. llvm-svn: 310195
* [InstCombine] Regenerate test28_sub test case in xor.ll that I forgot to ↵Craig Topper2017-08-051-1/+2
| | | | | | commit after fixing a typo in r310186. llvm-svn: 310188
* [InstCombine] Fold (C - X) ^ signmask -> (C + signmask - X).Craig Topper2017-08-051-0/+9
| | | | llvm-svn: 310186
* [InstCombine] revert r300977 and r301021Sanjay Patel2017-04-211-17/+0
| | | | | | This can cause an inf-loop. Investigating... llvm-svn: 301035
* [InstCombine] prefer xor with -1 because 'not' is easier to understand (PR32706)Sanjay Patel2017-04-211-0/+17
| | | | | | | | | This matches the demanded bits behavior in the DAG and should fix: https://bugs.llvm.org/show_bug.cgi?id=32706 Differential Revision: https://reviews.llvm.org/D32255 llvm-svn: 300977
* [InstCombine] Add testcases for (B&A)^A -> ~B & A and (B|A)^A -> B & ~ACraig Topper2017-04-111-0/+88
| | | | llvm-svn: 299971
* [InstCombine] Support folding and/or/xor with a constant vector RHS into ↵Craig Topper2017-04-041-10/+6
| | | | | | | | | | selects and phis Currently we only fold with ConstantInt RHS. This generalizes to any Constant RHS. Differential Revision: https://reviews.llvm.org/D31610 llvm-svn: 299466
* [InstCombine] Add test cases for missing combines of phis with and/or/xor ↵Craig Topper2017-04-041-0/+68
| | | | | | with constant argument. NFC llvm-svn: 299460
* [InstCombine] Add more test cases for missing combines of selects with ↵Craig Topper2017-04-041-0/+11
| | | | | | and/or/xor with constant argument. NFC llvm-svn: 299450
* [InstCombine] Add test cases showing how we fail to fold vector constants ↵Craig Topper2017-04-031-0/+21
| | | | | | into selects the way we do with scalars. llvm-svn: 299369
* [InstCombine] fix operand-complexity-based canonicalization (PR28296)Sanjay Patel2017-02-031-1/+1
| | | | | | | | | | | | | | | | | | | The code comments didn't match the code logic, and we didn't actually distinguish the fake unary (not/neg/fneg) operators from arguments. Adding another level to the weighting scheme provides more structure and can help simplify the pattern matching in InstCombine and other places. I fixed regressions that would have shown up from this change in: rL290067 rL290127 But that doesn't mean there are no pattern-matching logic holes left; some combines may just be missing regression tests. Should fix: https://llvm.org/bugs/show_bug.cgi?id=28296 Differential Revision: https://reviews.llvm.org/D27933 llvm-svn: 294049
* [InstCombine] use m_APInt to allow icmp (binop X, Y), C folds with constant ↵Sanjay Patel2016-08-031-8/+2
| | | | | | | | | splat vectors This removes the restriction for the icmp constant, but as noted by the FIXME comments, we still need to change individual checks for binop operand constants. llvm-svn: 277629
* add tests for icmp vector foldsSanjay Patel2016-07-221-6/+32
| | | | llvm-svn: 276472
* add more tests for zexty xor sandwichesSanjay Patel2016-07-131-0/+12
| | | | | | ...mmm sandwiches llvm-svn: 275302
* add test for zexty xor sandwichSanjay Patel2016-07-131-0/+14
| | | | llvm-svn: 275297
* auto-generate checksSanjay Patel2016-07-121-159/+190
| | | | llvm-svn: 275186
* Have a single way for creating unique value names.Rafael Espindola2015-11-221-4/+4
| | | | | | | | | | | We had two code paths. One would create names like "foo.1" and the other names like "foo1". For globals it is important to use "foo.1" to help C++ name demangling. For locals there is no strong reason to go one way or the other so I kept the most common mangling (foo1). llvm-svn: 253804
* Changed renaming of local symbols by inserting a dot vefore the numeric suffix.Sunil Srivastava2015-05-121-4/+4
| | | | | | | One code change and several test changes to match that details in http://reviews.llvm.org/D9481 llvm-svn: 237150
* Change the test case file to use FileCheck instead of grep. NFC.Suyog Sarda2014-11-251-1/+85
| | | | | | | | Change by Ankur Garg. Differential Revision: http://reviews.llvm.org/D6382 llvm-svn: 222740
* Fix the remaining TCL-style quotes found in the testsuite. This isChandler Carruth2012-07-021-1/+1
| | | | | | | | | | | | | | | | | another mechanical change accomplished though the power of terrible Perl scripts. I have manually switched some "s to 's to make escaping simpler. While I started this to fix tests that aren't run in all configurations, the massive number of tests is due to a really frustrating fragility of our testing infrastructure: things like 'grep -v', 'not grep', and 'expected failures' can mask broken tests all too easily. Essentially, I'm deeply disturbed that I can change the testsuite so radically without causing any change in results for most platforms. =/ llvm-svn: 159547
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-111-1/+1
| | | | | | | | input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. llvm-svn: 81537
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-081-1/+1
| | | | llvm-svn: 81257
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-081-1/+1
| | | | | | of using llvm-as, now that opt supports this. llvm-svn: 81226
* Remove llvm-upgrade and update tests.Tanya Lattner2008-03-091-0/+1
| | | | llvm-svn: 48103
* Remove llvm-upgrade and update test cases.Tanya Lattner2008-03-011-136/+130
| | | | llvm-svn: 47793
* For PR1319:Reid Spencer2007-04-141-3/+3
| | | | | | Upgrade tests to work with new llvm.exp version of llvm_runtest. llvm-svn: 36013
* creative way to add one.Chris Lattner2007-04-021-0/+6
| | | | llvm-svn: 35583
* For PR761:Reid Spencer2007-01-261-6/+6
| | | | | | | | | | | | | | Remove "target endian/pointersize" or add "target datalayout" to make the test parse properly or set the datalayout because defaults changes. For PR645: Make global names use the @ prefix. For llvm-upgrade changes: Fix test cases or completely remove use of llvm-upgrade for test cases that cannot survive the new renaming or upgrade capabilities. llvm-svn: 33533
* Regression is gone, don't try to find it on clean target.Reid Spencer2007-01-171-0/+192
llvm-svn: 33296
OpenPOWER on IntegriCloud