Dan Gohman
3b7ba5f35b
Teach BasicAA how to analyze Select instructions, and make it more
...
aggressive on PHI instructions.
llvm-svn: 85158
2009-10-26 21:55:43 +00:00
Chris Lattner
1353518b6c
fix test
...
llvm-svn: 84405
2009-10-18 05:03:00 +00:00
Chris Lattner
d2b3a4f7b8
tighten up test3, add test3a for the converse
...
transform, which isn't happening yet.
llvm-svn: 84402
2009-10-18 04:55:26 +00:00
Chris Lattner
457ecd5dab
tighten test2, add a test that it doesn't get transformed in the invalid edge case.
...
llvm-svn: 84401
2009-10-18 04:50:18 +00:00
Nick Lewycky
ecb832fd93
Merge tests into modref.ll. Also add a test for r84174 at Chris' behest!
...
llvm-svn: 84400
2009-10-18 04:41:36 +00:00
Nick Lewycky
91ea404e98
Add a couple new testcases.
...
llvm-svn: 84385
2009-10-18 00:42:07 +00:00
Chris Lattner
ec411e9199
replace a useless test with a useful one
...
llvm-svn: 84383
2009-10-17 23:59:51 +00:00
Nick Lewycky
f01ba005a7
Make use of the result of the loads even though that means adding -instcombine.
...
llvm-svn: 84125
2009-10-14 19:02:13 +00:00
Evan Cheng
c1eed9d120
Another BasicAA fix. If a value does not alias a GEP's base pointer, then it
...
cannot alias the GEP. GEP pointer alias rule states this clearly:
A pointer value formed from a getelementptr instruction is associated with the
addresses associated with the first operand of the getelementptr.
llvm-svn: 84079
2009-10-14 06:41:49 +00:00
Evan Cheng
c745bf2d87
Replace test with a simpler hand crafted one.
...
llvm-svn: 84069
2009-10-14 01:45:10 +00:00
Evan Cheng
c10e88db22
Teach basic AA about PHI nodes. If all operands of a phi NoAlias another value than it's safe to declare the PHI NoAlias the value. Ditto for MustAlias.
...
llvm-svn: 84038
2009-10-13 22:02:20 +00:00
Chris Lattner
faa0320f27
don't use dead loads as tests.
...
llvm-svn: 83985
2009-10-13 17:39:29 +00:00
Nick Lewycky
e2782c7614
Teach BasicAA a little something about the atomic intrinsics: they can only
...
modify through the pointer they're given.
llvm-svn: 83959
2009-10-13 07:48:38 +00:00
Dan Gohman
0f3ef7be50
Eliminate more redundant llvm-as calls.
...
llvm-svn: 81540
2009-09-11 18:17:12 +00:00
Dan Gohman
1880092722
Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
...
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
2009-09-11 18:01:28 +00:00
Dan Gohman
c8054d90fb
Eliminate more uses of llvm-as and llvm-dis.
...
llvm-svn: 81293
2009-09-09 00:09:15 +00:00
Dan Gohman
4f2527cd6d
Convert a few more opt | llvm-dis to opt -S.
...
llvm-svn: 81261
2009-09-08 22:41:33 +00:00
Dan Gohman
72a13d2476
Use opt -S instead of piping bitcode output through llvm-dis.
...
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman
9737a63ed8
Change these tests to feed the assembly files to opt directly, instead
...
of using llvm-as, now that opt supports this.
llvm-svn: 81226
2009-09-08 16:50:01 +00:00
Chris Lattner
2d3e0a35bd
rename test so that name reflects what it is testing for.
...
llvm-svn: 80519
2009-08-30 21:36:39 +00:00
Chris Lattner
c7d5796af8
convert to filecheck format.
...
llvm-svn: 80518
2009-08-30 21:36:06 +00:00
Dan Gohman
776e4c8d35
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
Chris Lattner
d35d43dde8
change this to test for an alias result more directly.
...
llvm-svn: 67046
2009-03-16 18:28:27 +00:00
Nick Lewycky
8e0f9ac051
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
a18c768e6d
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
Nick Lewycky
c60bd012bc
BasicAA was making the assumption that a local allocation which hadn't escaped
...
couldn't ever be the return of call instruction. However, it's quite possible
that said local allocation is itself the return of a function call. That's
what malloc and calloc are for, actually.
llvm-svn: 64442
2009-02-13 07:06:27 +00:00
Owen Anderson
1caf7fef8e
Finish making AliasAnalysis aware of the fact that most atomic intrinsics only dereference their arguments, and enhance
...
BasicAA to make use of this fact when computing ModRef info.
llvm-svn: 63718
2009-02-04 05:16:46 +00:00
Nick Lewycky
2abb108f1b
Resubmit support for the 'nocapture' attribute.
...
The problematic part of this patch is that we were out of attribute bits,
requiring some fancy bit hacking to make it fit (by shrinking alignment)
without breaking existing users or the file format.
This change will require users to rebuild llvm-gcc to match llvm.
llvm-svn: 61239
2008-12-19 06:39:12 +00:00
Bill Wendling
e38c7400c9
Remove empty test.
...
llvm-svn: 61095
2008-12-16 19:07:17 +00:00
Bill Wendling
a397baea88
Temporarily revert r61019, r61030, and r61040. These were breaking LLVM Release
...
builds.
llvm-svn: 61094
2008-12-16 19:06:48 +00:00
Chris Lattner
e3401db1f3
Teach basicaa to use the nocapture attribute when possible. When the
...
intrinsics are properly marked nocapture, the fixme should be addressed.
llvm-svn: 61040
2008-12-15 18:59:22 +00:00
Chris Lattner
2e84a548d6
Allow basicaa to walk through geps with identical indices in
...
parallel, allowing it to decide that P/Q must alias if A/B
must alias in things like:
P = gep A, 0, i, 1
Q = gep B, 0, i, 1
This allows GVN to delete 62 more instructions out of 403.gcc.
llvm-svn: 60820
2008-12-10 01:04:47 +00:00
Nick Lewycky
f5ffcbcd0b
Extend the 'noalias' attribute to function return values. This is intended to
...
indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).
No changes to the bitcode reader/writer, asm printer or verifier were needed.
llvm-svn: 59934
2008-11-24 03:41:24 +00:00
Owen Anderson
2a6adfa4f0
Remove GCSE and LoadVN from the testsuite.
...
llvm-svn: 54832
2008-08-16 00:00:54 +00:00
Chris Lattner
b35d9b5e07
If we are checking to see if the result of a call aliases a
...
pointer derived from a local allocation, if the local allocation
never escapes, the pointers can't alias. This implements PR2436
llvm-svn: 52301
2008-06-16 06:19:11 +00:00
Matthijs Kooijman
d66e18aaf6
Suppress the (stderr) output of -aa-eval, this fixes 5 tests.
...
llvm-svn: 52173
2008-06-10 12:39:15 +00:00
Wojciech Matyjewicz
416867a81b
Fixes PR2395. Looking for a constant in a GEP tail (when the first GEP
...
is longer than the second one) should stop after finding one. Added break
instruction guarantees it. It also changes difference between offsets to
absolute value of this difference in the condition.
llvm-svn: 51875
2008-06-02 17:26:12 +00:00
Gabor Greif
1e427c3264
sabre brings to my attention that the 'tr' suffix is also obsolete
...
llvm-svn: 51349
2008-05-20 21:00:03 +00:00
Gabor Greif
f45ff35bfe
Rename the last test with .llx extension to .ll, resolve duplicate test by 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
2008-05-20 19:52:04 +00:00
Owen Anderson
a74d72d01f
Fix this test. It was testing broken behavior in that it required ADCE to eliminate
...
a potentially infinite loop, which is undesirable. Instead, test the LICM behavior
that we're really interested in.
llvm-svn: 51177
2008-05-16 04:25:09 +00:00
Chris Lattner
b839c05a05
rename *.llx -> *.ll, last batch.
...
llvm-svn: 49971
2008-04-19 22:32:52 +00:00
Owen Anderson
f9ae76d89c
Make GVN able to remove unnecessary calls to read-only functions again.
...
llvm-svn: 49842
2008-04-17 05:36:50 +00:00
Dale Johannesen
8fc8a272e0
Don't assume a tail call can't reference a byval
...
argument to the outer function, this isn't correct.
llvm-svn: 49731
2008-04-15 17:41:34 +00:00
Owen Anderson
b1e8bf2cad
The functionality being tested was removed because it was horribly unsafe.
...
llvm-svn: 49610
2008-04-13 09:51:06 +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
Tanya Lattner
f865dcd009
Remove llvm-upgrade.
...
llvm-svn: 47110
2008-02-14 06:56:27 +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