summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopStrengthReduce
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix recent regression in gcc.dg/pr26719.c (6835035).Dale Johannesen2009-04-291-0/+43
| | | | llvm-svn: 70386
* Teach getZeroExtendExpr and getSignExtendExpr to use trip-countDan Gohman2009-04-271-4/+6
| | | | | | | | | | | | | | | | | information to simplify [sz]ext({a,+,b}) to {zext(a),+,[zs]ext(b)}, as appropriate. These functions and the trip count code each call into the other, so this requires careful handling to avoid infinite recursion. During the initial trip count computation, conservative SCEVs are used, which are subsequently discarded once the trip count is actually known. Among other benefits, this change lets LSR automatically eliminate some unnecessary zext-inreg and sext-inreg operation where the operand is an induction variable. llvm-svn: 70241
* Testcase for PR2537.Owen Anderson2009-04-231-0/+21
| | | | llvm-svn: 69866
* Add testcase from PR3086.Owen Anderson2009-04-231-0/+28
| | | | llvm-svn: 69862
* Implement "superhero" strength reduction, or full strengthDan Gohman2009-02-201-1/+1
| | | | | | | | | | | | | | | | | reduction of address calculations down to basic pointer arithmetic. This is currently off by default, as it needs a few other features before it becomes generally useful. And even when enabled, full strength reduction is only performed when it doesn't increase register pressure, and when several other conditions are true. This also factors out a bunch of exisiting LSR code out of StrengthReduceStridedIVUsers into separate functions, and tidies up IV insertion. This actually decreases register pressure even in non-superhero mode. The change in iv-users-in-other-loops.ll is an example of this; there are two more adds because there are two fewer leas, and there is less spilling. llvm-svn: 65108
* Strengthen the "non-constant stride must dominate loop preheader" check.Evan Cheng2009-02-171-0/+32
| | | | llvm-svn: 64703
* Fix pr3571: If stride is a value defined by an instruction, make sure it ↵Evan Cheng2009-02-151-0/+27
| | | | | | dominates the loop preheader. When IV users are strength reduced, the stride is inserted into the preheader. It could create a use before def situation. llvm-svn: 64579
* Fix PR 3471, and some cleanups.Dale Johannesen2009-02-091-0/+33
| | | | llvm-svn: 64177
* Fix the time regression I introduced in 464.h264ref withDale Johannesen2009-01-141-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my earlier patch to this file. The issue there was that all uses of an IV inside a loop are actually references to Base[IV*2], and there was one use outside that was the same but LSR didn't see the base or the scaling because it didn't recurse into uses outside the loop; thus, it used base+IV*scale mode inside the loop instead of pulling base out of the loop. This was extra bad because register pressure later forced both base and IV into memory. Doing that recursion, at least enough to figure out addressing modes, is a good idea in general; the change in AddUsersIfInteresting does this. However, there were side effects.... It is also possible for recursing outside the loop to introduce another IV where there was only 1 before (if the refs inside are not scaled and the ref outside is). I don't think this is a common case, but it's in the testsuite. It is right to be very aggressive about getting rid of such introduced IVs (CheckForIVReuse and the handling of nonzero RewriteFactor in StrengthReduceStridedIVUsers). In the testcase in question the new IV produced this way has both a nonconstant stride and a nonzero base, neither of which was handled before. And when inserting new code that feeds into a PHI, it's right to put such code at the original location rather than in the PHI's immediate predecessor(s) when the original location is outside the loop (a case that couldn't happen before) (RewriteInstructionToUseNewBase); better to avoid making multiple copies of it in this case. Also, the mechanism for keeping SCEV's corresponding to GEP's no longer works, as the GEP might change after its SCEV is remembered, invalidating the SCEV, and we might get a bad SCEV value when looking up the GEP again for a later loop. This also couldn't happen before, as we weren't recursing into GEP's outside the loop. Also, when we build an expression that involves a (possibly non-affine) IV from a different loop as well as an IV from the one we're interested in (containsAddRecFromDifferentLoop), don't recurse into that. We can't do much with it and will get in trouble if we try to create new non-affine IVs or something. More testcases are coming. llvm-svn: 62212
* Remove. Devang Patel2008-09-091-58/+0
| | | | llvm-svn: 56018
* fix overflow check.Devang Patel2008-09-091-0/+48
| | | | llvm-svn: 56011
* xfailDevang Patel2008-09-081-0/+1
| | | | llvm-svn: 55914
* Check iteration count.Devang Patel2008-09-031-1/+1
| | | | llvm-svn: 55680
* If all IV uses are extending integer IV then change the type of IV itself, ↵Devang Patel2008-09-021-0/+57
| | | | | | if possible. llvm-svn: 55674
* If IV is used in a int-to-float cast inside the loop then try to eliminate ↵Devang Patel2008-08-261-1/+0
| | | | | | the cast operation. llvm-svn: 55374
* XFAIL this test for now.Bill Wendling2008-08-181-0/+1
| | | | llvm-svn: 54929
* Didn't mean to change this.Evan Cheng2008-08-171-0/+99
| | | | llvm-svn: 54904
* Fix a (u)comiss intrinsic lowering bug. It was using anyext which can return ↵Evan Cheng2008-08-171-99/+0
| | | | | | junk in higher bits. Patch by Nate Begeman. llvm-svn: 54903
* Reapply 54786. Add overflow and number of mantissa bits checks.Devang Patel2008-08-151-0/+99
| | | | llvm-svn: 54821
* Revert 54786. It's not checking for overflows, etc.Evan Cheng2008-08-151-27/+0
| | | | llvm-svn: 54813
* If IV is used in a int-to-float cast inside the loop then try to eliminate ↵Devang Patel2008-08-141-0/+27
| | | | | | the cast opeation. llvm-svn: 54786
* Check sign to detect overflow before changing compare stride.Devang Patel2008-08-131-0/+31
| | | | llvm-svn: 54710
* PR2535, not PR2355.Evan Cheng2008-08-061-1/+1
| | | | llvm-svn: 54416
* Fix PR2355: bug in ChangeCompareStride. When the loop termination compare is ↵Evan Cheng2008-08-061-0/+24
| | | | | | the only use of its iv stride, the stride can be eliminated by moving it to another stride. If the scale is negative, swap the predicate instead of using a inverse predicate. llvm-svn: 54415
* Add the PR number to the test.Dan Gohman2008-07-211-0/+2
| | | | llvm-svn: 53880
* Fix a bug in LSR's dead-PHI cleanup. If a PHI has a def-use chain thatDan Gohman2008-07-211-0/+285
| | | | | | | | | leads into a cycle involving a different PHI, LSR got stuck running around that cycle looking for the original PHI. To avoid this, keep track of visited PHIs and stop searching if we see one more than once. This fixes PR2570. llvm-svn: 53879
* Improve LSR's dead-phi detection to handle use-def cyclesDan Gohman2008-06-221-0/+21
| | | | | | with more than two nodes. llvm-svn: 52617
* Refine the change in r52258 for avoiding use-before-def conditionsDan Gohman2008-06-162-3/+31
| | | | | | | | | when changing the stride of a comparison so that it's slightly more precise, by having it scan the instruction list to determine if there is a use of the condition after the point where the condition will be inserted. llvm-svn: 52371
* Protect ChangeCompareStride from situations in which it is possibleDan Gohman2008-06-131-0/+20
| | | | | | for it to generate use-before-def IR, such as in this testcase. llvm-svn: 52258
* sabre brings to my attention that the 'tr' suffix is also obsoleteGabor Greif2008-05-201-1/+1
| | | | llvm-svn: 51349
* Rename the last test with .llx extension to .ll, resolve duplicate test by ↵Gabor Greif2008-05-201-1/+1
| | | | | | renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too. llvm-svn: 51328
* Update old-style syntax in some "not grep" tests.Dan Gohman2008-05-011-1/+1
| | | | llvm-svn: 50560
* Upgrade tests.Tanya Lattner2008-03-1920-391/+337
| | | | llvm-svn: 48538
* Convert tests using "| wc -l | grep ..." to use the count script.Dan Gohman2007-08-154-4/+4
| | | | llvm-svn: 41097
* Convert .cvsignore filesJohn Criswell2007-06-291-3/+0
| | | | llvm-svn: 37801
* New test.Devang Patel2007-04-231-0/+71
| | | | llvm-svn: 36379
* For PR1319:Reid Spencer2007-04-161-1/+0
| | | | | | | | Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. llvm-svn: 36142
* For PR1319:Reid Spencer2007-04-163-3/+5
| | | | | | Fix syntax of tests to ensure grep pattern is properly quoted. llvm-svn: 36134
* For PR1319:Reid Spencer2007-04-155-9/+13
| | | | | | Upgrade to use new Tcl exec based test harness. llvm-svn: 36062
* Make the llvm-runtest function much more amenable by eliminating all theReid Spencer2007-04-111-1/+1
| | | | | | | | global variables that needed to be passed in. This makes it possible to add new global variables with only a couple changes (Makefile and llvm-dg.exp) instead of touching every single dg.exp file. llvm-svn: 35918
* Regression is gone, don't try to find it on clean target.Reid Spencer2007-01-1722-0/+616
llvm-svn: 33296
OpenPOWER on IntegriCloud