| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Added InstCombine for "select cond, ~cond, x" type patterns | Pete Cooper | 2011-12-15 | 1 | -0/+7 |
| | | | | | | | These can be reduced to "~cond & x" or "~cond | x" llvm-svn: 146624 | ||||
| * | Fix a few more places where TargetData/TargetLibraryInfo is not being passed. | Chad Rosier | 2011-12-02 | 1 | -14/+17 |
| | | | | | | | Add FIXMEs to places that are non-trivial to fix. llvm-svn: 145661 | ||||
| * | Add a new icmp+select optz'n. Also shows off the load(cst) folding added in | Nick Lewycky | 2011-10-02 | 1 | -0/+6 |
| | | | | | | | r140966. llvm-svn: 140969 | ||||
| * | Enhance a couple places where we were doing constant folding of instructions, | Nick Lewycky | 2011-10-02 | 1 | -1/+6 |
| | | | | | | | but not load instructions. Noticed by inspection. llvm-svn: 140966 | ||||
| * | Clean up includes of llvm/Analysis/ConstantFolding.h so it's included where ↵ | Eli Friedman | 2011-07-20 | 1 | -0/+1 |
| | | | | | | | it's used and not included where it isn't. llvm-svn: 135628 | ||||
| * | Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall. | Jay Foad | 2011-07-19 | 1 | -1/+1 |
| | | | | | llvm-svn: 135477 | ||||
| * | land David Blaikie's patch to de-constify Type, with a few tweaks. | Chris Lattner | 2011-07-18 | 1 | -2/+2 |
| | | | | | llvm-svn: 135375 | ||||
| * | PR10180: Fix a instcombine crash with FP vectors. | Eli Friedman | 2011-06-23 | 1 | -2/+2 |
| | | | | | llvm-svn: 133756 | ||||
| * | ConstantFoldInstOperands doesn't like compares, hand it off to instsimplify ↵ | Benjamin Kramer | 2011-05-28 | 1 | -0/+10 |
| | | | | | | | | | instead. Fixes PR10040. llvm-svn: 132254 | ||||
| * | InstCombine: Make switch folding with equality compares more aggressive by ↵ | Benjamin Kramer | 2011-05-27 | 1 | -15/+54 |
| | | | | | | | | | trying instsimplify on the arm where we know the compared value. Stuff like "x == y ? y : x&y" now folds into "x&y". llvm-svn: 132185 | ||||
| * | Switch more inst insertion in instcombine to IRBuilder. | Eli Friedman | 2011-05-18 | 1 | -10/+6 |
| | | | | | llvm-svn: 131547 | ||||
| * | Switch more inst insertion in instcombine to IRBuilder. | Eli Friedman | 2011-05-18 | 1 | -13/+6 |
| | | | | | llvm-svn: 131544 | ||||
| * | Switch inst insertion in instcombine transform to IRBuilder. | Eli Friedman | 2011-05-18 | 1 | -6/+2 |
| | | | | | llvm-svn: 131542 | ||||
| * | Remove tabs I accidentally added. | Nick Lewycky | 2011-03-28 | 1 | -15/+15 |
| | | | | | llvm-svn: 128413 | ||||
| * | Teach the transformation that moves binary operators around selects to preserve | Nick Lewycky | 2011-03-27 | 1 | -8/+22 |
| | | | | | | | the subclass optional data. llvm-svn: 128388 | ||||
| * | Add a small missed optimization: turn X == C ? X : Y into X == C ? C : Y. This | Nick Lewycky | 2011-03-27 | 1 | -0/+13 |
| | | | | | | | | | | | removes one use of X which helps it pass the many hasOneUse() checks. In my analysis, this turns up very often where X = A >>exact B and that can't be simplified unless X has one use (except by increasing the lifetime of A which is generally a performance loss). llvm-svn: 128373 | ||||
| * | InstCombine: Fix a thinko where transform an icmp under the assumption that ↵ | Benjamin Kramer | 2011-03-11 | 1 | -3/+2 |
| | | | | | | | | | it's a zero comparison when it's not. Fixes PR9454. llvm-svn: 127464 | ||||
| * | Fold select + select where both selects are on the same condition. | Nick Lewycky | 2011-01-28 | 1 | -0/+13 |
| | | | | | llvm-svn: 124469 | ||||
| * | Instcombine: Fix pattern where the sext did not dominate the icmp using it | Tobias Grosser | 2011-01-09 | 1 | -2/+7 |
| | | | | | llvm-svn: 123121 | ||||
| * | Fix a bug in r123034 (trying to sext/zext non-integers) and clean up a little. | Frits van Bommel | 2011-01-08 | 1 | -5/+8 |
| | | | | | llvm-svn: 123061 | ||||
| * | InstCombine: Match min/max hidden by sext/zext | Tobias Grosser | 2011-01-07 | 1 | -35/+70 |
| | | | | | | | | | | | | | | | | X = sext x; x >s c ? X : C+1 --> X = sext x; X <s C+1 ? C+1 : X X = sext x; x <s c ? X : C-1 --> X = sext x; X >s C-1 ? C-1 : X X = zext x; x >u c ? X : C+1 --> X = zext x; X <u C+1 ? C+1 : X X = zext x; x <u c ? X : C-1 --> X = zext x; X >u C-1 ? C-1 : X X = sext x; x >u c ? X : C+1 --> X = sext x; X <u C+1 ? C+1 : X X = sext x; x <u c ? X : C-1 --> X = sext x; X >u C-1 ? C-1 : X Instead of calculating this with mixed types promote all to the larger type. This enables scalar evolution to analyze this expression. PR8866 llvm-svn: 123034 | ||||
| * | Some whitespace fixes | Tobias Grosser | 2011-01-07 | 1 | -24/+24 |
| | | | | | llvm-svn: 123033 | ||||
| * | InstCombine: creating selects from -1 and 0 is fine, they combine into a ↵ | Benjamin Kramer | 2010-12-22 | 1 | -3/+6 |
| | | | | | | | sext from i1. llvm-svn: 122453 | ||||
| * | Generalize the and-icmp-select instcombine further by allowing selects of ↵ | Benjamin Kramer | 2010-12-11 | 1 | -4/+22 |
| | | | | | | | | | | | | the form (x & 2^n) ? 2^m+C : C we can offset both arms by C to get the "(x & 2^n) ? 2^m : 0" form, optimize the select to a shift and apply the offset afterwards. llvm-svn: 121609 | ||||
| * | Factor the (x & 2^n) ? 2^m : 0 instcombine into its own method and generalize it | Benjamin Kramer | 2010-12-11 | 1 | -26/+54 |
| | | | | | | | to catch cases where n != m with a shift. llvm-svn: 121608 | ||||
| * | Teach InstCombine not to use Add and Neg on FP. PR 8490. | Dale Johannesen | 2010-10-27 | 1 | -1/+8 |
| | | | | | llvm-svn: 117510 | ||||
| * | Remove the rest of my instcombine changes. Back to the drawing board on ↵ | Owen Anderson | 2010-07-16 | 1 | -28/+0 |
| | | | | | | | this one. llvm-svn: 108530 | ||||
| * | Speculatively revert r108429 to fix the clang self-host. | Owen Anderson | 2010-07-15 | 1 | -0/+28 |
| | | | | | llvm-svn: 108436 | ||||
| * | Per Chris' suggestion, get rid of the select canonicalization and just add | Owen Anderson | 2010-07-15 | 1 | -28/+0 |
| | | | | | | | | | the corresponding or-icmp-and pattern. This has the added benefit of doing the matching earlier, and thus being less susceptible to being confused by earlier transforms. llvm-svn: 108429 | ||||
| * | Reapply r108378, with bugfixes, testcase, and improved comment formatting. | Owen Anderson | 2010-07-15 | 1 | -0/+28 |
| | | | | | | | This now passes LIT, nighty test, and llvm-gcc bootstrap on my machine. llvm-svn: 108422 | ||||
| * | Speculatively revert r108378; may be causing bootstrap failures. | Eli Friedman | 2010-07-15 | 1 | -25/+0 |
| | | | | | llvm-svn: 108389 | ||||
| * | Add instcombine transforms to optimize tests of multiple bits of the same ↵ | Owen Anderson | 2010-07-14 | 1 | -0/+25 |
| | | | | | | | value into a single larger comparison. llvm-svn: 108378 | ||||
| * | Teach instcombine to transform | Benjamin Kramer | 2010-07-08 | 1 | -0/+31 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (X >s -1) ? C1 : C2 and (X <s 0) ? C2 : C1 into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional. This optimization could be extended to take non-const C1 and C2 but we better stay conservative to avoid code size bloat for now. for int sel(int n) { return n >= 0 ? 60 : 100; } we now generate sarl $31, %edi andl $40, %edi leal 60(%rdi), %eax instead of testl %edi, %edi movl $60, %ecx movl $100, %eax cmovnsl %ecx, %eax llvm-svn: 107866 | ||||
| * | move some select simplifications out out instcombine into | Chris Lattner | 2010-04-20 | 1 | -31/+13 |
| | | | | | | | inst simplify. No functionality change. llvm-svn: 101873 | ||||
| * | Don't do (X != Y) ? X : Y -> X for floating-point values; it doesn't | Dan Gohman | 2010-02-23 | 1 | -5/+23 |
| | | | | | | | | | handle NaN properly. Do (X une Y) ? X : Y -> X if one of X and Y is not zero. llvm-svn: 96955 | ||||
| * | Uniformize the names of type predicates: rather than having isFloatTy and | Duncan Sands | 2010-02-15 | 1 | -2/+2 |
| | | | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223 | ||||
| * | change the canonical form of "cond ? -1 : 0" to be | Chris Lattner | 2010-01-24 | 1 | -48/+18 |
| | | | | | | | | | "sext cond" instead of a select. This simplifies some instcombine code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows us to generate better code for a testcase on ppc. llvm-svn: 94339 | ||||
| * | Convert a ton of simple integer type equality tests to the new predicate. | Benjamin Kramer | 2010-01-05 | 1 | -1/+1 |
| | | | | | llvm-svn: 92760 | ||||
| * | clean up header. | Chris Lattner | 2010-01-05 | 1 | -7/+2 |
| | | | | | llvm-svn: 92688 | ||||
| * | split select out to its own file. | Chris Lattner | 2010-01-05 | 1 | -0/+708 |
| llvm-svn: 92687 | |||||

