Andreas Neustifter
fb55ceecf3
Removed profiling test, lli not available on all platforms.
...
llvm-svn: 79633
2009-08-21 15:27:35 +00:00
Andreas Neustifter
b11ab6b931
Added tests for Profiling Infrastructure.
...
llvm-svn: 79615
2009-08-21 09:36:28 +00:00
Dan Gohman
7965c57a0f
Loosen up the regex for this test so that it doesn't implicitly
...
depend on TargetData information.
llvm-svn: 79491
2009-08-19 23:19:36 +00:00
Dan Gohman
9f80d2be6b
Make LLVM Assembly dramatically easier to read by aligning the comments,
...
using formatted_raw_ostream's PadToColumn.
Before:
bb1: ; preds = %bb
%2 = sext i32 %i.01 to i64 ; <i64> [#uses=1]
%3 = getelementptr double* %p, i64 %2 ; <double*> [#uses=1]
%4 = load double* %3, align 8 ; <double> [#uses=1]
%5 = fmul double %4, 1.100000e+00 ; <double> [#uses=1]
%6 = sext i32 %i.01 to i64 ; <i64> [#uses=1]
%7 = getelementptr double* %p, i64 %6 ; <double*> [#uses=1]
After:
bb1: ; preds = %bb
%2 = sext i32 %i.01 to i64 ; <i64> [#uses=1]
%3 = getelementptr double* %p, i64 %2 ; <double*> [#uses=1]
%4 = load double* %3, align 8 ; <double> [#uses=1]
%5 = fmul double %4, 1.100000e+00 ; <double> [#uses=1]
%6 = sext i32 %i.01 to i64 ; <i64> [#uses=1]
%7 = getelementptr double* %p, i64 %6 ; <double*> [#uses=1]
Several tests required whitespace adjustments.
llvm-svn: 78816
2009-08-12 17:23:50 +00:00
Andreas Bolka
facd1be2d6
Add another Strong-SIV testcase.
...
llvm-svn: 78446
2009-08-08 00:21:49 +00:00
Andreas Bolka
8c032970b9
Fix Strong-SIV testcase.
...
llvm-svn: 78384
2009-08-07 15:42:32 +00:00
Andreas Bolka
4d59f26912
ZIV tester for LDA.
...
llvm-svn: 78157
2009-08-05 04:26:05 +00:00
Andreas Bolka
1532dc3110
Fix LDA testcases.
...
llvm-svn: 78153
2009-08-05 04:03:29 +00:00
Andreas Bolka
d713824363
Expand LDA testcases.
...
llvm-svn: 77926
2009-08-02 23:28:14 +00:00
Andreas Bolka
7d6b4c24e6
Slightly reformat LDA tests to ease grepping.
...
llvm-svn: 77398
2009-07-28 23:40:40 +00:00
Dan Gohman
39c0d3b10a
Change the assembly syntax for nsw, nuw, and exact, putting them
...
after their associated opcodes rather than before. This makes them
a little easier to read.
llvm-svn: 77194
2009-07-27 16:11:46 +00:00
Dan Gohman
c126330ef1
When attempting to sign-extend an addrec by interpreting
...
the step value as unsigned, the start value and the addrec
itself still need to be treated as signed.
llvm-svn: 77078
2009-07-25 16:03:30 +00:00
Dan Gohman
13aabe2ba4
Teach ScalarEvolution to make use of no-overflow flags when
...
analyzing add recurrences.
llvm-svn: 77034
2009-07-25 01:22:26 +00:00
Andreas Bolka
fa70ad653b
FileCheck'ize and expand LDA testcases.
...
llvm-svn: 76880
2009-07-23 15:56:53 +00:00
Dan Gohman
190d29cb5c
Replace the original ad-hoc code for determining whether (v pred w) implies
...
(x pred y) with more thorough code that does more complete canonicalization
before resorting to range checks. This helps it find more cases where
the canonicalized expressions match.
llvm-svn: 76671
2009-07-21 23:03:19 +00:00
Dan Gohman
7a836d6400
Add a testcase for PR4569, which is now fixed.
...
llvm-svn: 76526
2009-07-21 00:50:52 +00:00
Torok Edwin
bbccd95874
Introduce a pointertracking pass.
...
For now this only computes the allocated size of the memory pointed to by a
pointer, and offset a pointer from allocated pointer.
The actual checkLimits part will come later, after another round of review.
llvm-svn: 75657
2009-07-14 18:44:28 +00:00
Dan Gohman
5d53d0b73b
Add testcases for PR4538, PR4537, and PR4534.
...
llvm-svn: 75533
2009-07-13 22:30:31 +00:00
Nick Lewycky
d9573d899d
When comparing constants, consider a less wide constant to be "less complex"
...
than a wider one, before trying to compare their contents which will crash
if their sizes are different.
llvm-svn: 74792
2009-07-04 17:24:52 +00:00
Andreas Bolka
71ef361d1d
Array accesses are independent if the underlying arrays differ.
...
llvm-svn: 74499
2009-06-30 02:12:10 +00:00
Andreas Bolka
bed5622fb7
Print pairwise dependence results, add testcases.
...
llvm-svn: 74402
2009-06-28 00:35:22 +00:00
Dan Gohman
60844e20f0
Add a testcase demoing some of ScalarEvolution's new trip count logic.
...
llvm-svn: 74049
2009-06-24 01:22:30 +00:00
Dan Gohman
058143a236
Fix a bug in the trip-count computation with And/Or. If either of the
...
sides is CouldNotCompute, the resulting exact count must be CouldNotCompute.
llvm-svn: 73920
2009-06-22 23:28:56 +00:00
Dan Gohman
b85ac02513
Fix llvm::ComputeNumSignBits to handle pointer types
...
conservatively correctly, instead of aborting.
llvm-svn: 73908
2009-06-22 22:02:32 +00:00
Dan Gohman
db7860aa40
Teach ScalarEvolution how to analyze loops with multiple exit
...
blocks, and also exit blocks with multiple conditions (combined
with (bitwise) ands and ors). It's often infeasible to compute an
exact trip count in such cases, but a useful upper bound can often
be found.
llvm-svn: 73866
2009-06-22 00:31:57 +00:00
Dan Gohman
eb0a67278b
Fix ScalarEvolution's backedge-taken count computations to check for
...
overflow when computing a integer division to round up.
Thanks to Nick Lewycky for noticing this!
llvm-svn: 73862
2009-06-21 23:46:38 +00:00
Dan Gohman
e72fd546a2
Teach ScalarEvolution how to recognize another xor(and(x, C), C) case.
...
If C is a single bit and the and gets analyzed as a truncate and
zero-extend, the xor can be represnted as an add.
llvm-svn: 73664
2009-06-18 00:00:20 +00:00
Dan Gohman
50b7d0d843
Add -disable-output to a bunch of tests that don't care about the output.
...
llvm-svn: 73633
2009-06-17 20:56:26 +00:00
Dan Gohman
473789f75a
Fix ScalarEvolution's Xor handling to not assume that an And
...
that gets recognized with a SCEVZeroExtendExpr must be an And
with a low-bits mask. With r73540, this is no longer the case.
llvm-svn: 73594
2009-06-17 01:22:39 +00:00
Dan Gohman
5f6f8101d5
Split the Add, Sub, and Mul instruction opcodes into separate
...
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.
For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.
This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt
llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Dan Gohman
5dd6f54a5f
Teach BasicAliasAnalysis to understand constant gep indices that fall
...
beyond their associated static array type.
I believe that this fixes a legitimate bug, because BasicAliasAnalysis
already has code to check for this condition that works for non-constant
indices, however it was missing the case of constant indices. With this
change, it checks for both.
This fixes PR4267, and miscompiles of SPEC 188.ammp and 464.h264.href.
llvm-svn: 72451
2009-05-27 01:48:27 +00:00
Dan Gohman
592d65ba06
Teach ScalarEvolution to recognize x^-1 in the case where non-demanded
...
bits have been stripped out by instcombine.
llvm-svn: 72010
2009-05-18 16:29:04 +00:00
Dan Gohman
2c9bd7e0cb
Make ScalarEvolution::isLoopGuardedByCond work even when the edge
...
entering a loop is a non-split critical edge.
llvm-svn: 72004
2009-05-18 15:36:09 +00:00
Dan Gohman
904f081ce7
Add nounwind to a few tests.
...
llvm-svn: 72002
2009-05-18 15:16:49 +00:00
Eli Friedman
aec1764402
Allow scalar evolution to compute iteration counts for loops with a
...
pointer-based condition. This fixes PR3171.
llvm-svn: 71354
2009-05-09 12:32:42 +00:00
Dan Gohman
141989d3c2
Fix bogus overflow checks by replacing them with actual
...
overflow checks.
llvm-svn: 71284
2009-05-08 23:11:16 +00:00
Dan Gohman
603f022049
Fold trunc casts into add-recurrence expressions, allowing the
...
add-recurrence to be exposed. Add a new SCEV folding rule to
help simplify expressions in the presence of these extra truncs.
llvm-svn: 71264
2009-05-08 21:03:19 +00:00
Dan Gohman
0dc2b769b0
When printing a SCEVUnknown with pointer type, don't print an
...
artificial "ptrtoint", as it tends to clutter up complicated
expressions. The cast operators now print both source and
destination types, which is usually sufficient.
llvm-svn: 70554
2009-05-01 17:02:22 +00:00
Dan Gohman
3c9f4f765c
Extend ScalarEvolution's getBackedgeTakenCount to be able to
...
compute an upper-bound value for the trip count, in addition to
the actual trip count. Use this to allow getZeroExtendExpr and
getSignExtendExpr to fold casts in more cases.
This may eventually morph into a more general value-range
analysis capability; there are certainly plenty of places where
more complete value-range information would allow more folding.
llvm-svn: 70509
2009-04-30 20:47:05 +00:00
Dan Gohman
06aff30f01
Generalize the cast-of-addrec folding to handle folding of SCEVs like
...
(sext i8 {-128,+,1} to i64) to i64 {-128,+,1}, where the iteration
crosses from negative to positive, but is still safe if the trip
count is within range.
llvm-svn: 70421
2009-04-29 22:28:28 +00:00
Dan Gohman
9fa631c81a
Fix this test to match the new output from scalar-evolution.
...
llvm-svn: 70410
2009-04-29 21:06:20 +00:00
Dan Gohman
55befacc69
Include the source type in SCEV cast expression debug output, and
...
print sext, zext, and trunc, instead of signextend, zeroextend,
and truncate, respectively, for consistency with the main IR.
llvm-svn: 70405
2009-04-29 20:27:52 +00:00
Dan Gohman
211c5de27d
Fix a grammaro in a comment.
...
llvm-svn: 70331
2009-04-28 21:54:23 +00:00
Nick Lewycky
32cfba44df
Simplify trunc(extend(x)) in SCEVs, just for completeness. Also fix some odd
...
whitespace in the same file.
llvm-svn: 69870
2009-04-23 05:15:08 +00:00
Owen Anderson
0c0498a365
Testcase for PR3909.
...
llvm-svn: 69868
2009-04-23 04:33:42 +00:00
Dan Gohman
19990f2310
When turning (ashr(shl(x, n), n)) into sext(trunc(x)), the width of the
...
type to truncate to should be the number of bits of the value that are
preserved, not the number that are clobbered with sign-extension.
This fixes regressions in ldecod.
llvm-svn: 69704
2009-04-21 20:18:36 +00:00
Chris Lattner
f8afc9ecda
change this to test for an alias result more directly.
...
llvm-svn: 67046
2009-03-16 18:28:27 +00:00
Nick Lewycky
d271c19fea
Add a replacement for 2009-02-12-GEPNoalias.ll that works without -debug.
...
llvm-svn: 67011
2009-03-14 19:40:09 +00:00
Chris Lattner
5972bc6234
remove a buggy test, it is not ok to use -debug in RUN line.
...
llvm-svn: 66918
2009-03-13 18:19:34 +00:00
Dan Gohman
06c6037d9f
Update this test for the LoopInfo::print changes.
...
llvm-svn: 65597
2009-02-27 00:17:49 +00:00