Tanya Lattner
dcd188d33f
Remove llvm-upgrade.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14 06:56:27 +00:00
Wojciech Matyjewicz
52f321f525
Now that ScalarEvolution::print writes to the correct stream, there is
...
no need to redirect stderr into stdout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47009 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12 15:12:40 +00:00
Wojciech Matyjewicz
2a9054cfd6
Change negative grep into positive one in my yesterday's testcase.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12 15:10:35 +00:00
Wojciech Matyjewicz
7b5b76835a
Fix PR2002. Suppose n is the initial value for the induction
...
variable (with step 1) and m is its final value. Then, the correct trip
count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may
overflow and can't in general be interpreted as signed.
Patch by Nick Lewycky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47007 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12 15:09:36 +00:00
Wojciech Matyjewicz
a089b10421
If the LHS of the comparison is a loop-invariant we also want to move it
...
to the RHS. This simple change allows to compute loop iteration count
for loops with condition similar to the one in the testcase (which seems
to be quite common).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46959 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11 18:37:34 +00:00
Wojciech Matyjewicz
e3320a1bcc
Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
...
arbitrary iteration.
The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the
computations (essentially, the division) in BinomialCoefficient() are
performed with the apprioprate bitwidth necessary to avoid overflow;
unsigned division is used instead of the signed one.
Computations in BinomialCoefficient() require support from the code
generator for APInts. Currently, we use a hack rounding up the
neccessary bitwidth to the nearest power of 2. The hack is easy to turn
off in future.
One remaining issue: we assume the divisor of the binomial coefficient
formula can be computed accurately using 16 bits. It means we can handle
AddRecs of length up to 9. In future, we should use APInts to evaluate
the divisor.
Thanks to Nicholas for cooperation!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46955 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11 11:03:14 +00:00
Chris Lattner
fd68750038
Teach basicaa that 'byval' arguments define a new memory location that
...
can't be aliased to other known objects. This allows us to know that byval
pointer args don't alias globals, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46315 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-24 18:00:32 +00:00
Nick Lewycky
e81cd881b1
Accept both %y, %x and %x, %y as valid answers.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45649 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-06 03:12:44 +00:00
Chris Lattner
f88380ba2c
Fix PR1782, patch by Wojtek Matyjewicz!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44733 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09 07:35:13 +00:00
Tanya Lattner
727842e9d7
Fix bug in regression tests that ignored stderr output in RUN lines. Updated tests and fixed broken run lines.
...
XFAILed 3 arm regressions (will file bugs)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44389 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-28 04:57:00 +00:00
Dan Gohman
88e84d1f20
Change grep '' to grep {}.
...
Change 2>&1 | to |&.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44344 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27 00:10:35 +00:00
Owen Anderson
00a6d1448d
Allow GVN to eliminate read-only function calls when it can detect that they are redundant.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44323 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26 02:26:36 +00:00
Nick Lewycky
c54c561c9f
Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44319 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-25 22:41:31 +00:00
Duncan Sands
e4dc717585
Ding dong, the DoesntAccessMemoryFns and
...
OnlyReadsMemoryFns tables are dead! We
get more, and more accurate, information
from gcc via the readnone and readonly
function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44288 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-23 19:30:27 +00:00
Duncan Sands
920653d41e
Teach alias analysis about readnone/readonly functions.
...
Based on a patch by Török Edwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44279 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-22 21:43:27 +00:00
Nick Lewycky
4ac0e8da4a
Create nodes for inline asm so that we don't crash looking for the node later.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44267 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-22 03:07:37 +00:00
Nick Lewycky
cf96db2c1d
Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44248 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-20 08:24:44 +00:00
Anton Korobeynikov
4e1a0e386c
Reverted r44163 per request
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44177 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 18:33:16 +00:00
Nick Lewycky
65e2da3b4d
Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEV
...
is disabled in the sense that it will refuse to create one from a UDiv
instruction, until the code is better tested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44163 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15 06:30:50 +00:00
Chris Lattner
9907cb12ae
Fix PR1774 and BasicAA/2007-11-05-SizeCrash.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43756 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-06 05:58:42 +00:00
Owen Anderson
f92ff03f71
Fix for PR1741.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43326 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 02:36:18 +00:00
Nick Lewycky
9a2f93121b
Build the correct range for loops with unusual bounds. Fix from Jay Foad.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42394 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 14:12:54 +00:00
Dan Gohman
28beeeac4d
Convert tests using "| wc -l | grep ..." to use the count script.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41097 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-15 13:36:28 +00:00
Nick Lewycky
f48a88054a
Add reference to problem report.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40889 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 12:27:03 +00:00
Chandler Carruth
a583990ec8
This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 20:57:16 +00:00
Nick Lewycky
450770de65
Fix the dates on these tests. It's not September yet. Thanks Reid!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40869 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 20:00:11 +00:00
Nick Lewycky
d6dac0eebc
Let scalar-evolution analyze loops with an unsigned comparison for the exit
...
condition. Fixes 1597.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40867 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 19:21:00 +00:00
Nick Lewycky
06323bfe03
Don't assume it's safe to transform a loop just because it's dominated by any
...
comparison. Fixes bug 1598.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 18:33:46 +00:00
Chris Lattner
947596c351
update for new domtree dump format
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40857 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 06:17:08 +00:00
Christopher Lamb
406bfa3e21
Teach BasicAA about noalias parameter attributes, but do it correctly this time.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40711 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 01:18:14 +00:00
Christopher Lamb
321ff4e6d5
Revert overly aggressive interpretation of noalias
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40635 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 16:18:07 +00:00
Devang Patel
fee0a9c7ef
Bunch of tests to check loop passes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40629 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 08:04:17 +00:00
Christopher Lamb
50192c2152
Teach BasicAA about noalias function parameters. Passes all of DejaGNU and test-suite.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40624 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 07:04:51 +00:00
Nick Lewycky
eefdebe002
Handle decrementing loops properly. Fixes PR1533.
...
Always pass the constant as the second parameter to HowManyLessThans.
Remove obsolete "isSigned" parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 02:08:00 +00:00
John Criswell
e644ef7b09
Convert .cvsignore files
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 16:35:07 +00:00
Zhou Sheng
fc24a72d9e
Add two test cases to cover apintification change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-26 16:44:48 +00:00
Devang Patel
4fc82a6e43
New test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 00:34:37 +00:00
Devang Patel
7d87c1476a
New test.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36235 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-18 00:51:43 +00:00
Reid Spencer
eb1d74e0c8
For PR1319:
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36142 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 17:36:08 +00:00
Reid Spencer
43b40035ba
For PR1319:
...
Fix syntax of tests to ensure grep pattern is properly quoted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36134 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 15:31:49 +00:00
Reid Spencer
4cda190ef5
For PR1319:
...
Fix test syntax per new rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36133 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 15:15:52 +00:00
Nick Lewycky
c3c65d0905
Fix this test to test what it was intended to test.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36072 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 13:14:33 +00:00
Reid Spencer
b477f7dd65
For PR1319:
...
Upgrade to use new Tcl exec based test harness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36066 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 09:31:07 +00:00
Owen Anderson
e9bbaa2293
Update tests for the disappearance of -idom.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 08:54:57 +00:00
Reid Spencer
78fb2acea2
Changes to fix problems with "make check". Apparently you can redefine
...
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 22:51:29 +00:00
Reid Spencer
4b3fd6c010
Convert test cases to new llvm.exp version of llvm_runtest and fix tests
...
that it found to be broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36009 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 19:27:03 +00:00
Reid Spencer
6f254906c5
For PR1319:
...
Convert to use new llvm.exp version of llvm_testrun
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 19:10:21 +00:00
Reid Spencer
0f5aed5648
Make the llvm-runtest function much more amenable by eliminating all the
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 19:56:59 +00:00
Nick Lewycky
27dcbe5f87
Fix this testcase to fail if the bug were reintroduced.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 21:49:13 +00:00
Owen Anderson
cd4abb7e6d
Remove DomSet completely. This concludes work on PR1171.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35775 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 21:30:05 +00:00