summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/IndVarSimplify
Commit message (Collapse)AuthorAgeFilesLines
...
* indvars: incremental fixes for -disable-iv-rewrite and testcases.Andrew Trick2011-05-261-1/+66
| | | | | | | | Use a proper worklist for use-def traversal without holding onto an iterator. Now that we process all IV uses, we need complete logic for resusing existing derived IV defs. See HoistStep. llvm-svn: 132103
* indvars: fixed IV cloning in -disable-iv-rewrite mode with associatedAndrew Trick2011-05-252-0/+216
| | | | | | cleanup and overdue test cases. llvm-svn: 132038
* FileCheck-ize a couple of IV unit tests.Andrew Trick2011-05-242-7/+13
| | | | llvm-svn: 131946
* Test case for r130799 - indvars: Added canExpandBackEdgeTakenCount.Andrew Trick2011-05-241-1/+5
| | | | llvm-svn: 131939
* Fixes PR9730: indvars: An asserting value handle still pointed to this valueAndrew Trick2011-04-271-5/+6
| | | | | | | | | Modified LinearFunctionTestReplace to push the condition on the dead list instead of eagerly deleting it. This can cause unnecessary IV rewrites, which should have no effect on codegen and will not be an issue once we stop generating canonical IVs. llvm-svn: 130340
* Avoid creating canonical induction variables for non-native types.Andrew Trick2011-03-1813-13/+13
| | | | | | | | For example, on 32-bit architecture, don't promote all uses of the IV to 64-bits just because one use is a 64-bit cast. Alternate implementation of the patch by Arnaud de Grandmaison. llvm-svn: 127884
* Remove LoopIndexSplit pass. It is neither maintained nor used by anyone.Devang Patel2010-10-071-33/+0
| | | | llvm-svn: 116004
* more test cleanupChris Lattner2010-09-021-24/+0
| | | | llvm-svn: 112892
* Print the number of uses of a function in the .ll since it can be informativeDuncan Sands2010-09-021-2/+1
| | | | | | and there seems to be no reason not to. llvm-svn: 112812
* Correct bogus module triple specifications.Duncan Sands2010-08-302-2/+2
| | | | llvm-svn: 112469
* Fix SCEVExpander::visitAddRecExpr so that it remembers the induction variableDan Gohman2010-07-261-0/+36
| | | | | | | | it inserted rather than using LoopInfo::getCanonicalInductionVariable to rediscover it, since that doesn't work on non-canonical loops. This fixes infinite recurrsion on such loops; PR7562. llvm-svn: 109419
* Fix this test.Dan Gohman2010-07-161-1/+1
| | | | llvm-svn: 108491
* Fix the order that SCEVExpander considers add operands in so thatDan Gohman2010-07-151-0/+40
| | | | | | | it doesn't miss an opportunity to form a GEP, regardless of the relative loop depths of the operands. This fixes rdar://8197217. llvm-svn: 108475
* Fix ScalarEvolution's tripcount computation for chains of loopsDan Gohman2010-06-291-2/+64
| | | | | | | where each loop's induction variable's start value is the exit value of a preceding loop. llvm-svn: 107224
* Disable indvars on loops when LoopSimplify form is not available.Dan Gohman2010-06-181-1/+18
| | | | | | This fixes PR7333. llvm-svn: 106267
* Remove arm_apcscc from the test files. It is the default and doing thisRafael Espindola2010-06-171-1/+1
| | | | | | matches what llvm-gcc and clang now produce. llvm-svn: 106221
* Remove the Expr member from IVUsers. Instead of remembering the expression,Dan Gohman2010-04-191-0/+24
| | | | | | | just ask ScalarEvolution for it on demand. This helps IVUsers be more robust in the case of expressions changing underneath it. This fixes PR6862. llvm-svn: 101819
* Fix declarations in a few more tests.Nick Lewycky2010-04-171-1/+1
| | | | llvm-svn: 101676
* Teach ScalarEvolution to simplify smax and umax when it can proveDan Gohman2010-04-131-0/+52
| | | | | | that one operand is always greater than another. llvm-svn: 101142
* Teach IndVarSimplify how to eliminate remainder operators where theDan Gohman2010-04-131-0/+121
| | | | | | | | | | | | numerator is an induction variable. For example, with code like this: for (i=0;i<n;++i) x[i%n] = 0; IndVarSimplify will now recognize that i is always less than n inside the loop, and eliminate the remainder. llvm-svn: 101113
* Suppress LinearFunctionTestReplace when the computed backedge-takenDan Gohman2010-04-121-0/+162
| | | | | | | | | | | | expression is a UDiv and it doesn't appear that the UDiv came from the user's source. ScalarEvolution has recently figured out how to compute a tripcount expression for the inner loop in SingleSource/Benchmarks/Shootout/sieve.c, using a udiv. Emitting a udiv instruction dramatically slows down the enclosing loop. llvm-svn: 101068
* Re-apply r101000, with a fix: Don't eliminate an icmp which is part ofDan Gohman2010-04-121-0/+84
| | | | | | | | the loop exit test. This usually doesn't come up for a variety of reasons, but it isn't impossible, so make IndVarSimplify handle it conservatively. llvm-svn: 101008
* Revert 101000, which is breaking self-host builds.Dan Gohman2010-04-121-40/+0
| | | | llvm-svn: 101002
* Teach IndVarSimplify how to eliminate comparisons involving inductionDan Gohman2010-04-111-0/+40
| | | | | | | | | | | | | variables. For example, with code like this: for (i=0;i<n;++i) if (i<n) x[i] = 0; IndVarSimplify will now recognize that i is always less than n inside the loop, and eliminate the if. llvm-svn: 101000
* add newlines at the end of files.Chris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100705
* add integer overflow check for the fp induction variable Chris Lattner2010-04-031-4/+4
| | | | | | | | | | | | checker. Amusingly, we already had tests that we should have rejects because they would be miscompiled in the testsuite. The remaining issue with this is that we don't check that the branch causes us to exit the loop if it fails, so we don't actually know if we remain in bounds. llvm-svn: 100284
* fix PR6761, a miscompilation due to the fp->int IV conversionChris Lattner2010-04-031-4/+23
| | | | | | stuff. More bugs remain though. llvm-svn: 100282
* convert to filecheckChris Lattner2010-04-031-5/+13
| | | | llvm-svn: 100281
* rename feature test.Chris Lattner2010-04-031-0/+0
| | | | llvm-svn: 100279
* actually just remove this, will move the real feature test here.Chris Lattner2010-04-031-35/+0
| | | | llvm-svn: 100278
* rename test since it is a feature test.Chris Lattner2010-04-031-0/+0
| | | | llvm-svn: 100277
* first half of a pass through IndVarSimplify::HandleFloatingPointIV,Chris Lattner2010-04-031-0/+19
| | | | | | | | this cleans up a bunch of code and also fixes several crashes and miscompiles. More to come unfortunately, this optimization is quite broken. llvm-svn: 100270
* Manually notify ScalarEvolution before making an operand replacement, sinceDan Gohman2010-04-021-0/+41
| | | | | | it can't currently observe such changes automatically. llvm-svn: 100186
* Make LoopSimplify change conditional branches in loop exiting blocksDan Gohman2010-02-251-1/+1
| | | | | | | | | | | | which branch on undef to branch on a boolean constant for the edge exiting the loop. This helps ScalarEvolution compute trip counts for loops. Teach ScalarEvolution to recognize single-value PHIs, when safe, and ForgetSymbolicName to forget such single-value PHI nodes as apprpriate in ForgetSymbolicName. llvm-svn: 97126
* Teach ScalarEvolution how to compute a tripcount for a loop withDan Gohman2010-02-198-12/+12
| | | | | | | | true or false as its exit condition. These are usually eliminated by SimplifyCFG, but the may be left around during a pass which wishes to preserve the CFG. llvm-svn: 96683
* Reapply the new LoopStrengthReduction code, with compile time andDan Gohman2010-02-121-1/+1
| | | | | | | | | | bug fixes, and with improved heuristics for analyzing foreign-loop addrecs. This change also flattens IVUsers, eliminating the stride-oriented groupings, which makes it easier to work with. llvm-svn: 95975
* -disable-output is no longer needed with -analyze.Dan Gohman2010-01-261-1/+1
| | | | llvm-svn: 94574
* Re-implement the main strength-reduction portion of LoopStrengthReduction.Dan Gohman2010-01-211-2/+3
| | | | | | | | | | | | | | This new version is much more aggressive about doing "full" reduction in cases where it reduces register pressure, and also more aggressive about rewriting induction variables to count down (or up) to zero when doing so reduces register pressure. It currently uses fairly simplistic algorithms for finding reuse opportunities, but it introduces a new framework allows it to combine multiple strategies at once to form hybrid solutions, instead of doing all full-reduction or all base+index. llvm-svn: 94061
* Use WriteAsOperand instead of getName() to print loop header names,Dan Gohman2010-01-091-1/+1
| | | | | | so that unnamed blocks are handled. llvm-svn: 93059
* Move this test from test/Transforms/IndVarSimplify toDan Gohman2010-01-051-19/+0
| | | | | | | test/CodeGen/X86, as doesn't use -indvars, and it does use llc -march=x86-64. llvm-svn: 92799
* Make getUniqueExitBlocks's precondition assert more precise, toDan Gohman2009-12-111-0/+22
| | | | | | avoid spurious failures. This fixes PR5758. llvm-svn: 91147
* Make opt default to not adding a target data string and update tests that ↵Kenneth Uildriks2009-11-032-0/+2
| | | | | | depend on target data to supply it within the test llvm-svn: 85900
* Add a testcase for r83011.Dan Gohman2009-09-281-0/+38
| | | | llvm-svn: 83012
* Fix a case where ScalarEvolution was expanding pointer arithmeticDan Gohman2009-09-261-0/+41
| | | | | | to inttoptr/ptrtoint unnecessarily. llvm-svn: 82864
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-1178-80/+80
| | | | | | | | 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 "opt %s" so that opt doesn't print the testDan Gohman2009-09-081-1/+1
| | | | | | filename in the output, which interferes with the tests' grep lines. llvm-svn: 81263
* Convert a few more opt | llvm-dis to opt -S.Dan Gohman2009-09-082-2/+2
| | | | llvm-svn: 81261
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-0843-45/+45
| | | | llvm-svn: 81257
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-0882-85/+85
| | | | | | of using llvm-as, now that opt supports this. llvm-svn: 81226
* Eliminate uses of %prcontext.Daniel Dunbar2009-09-051-1/+3
| | | | | | | - I'd appreciate it if someone else eyeballs my changes to make sure I captured the intent of the test. llvm-svn: 81083
OpenPOWER on IntegriCloud