Commit Graph

59 Commits

Author SHA1 Message Date
Duncan Sands e37b9c0d34 Testcase for PR2160.
llvm-svn: 48655
2008-03-21 20:22:11 +00:00
Daniel Berlin 5fef9aea12 Fix PR 2160 by making sure arguments to external functions get marked as pointing to anything
llvm-svn: 48509
2008-03-18 22:22:53 +00:00
Gabor Greif f77e6977a0 Fix http://llvm.org/bugs/show_bug.cgi?id=2104 by ordering lexicographically what gets printed. Be const-correct in PrintResults and uninline it too
llvm-svn: 47712
2008-02-28 08:38:45 +00:00
Evan Cheng 01d6257e81 Temporarily reverting 46959.
llvm-svn: 47542
2008-02-25 03:57:32 +00:00
Nick Lewycky 1c44ebcf86 Add 'umax' similar to 'smax' SCEV. Closes PR2003.
Parse reversed smax and umax as smin and umin and express them with negative
or binary-not SCEVs (which are really just subtract under the hood).

Parse 'xor %x, -1' as (-1 - %x).

Remove dead code (ConstantInt::get always returns a ConstantInt).

Don't use getIntegerSCEV(-1, Ty). The first value is an int, then it gets
passed into a uint64_t. Instead, create the -1 directly from
ConstantInt::getAllOnesValue().

llvm-svn: 47360
2008-02-20 06:48:22 +00:00
Tanya Lattner f865dcd009 Remove llvm-upgrade.
llvm-svn: 47110
2008-02-14 06:56:27 +00:00
Wojciech Matyjewicz ddb265b905 Now that ScalarEvolution::print writes to the correct stream, there is
no need to redirect stderr into stdout.

llvm-svn: 47009
2008-02-12 15:12:40 +00:00
Wojciech Matyjewicz 995624f44d Change negative grep into positive one in my yesterday's testcase.
llvm-svn: 47008
2008-02-12 15:10:35 +00:00
Wojciech Matyjewicz 1d2c27b23e 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.

llvm-svn: 47007
2008-02-12 15:09:36 +00:00
Wojciech Matyjewicz adae053b53 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).

llvm-svn: 46959
2008-02-11 18:37:34 +00:00
Wojciech Matyjewicz d2d9764cc8 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!

llvm-svn: 46955
2008-02-11 11:03:14 +00:00
Chris Lattner 9104d71269 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.

llvm-svn: 46315
2008-01-24 18:00:32 +00:00
Nick Lewycky 0e519bb555 Accept both %y, %x and %x, %y as valid answers.
llvm-svn: 45649
2008-01-06 03:12:44 +00:00
Chris Lattner 3f42d12072 Fix PR1782, patch by Wojtek Matyjewicz!
llvm-svn: 44733
2007-12-09 07:35:13 +00:00
Tanya Lattner 8f342f8ef3 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)

llvm-svn: 44389
2007-11-28 04:57:00 +00:00
Dan Gohman 2dba0788a5 Change grep '' to grep {}.
Change 2>&1 | to |&.

llvm-svn: 44344
2007-11-27 00:10:35 +00:00
Owen Anderson 4f833c7610 Allow GVN to eliminate read-only function calls when it can detect that they are redundant.
llvm-svn: 44323
2007-11-26 02:26:36 +00:00
Nick Lewycky cdb7e54ca7 Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.
llvm-svn: 44319
2007-11-25 22:41:31 +00:00
Duncan Sands 8a3e9d2bee 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.

llvm-svn: 44288
2007-11-23 19:30:27 +00:00
Duncan Sands 38a5e82ef4 Teach alias analysis about readnone/readonly functions.
Based on a patch by Török Edwin.

llvm-svn: 44279
2007-11-22 21:43:27 +00:00
Nick Lewycky 016547d226 Create nodes for inline asm so that we don't crash looking for the node later.
llvm-svn: 44267
2007-11-22 03:07:37 +00:00
Nick Lewycky 5b18bd3368 Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
llvm-svn: 44248
2007-11-20 08:24:44 +00:00
Anton Korobeynikov 6a7ddfdb8f Reverted r44163 per request
llvm-svn: 44177
2007-11-15 18:33:16 +00:00
Nick Lewycky fbb24817cc 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.

llvm-svn: 44163
2007-11-15 06:30:50 +00:00
Chris Lattner 0fc613b85d Fix PR1774 and BasicAA/2007-11-05-SizeCrash.ll
llvm-svn: 43756
2007-11-06 05:58:42 +00:00
Owen Anderson 7827a3f366 Fix for PR1741.
llvm-svn: 43326
2007-10-25 02:36:18 +00:00
Nick Lewycky 3934961878 Build the correct range for loops with unusual bounds. Fix from Jay Foad.
llvm-svn: 42394
2007-09-27 14:12:54 +00:00
Dan Gohman f9dd170e36 Convert tests using "| wc -l | grep ..." to use the count script.
llvm-svn: 41097
2007-08-15 13:36:28 +00:00
Nick Lewycky 76fb226fd4 Add reference to problem report.
llvm-svn: 40889
2007-08-07 12:27:03 +00:00
Chandler Carruth bebc3bb2e3 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.
llvm-svn: 40872
2007-08-06 20:57:16 +00:00
Nick Lewycky f921f1bc4a Fix the dates on these tests. It's not September yet. Thanks Reid!
llvm-svn: 40869
2007-08-06 20:00:11 +00:00
Nick Lewycky 96606cec20 Let scalar-evolution analyze loops with an unsigned comparison for the exit
condition. Fixes 1597.

llvm-svn: 40867
2007-08-06 19:21:00 +00:00
Nick Lewycky b9819f3a8b Don't assume it's safe to transform a loop just because it's dominated by any
comparison. Fixes bug 1598.

llvm-svn: 40866
2007-08-06 18:33:46 +00:00
Chris Lattner 278c924975 update for new domtree dump format
llvm-svn: 40857
2007-08-06 06:17:08 +00:00
Christopher Lamb 1a80201426 Teach BasicAA about noalias parameter attributes, but do it correctly this time.
llvm-svn: 40711
2007-08-02 01:18:14 +00:00
Christopher Lamb 283152404d Revert overly aggressive interpretation of noalias
llvm-svn: 40635
2007-07-31 16:18:07 +00:00
Devang Patel dd34d91e1a Bunch of tests to check loop passes.
llvm-svn: 40629
2007-07-31 08:04:17 +00:00
Christopher Lamb b08423b36e Teach BasicAA about noalias function parameters. Passes all of DejaGNU and test-suite.
llvm-svn: 40624
2007-07-31 07:04:51 +00:00
Nick Lewycky 5246026c8c Handle decrementing loops properly. Fixes PR1533.
Always pass the constant as the second parameter to HowManyLessThans.

Remove obsolete "isSigned" parameter.

llvm-svn: 39893
2007-07-16 02:08:00 +00:00
John Criswell 2660cef6d7 Convert .cvsignore files
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Zhou Sheng 6d207a761f Add two test cases to cover apintification change.
llvm-svn: 36476
2007-04-26 16:44:48 +00:00
Devang Patel f119698f3f New test case.
llvm-svn: 36293
2007-04-21 00:34:37 +00:00
Devang Patel da48b7dcce New test.
llvm-svn: 36235
2007-04-18 00:51:43 +00:00
Reid Spencer 6e87ec4351 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.

llvm-svn: 36142
2007-04-16 17:36:08 +00:00
Reid Spencer 4dcf8bff4b For PR1319:
Fix syntax of tests to ensure grep pattern is properly quoted.

llvm-svn: 36134
2007-04-16 15:31:49 +00:00
Reid Spencer 86f337eeda For PR1319:
Fix test syntax per new rules.

llvm-svn: 36133
2007-04-16 15:15:52 +00:00
Nick Lewycky 5dff5ed7f7 Fix this test to test what it was intended to test.
llvm-svn: 36072
2007-04-15 13:14:33 +00:00
Reid Spencer 5a77babd81 For PR1319:
Upgrade to use new Tcl exec based test harness.

llvm-svn: 36066
2007-04-15 09:31:07 +00:00
Owen Anderson 5a576160bc Update tests for the disappearance of -idom.
llvm-svn: 36064
2007-04-15 08:54:57 +00:00
Reid Spencer 3fc53d6c53 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.

llvm-svn: 36022
2007-04-14 22:51:29 +00:00