summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/not.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] try to pull 'not' of select into compare operandsSanjay Patel2020-01-071-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not (select ?, (cmp TPred, ?, ?), (cmp FPred, ?, ?) --> select ?, (cmp TPred', ?, ?), (cmp FPred', ?, ?) If both sides of the select are cmps, we can remove an instruction. The case where only side is a cmp is deferred to a possible follow-on patch. We have a more general 'isFreeToInvert' analysis, but I'm not seeing a way to use that more widely without inducing infinite looping (opposing transforms). Here, we flip the compare predicates directly, so we should not have any danger by creating extra intermediate 'not' ops. Alive proofs: https://rise4fun.com/Alive/jKa Name: both select values are compares - invert predicates %tcmp = icmp sle i32 %x, %y %fcmp = icmp ugt i32 %z, %w %sel = select i1 %cond, i1 %tcmp, i1 %fcmp %not = xor i1 %sel, true => %tcmp_not = icmp sgt i32 %x, %y %fcmp_not = icmp ule i32 %z, %w %not = select i1 %cond, i1 %tcmp_not, i1 %fcmp_not Name: false val is compare - invert/not %fcmp = icmp ugt i32 %z, %w %sel = select i1 %cond, i1 %tcmp, i1 %fcmp %not = xor i1 %sel, true => %tcmp_not = xor i1 %tcmp, -1 %fcmp_not = icmp ule i32 %z, %w %not = select i1 %cond, i1 %tcmp_not, i1 %fcmp_not Differential Revision: https://reviews.llvm.org/D72007
* [InstCombine] add tests for not(select ...); NFCSanjay Patel2019-12-231-0/+142
|
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+253
| | | | | | | | 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-253/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] allow add+not --> sub for arbitrary vector constants.Sanjay Patel2018-09-031-2/+1
| | | | llvm-svn: 341335
* [InstCombine] consolidate tests for ~(X+C); NFCSanjay Patel2018-09-031-0/+33
| | | | llvm-svn: 341332
* [InstCombine] allow not+sub fold for arbitrary vector constantsSanjay Patel2018-09-021-1/+1
| | | | | | | | The fold was implemented for the general case but use-limitation, but the later constant version which didn't check uses was only matching splat constants. llvm-svn: 341292
* [InstCombine] move/add tests for not+sub; NFCSanjay Patel2018-09-021-14/+84
| | | | llvm-svn: 341291
* [InstCombine] fix icmp with not op and constant to work with splat vector ↵Sanjay Patel2017-06-021-2/+1
| | | | | | constant llvm-svn: 304562
* [InstCombine] fix/add tests for icmp with not ops; NFCSanjay Patel2017-06-021-10/+40
| | | | | | | The existing test was not minimal, and there was no coverage for the variants with a constant or vector types. llvm-svn: 304555
* [InstCombine] add folds for not-of-shift-rightSanjay Patel2017-05-081-6/+16
| | | | | | | | | | | | | | | This is another step towards getting rid of dyn_castNotVal, so we can recommit: https://reviews.llvm.org/rL300977 As the tests show, we were missing the lshr case for constants and both ashr/lshr vector splat folds. The ashr case with constant was being performed inefficiently in 2 steps. It's also possible there was a latent bug in that case because we can't do that fold if the constant is positive: http://rise4fun.com/Alive/Bge llvm-svn: 302465
* [InstCombine] move/add tests for not(shr (not X), Y); NFCSanjay Patel2017-05-081-6/+60
| | | | llvm-svn: 302451
* [InstCombine] consolidate tests for DeMorgan folds; NFCSanjay Patel2017-04-301-38/+1
| | | | | | I'm proposing to add tests and change behavior in D32665. llvm-svn: 301774
* [InstCombine] auto-generate better checks; NFCSanjay Patel2017-04-091-35/+69
| | | | | | Also, move a test next to its sibling to eliminate a file with just one test. llvm-svn: 299824
* fix typos, remove noise; NFCISanjay Patel2015-09-081-23/+24
| | | | llvm-svn: 247035
* InstCombine: Allow folding of xor into icmp by changing the predicate for ↵Benjamin Kramer2015-02-121-0/+6
| | | | | | | | vectors The loop vectorizer can create this pattern. llvm-svn: 228954
* Use FileCheck instead of grep. Change by Sonam.Suyog Sarda2014-11-271-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D6432 llvm-svn: 222876
* manually upgrade a bunch of tests to modern syntax, and remove some thatChris Lattner2011-06-171-1/+1
| | | | | | are either unreduced or only test old syntax. llvm-svn: 133228
* 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
* Implement PR2298. This transforms:Chris Lattner2008-05-091-0/+10
| | | | | | | ~x < ~y --> y < x -x == -y --> x == y llvm-svn: 50882
* Remove llvm-upgrade and update test cases.Tanya Lattner2008-03-011-29/+28
| | | | llvm-svn: 47793
* Regression is gone, don't try to find it on clean target.Reid Spencer2007-01-171-0/+45
llvm-svn: 33296
OpenPOWER on IntegriCloud