| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Fix a regression in a patch from a couple of days ago. This fixes | Chris Lattner | 2006-02-28 | 1 | -1/+3 | 
| | | | | | | | Transforms/InstCombine/2006-02-28-Crash.ll llvm-svn: 26427 | ||||
| * | Implement rem.ll:test[7-9] and PR712 | Chris Lattner | 2006-02-28 | 1 | -6/+22 | 
| | | | | | llvm-svn: 26415 | ||||
| * | Simplify some code now that the RHS of a rem can't be 0 | Chris Lattner | 2006-02-28 | 1 | -8/+6 | 
| | | | | | llvm-svn: 26413 | ||||
| * | Rearrange some code, fold "rem X, 0", implementing rem.ll:test6 | Chris Lattner | 2006-02-28 | 1 | -38/+39 | 
| | | | | | llvm-svn: 26411 | ||||
| * | Merge two almost-identical pieces of code. | Chris Lattner | 2006-02-27 | 1 | -46/+42 | 
| | | | | | | | | | | | | | | | | Make this code more powerful by using ComputeMaskedBits instead of looking for an AND operand. This lets us fold this: int %test23(int %a) { %tmp.1 = and int %a, 1 %tmp.2 = seteq int %tmp.1, 0 %tmp.3 = cast bool %tmp.2 to int ;; xor tmp1, 1 ret int %tmp.3 } into: xor (and a, 1), 1 llvm-svn: 26396 | ||||
| * | Fold (A^B) == A -> B == 0 | Chris Lattner | 2006-02-27 | 1 | -0/+26 | 
| | | | | | | | and (A-B) == A -> B == 0 llvm-svn: 26394 | ||||
| * | Fold (X|C1)^C2 -> X^(C1|C2) when possible. This implements | Chris Lattner | 2006-02-26 | 1 | -0/+14 | 
| | | | | | | | InstCombine/or.ll:test23. llvm-svn: 26385 | ||||
| * | Fix a problem that Nate noticed that boils down to an over conservative check | Chris Lattner | 2006-02-24 | 1 | -22/+17 | 
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the code that does "select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y)))". We now compile this loop: LBB1_1: ; no_exit add r6, r2, r3 subf r3, r2, r3 cmpwi cr0, r2, 0 addi r7, r5, 4 lwz r2, 0(r5) addi r4, r4, 1 blt cr0, LBB1_4 ; no_exit LBB1_3: ; no_exit mr r3, r6 LBB1_4: ; no_exit cmpwi cr0, r4, 16 mr r5, r7 bne cr0, LBB1_1 ; no_exit into this instead: LBB1_1: ; no_exit srawi r6, r2, 31 add r2, r2, r6 xor r6, r2, r6 addi r7, r5, 4 lwz r2, 0(r5) addi r4, r4, 1 add r3, r3, r6 cmpwi cr0, r4, 16 mr r5, r7 bne cr0, LBB1_1 ; no_exit llvm-svn: 26356 | ||||
| * | Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which | Chris Lattner | 2006-02-22 | 1 | -1/+3 | 
| | | | | | | | | | | caused SPASS to fail building last night. We can't trivially unswitch a loop if the exit block has phi nodes in it, because we don't know which predecessor to use. llvm-svn: 26320 | ||||
| * | Add some comments, simplify some code, and fix a bug that caused rewriting | Chris Lattner | 2006-02-22 | 1 | -34/+26 | 
| | | | | | | | to rewrite with the wrong value. llvm-svn: 26311 | ||||
| * | improved support for branch folding, still not enabled. | Chris Lattner | 2006-02-18 | 1 | -143/+269 | 
| | | | | | llvm-svn: 26289 | ||||
| * | Fix bugs identified by VC++. | Jeff Cohen | 2006-02-18 | 1 | -2/+2 | 
| | | | | | llvm-svn: 26287 | ||||
| * | Implement deletion of dead blocks, currently disabled. | Chris Lattner | 2006-02-18 | 1 | -28/+75 | 
| | | | | | llvm-svn: 26285 | ||||
| * | a previous patch completely disabled trivial unswitching, this fixees it. | Chris Lattner | 2006-02-18 | 1 | -1/+0 | 
| | | | | | | | Thanks to nate for pointing this out :) llvm-svn: 26280 | ||||
| * | initial trivial support for folding branches that have now-constant ↵ | Chris Lattner | 2006-02-18 | 1 | -3/+34 | 
| | | | | | | | destinations. llvm-svn: 26279 | ||||
| * | When unswitching a loop, make sure to update loop info with exit blocks in | Chris Lattner | 2006-02-18 | 1 | -2/+4 | 
| | | | | | | | the right loop. llvm-svn: 26277 | ||||
| * | Fix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll | Chris Lattner | 2006-02-18 | 1 | -2/+8 | 
| | | | | | llvm-svn: 26275 | ||||
| * | Fix loops where the header has an exit, fixing a loop-unswitch crash on crafty | Chris Lattner | 2006-02-17 | 1 | -13/+15 | 
| | | | | | llvm-svn: 26258 | ||||
| * | start of some new simplification code, not thoroughly tested, use at your own | Chris Lattner | 2006-02-17 | 1 | -14/+161 | 
| | | | | | | | risk :) llvm-svn: 26248 | ||||
| * | Rework the SelectionDAG-based implementations of SimplifyDemandedBits | Nate Begeman | 2006-02-16 | 1 | -3/+3 | 
| | | | | | | | | and ComputeMaskedBits to match the new improved versions in instcombine. Tested against all of multisource/benchmarks on ppc. llvm-svn: 26238 | ||||
| * | Change SplitBlock to increment a BasicBlock::iterator, not an Instruction*. ↵ | Chris Lattner | 2006-02-16 | 1 | -23/+27 | 
| | | | | | | | | | | | | Apparently they do different things :) This fixes a testcase that nate reduced from spass. Also included are a couple minor code changes that don't affect the generated code at all. llvm-svn: 26235 | ||||
| * | Fix VC++ warning. | Jeff Cohen | 2006-02-16 | 1 | -1/+0 | 
| | | | | | llvm-svn: 26228 | ||||
| * | fix a bug where we unswitched the wrong way | Chris Lattner | 2006-02-16 | 1 | -2/+2 | 
| | | | | | llvm-svn: 26225 | ||||
| * | Implement trivial unswitching for switch stmts. This allows us to trivial | Chris Lattner | 2006-02-15 | 1 | -27/+51 | 
| | | | | | | | | | | | | | | | | | | | unswitch this loop on 2 before sweating to unswitch on 1/3. void test4(int N, int i, int C, int*P, int*Q) { int j; for (j = 0; j < N; ++j) { switch (C) { // general unswitching. default: P[i+j] = 0; break; case 1: Q[i+j] = 0; break; case 3: P[i+j] = Q[i+j]; break; case 2: break; // TRIVIAL UNSWITCH on C==2 } } } llvm-svn: 26223 | ||||
| * | make "trivial" unswitching significantly more general. It can now handle | Chris Lattner | 2006-02-15 | 1 | -47/+79 | 
| | | | | | | | | | | | | | | this for example: for (j = 0; j < N; ++j) { // trivial unswitch if (C) P[i+j] = 0; } turning it into the obvious code without bothering to duplicate an empty loop. llvm-svn: 26220 | ||||
| * | fix a bunch of alpha regressions. see bug 709 | Andrew Lenharth | 2006-02-15 | 1 | -6/+6 | 
| | | | | | llvm-svn: 26218 | ||||
| * | Checking the wrong value. This caused us to emit silly code like | Chris Lattner | 2006-02-15 | 1 | -1/+1 | 
| | | | | | | | | Y = seteq bool X, true instead of just using X :) llvm-svn: 26215 | ||||
| * | more refactoring, no functionality change. | Chris Lattner | 2006-02-15 | 1 | -12/+11 | 
| | | | | | llvm-svn: 26194 | ||||
| * | pull some code out into a function | Chris Lattner | 2006-02-15 | 1 | -18/+28 | 
| | | | | | llvm-svn: 26191 | ||||
| * | Canonicalize inner loops before outer loops. Inner loop canonicalization | Chris Lattner | 2006-02-14 | 1 | -4/+5 | 
| | | | | | | | | | can provide work for the outer loop to canonicalize. This fixes a case that breaks unswitching. llvm-svn: 26189 | ||||
| * | When splitting exit edges to canonicalize loops, make sure to put the new | Chris Lattner | 2006-02-14 | 1 | -18/+20 | 
| | | | | | | | | | block in the appropriate loop nest. Third time is the charm, right? llvm-svn: 26187 | ||||
| * | Use statistics to keep track of what flavors of loops we are unswitching | Chris Lattner | 2006-02-14 | 1 | -7/+19 | 
| | | | | | llvm-svn: 26157 | ||||
| * | Implement Instcombine/and.ll:test34 | Chris Lattner | 2006-02-13 | 1 | -0/+12 | 
| | | | | | llvm-svn: 26155 | ||||
| * | If any of the sign extended bits are demanded, the input sign bit is demanded | Chris Lattner | 2006-02-13 | 1 | -3/+9 | 
| | | | | | | | | | for a sign extension. This fixes InstCombine/2006-02-13-DemandedMiscompile.ll and Ptrdist/bc. llvm-svn: 26152 | ||||
| * | Be careful not to request or look at bits shifted in from outside the size | Chris Lattner | 2006-02-13 | 1 | -3/+9 | 
| | | | | | | | of the input. This fixes the mediabench/gsm/toast failure last night. llvm-svn: 26138 | ||||
| * | remove some more dead special case code | Chris Lattner | 2006-02-12 | 1 | -35/+8 | 
| | | | | | llvm-svn: 26135 | ||||
| * | Eliminate special case hacks that are superceded by general purpose hacks | Chris Lattner | 2006-02-12 | 1 | -139/+51 | 
| | | | | | llvm-svn: 26134 | ||||
| * | Three changes: | Chris Lattner | 2006-02-12 | 1 | -6/+135 | 
| | | | | | | | | | | | | | 1. Teach GetConstantInType to handle boolean constants. 2. Teach instcombine to fold (compare X, CST) when X has known 0/1 bits. Testcase here: set.ll:test22 3. Improve the "(X >> c1) & C2 == 0" folding code to allow a noop cast between the shift and and. More aggressive bitfolding for other reasons was turning signed shr's into unsigned shr's, leaving the noop cast in the way. llvm-svn: 26131 | ||||
| * | Revert my last patch. It too breaks stuff | Chris Lattner | 2006-02-12 | 1 | -12/+6 | 
| | | | | | llvm-svn: 26128 | ||||
| * | Fix for my previously reverted patch | Chris Lattner | 2006-02-11 | 1 | -6/+12 | 
| | | | | | llvm-svn: 26126 | ||||
| * | Port the recent innovations in ComputeMaskedBits to SimplifyDemandedBits. | Chris Lattner | 2006-02-11 | 1 | -211/+425 | 
| | | | | | | | | | | | | This allows us to simplify on conditions where bits are not known, but they are not demanded either! This also fixes a couple of bugs in ComputeMaskedBits that were exposed during this work. In the future, swaths of instcombine should be removed, as this code subsumes a bunch of ad-hockery. llvm-svn: 26122 | ||||
| * | revert my previous change, it exposed other problems. | Chris Lattner | 2006-02-11 | 1 | -1/+1 | 
| | | | | | llvm-svn: 26121 | ||||
| * | Make this check stricter. Disallow loop exit blocks from being shared by | Chris Lattner | 2006-02-11 | 1 | -4/+7 | 
| | | | | | | | loops and their subloops. llvm-svn: 26118 | ||||
| * | remove dead expr | Chris Lattner | 2006-02-11 | 1 | -1/+0 | 
| | | | | | llvm-svn: 26116 | ||||
| * | implement unswitching of loops with switch stmts and selects in them | Chris Lattner | 2006-02-11 | 1 | -94/+135 | 
| | | | | | llvm-svn: 26114 | ||||
| * | Update PHI nodes in successors of exit blocks. | Chris Lattner | 2006-02-10 | 1 | -5/+34 | 
| | | | | | llvm-svn: 26113 | ||||
| * | Reform the unswitching code in terms of edge splitting, not block splitting. | Chris Lattner | 2006-02-10 | 1 | -49/+67 | 
| | | | | | llvm-svn: 26112 | ||||
| * | Fix a case where UnswitchTrivialCondition broke critical edges with | Chris Lattner | 2006-02-10 | 1 | -1/+24 | 
| | | | | | | | phi's in the successors llvm-svn: 26108 | ||||
| * | add some notes, move some code around. Implement unswitching of loops | Chris Lattner | 2006-02-10 | 1 | -19/+64 | 
| | | | | | | | with branches on partially invariant computations. llvm-svn: 26104 | ||||
| * | Move code around to be more logical, no functionality change. | Chris Lattner | 2006-02-10 | 1 | -26/+32 | 
| | | | | | llvm-svn: 26103 | ||||

