Rafael Espindola
7161661863
Move the loads after the calls so that the fix for
...
PR10292 doesn't show that the loads don't alias
the allocas.
llvm-svn: 134852
2011-07-09 23:53:58 +00:00
Rafael Espindola
7fbab4dcc7
Use CHECK-NEXT.
...
llvm-svn: 134850
2011-07-09 22:56:50 +00:00
Chris Lattner
8936d2bfbc
Remove support for parsing the "type i32" syntax for defining a numbered
...
top level type without a specified number. This syntax isn't documented
and blocks forward progress.
llvm-svn: 133371
2011-06-19 00:03:46 +00:00
Chris Lattner
80ed9dc9e5
rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which is
...
for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the
target indep prefetch change.
As usual, updating the testsuite is a PITA.
llvm-svn: 133337
2011-06-18 06:05:24 +00:00
Chris Lattner
5756c16cdf
make the asmparser reject function and type redefinitions. 'Merging' hasn't been
...
needed since llvm-gcc 3.4 days.
llvm-svn: 133248
2011-06-17 07:06:44 +00:00
Chris Lattner
def1949c00
Remove support for using "foo" as symbols instead of %"foo". This is ancient
...
syntax and has been long obsolete. As usual, updating the tests is the nasty
part of this.
llvm-svn: 133242
2011-06-17 06:36:20 +00:00
Chris Lattner
b90ed2233c
manually upgrade a bunch of tests to modern syntax, and remove some that
...
are either unreduced or only test old syntax.
llvm-svn: 133228
2011-06-17 03:14:27 +00:00
John McCall
51fbfc928c
Test case for r132797.
...
llvm-svn: 132962
2011-06-14 03:02:05 +00:00
Dan Gohman
adf80ae9e4
Reapply r131781, now that the GVN bug with partially-aliasing loads
...
is disabled.
llvm-svn: 132632
2011-06-04 06:50:18 +00:00
Dan Gohman
43efe1c8bd
Remove this test, which should have been reverted along with r131781.
...
llvm-svn: 132628
2011-06-04 06:21:23 +00:00
Dan Gohman
87fdceaf73
Revert r131781 again. Apparently there is more going on here.
...
llvm-svn: 132625
2011-06-04 05:11:22 +00:00
Dan Gohman
27b82f2f91
Reapply r131781 (revert r131809), now that some BasicAA shortcomings
...
it exposed are fixed.
llvm-svn: 132611
2011-06-04 00:46:31 +00:00
Dan Gohman
fb02cec44e
Fix BasicAA's recursion detection so that it doesn't pessimize
...
queries in the case of a DAG, where a query reaches a node
visited earlier, but it's not on a cycle. This avoids
MayAlias results in cases where BasicAA is expected to
return MustAlias or PartialAlias in order to protect TBAA.
llvm-svn: 132609
2011-06-04 00:31:50 +00:00
Dan Gohman
4e7e7958d7
When merging MustAlias and PartialAlias, chose PartialAlias instead
...
of conservatively choosing MayAlias.
llvm-svn: 132579
2011-06-03 20:17:36 +00:00
Dan Gohman
0573b55c2b
Make DecomposeGEPExpression check SimplifyInstruction only
...
after checking for a GEP, so that it matches what GetUnderlyingObject
does. This fixes an obscure bug turned up by bugpoint in the testcase
for PR9931.
llvm-svn: 131971
2011-05-24 18:24:08 +00:00
Chris Lattner
408cfef6f0
I missed a checking with my GVN change.
...
llvm-svn: 131851
2011-05-22 07:20:02 +00:00
Duncan Sands
5ec65765e6
Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.
...
Original log message:
When BasicAA can determine that two pointers have the same base but
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.
llvm-svn: 131809
2011-05-21 20:54:46 +00:00
Dan Gohman
8b20187c82
When BasicAA can determine that two pointers have the same base but
...
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.
llvm-svn: 131781
2011-05-21 01:05:08 +00:00
Dan Gohman
5394c70d1e
Teach BasicAA about arm.neon.vld1 and vst1.
...
llvm-svn: 130327
2011-04-27 20:44:28 +00:00
Dan Gohman
39b3a1ef7f
When analyzing functions known to only access argument pointees,
...
only check arguments with pointer types. Update the documentation
of IntrReadArgMem reflect this.
While here, add support for TBAA tags on intrinsic calls.
llvm-svn: 130317
2011-04-27 18:39:03 +00:00
Andrew Trick
01eff820ae
Test case and comment for PR9633.
...
llvm-svn: 130294
2011-04-27 05:42:17 +00:00
Benjamin Kramer
ba446cc12a
Make tests more useful.
...
lit needs a linter ...
llvm-svn: 130126
2011-04-25 10:12:01 +00:00
Eli Friedman
c5f22a7815
PR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoad
...
is equivalent to any other relevant value; it isn't true in general.
If it is equivalent, the LoopPromoter will tell the AST the equivalence.
Also, delete the PreheaderLoad if it is unused.
Chris, since you were the last one to make major changes here, can you check
that this is sane?
llvm-svn: 129049
2011-04-07 01:35:06 +00:00
Chris Lattner
57ee5a5db7
remove postdom frontiers, because it is dead. Forward dom frontiers are
...
still used by RegionInfo :(
llvm-svn: 128943
2011-04-05 21:57:17 +00:00
Anders Carlsson
c4f0ab397c
Revert r128140 for now.
...
llvm-svn: 128149
2011-03-23 15:51:12 +00:00
Anders Carlsson
9ed8d93f55
A global variable with internal linkage where all uses are in one function and whose address is never taken is a non-escaping local object and can't alias anything else.
...
llvm-svn: 128140
2011-03-23 02:19:48 +00:00
Andrew Trick
f6b01ff422
Propagate SCEV no-wrap flags whenever possible.
...
This needs review.
llvm-svn: 127638
2011-03-15 00:37:00 +00:00
Andrew Trick
2afa325811
When SCEV can determine the loop test is X < X, set ExactBECount=0.
...
When ExactBECount is a constant, use it for MaxBECount.
When MaxBECount cannot be computed, replace it with ExactBECount.
Fixes PR9424.
llvm-svn: 127342
2011-03-09 17:29:58 +00:00
Chris Lattner
4f23f2be15
teach SCEV that the scale and addition of an inbounds gep don't NSW.
...
This fixes a FIXME in scev-aa.ll (allowing a new no-alias result) and
generally makes things more precise.
llvm-svn: 125449
2011-02-13 03:14:49 +00:00
Chris Lattner
7936a8a488
Per discussion with Dan G, inbounds geps *certainly* can have
...
unsigned overflow (e.g. "gep P, -1"), and while they can have
signed wrap in theoretical situations, modelling an AddRec as
not having signed wrap is going enough for any case we can
think of today. In the future if this isn't enough, we can
revisit this. Modeling them as having NUW isn't causing any
known problems either FWIW.
llvm-svn: 125410
2011-02-11 21:43:33 +00:00
Dan Gohman
4deda530c2
Add another rdar number.
...
llvm-svn: 124125
2011-01-24 17:54:01 +00:00
Nick Lewycky
d4192f71b5
Simplify some code with no functionality change. Make the test a lot more
...
robust against smarter optimizations, using the power of FileCheck.
llvm-svn: 124081
2011-01-23 20:06:05 +00:00
Nick Lewycky
bc98f5b78e
Use value ranges to fold ext(trunc) in SCEV when possible.
...
llvm-svn: 124062
2011-01-23 06:20:19 +00:00
Tobias Grosser
f07426b40d
Implement requiredTransitive
...
The PassManager did not implement the transitivity of requiredTransitive. This
was unnoticed since 2006.
llvm-svn: 123942
2011-01-20 21:03:22 +00:00
Nick Lewycky
5c901f3489
Similarly, analyze truncate through multiply.
...
llvm-svn: 123842
2011-01-19 18:56:00 +00:00
Nick Lewycky
5143f0f09b
Add a missed SCEV fold that is required to continue analyzing the IR produced
...
by indvars through the scev expander.
trunc(add x, y) --> add(trunc x, y). Currently SCEV largely folds the other way
which is probably wrong, but preserved to minimize churn. Instcombine doesn't
do this fold either, demonstrating a missed optz'n opportunity on code doing
add+trunc+add.
llvm-svn: 123838
2011-01-19 16:59:46 +00:00
Nick Lewycky
e9ea75e3fc
Add a missing SCEV simplification sext(zext x) --> zext x.
...
llvm-svn: 123832
2011-01-19 15:56:12 +00:00
Dan Gohman
44da55b7be
Teach BasicAA to return PartialAlias in cases where both pointers
...
are pointing to the same object, one pointer is accessing the entire
object, and the other is access has a non-zero size. This prevents
TBAA from kicking in and saying NoAlias in such cases.
llvm-svn: 123775
2011-01-18 21:16:06 +00:00
Eric Christopher
31bb4c5811
Revert the testcase from the previous reverted commit.
...
llvm-svn: 123227
2011-01-11 09:20:44 +00:00
Chris Lattner
1032965cbe
add a testcase I missed in previous commit.
...
llvm-svn: 123143
2011-01-09 23:52:31 +00:00
Chris Lattner
10223a3fbf
teach SCEV analysis of PHI nodes that PHI recurences formed
...
with GEP instructions are always NUW, because PHIs cannot wrap
the end of the address space.
llvm-svn: 123105
2011-01-09 02:28:48 +00:00
Chris Lattner
a337f5ec5c
reduce indentation. Print <nuw> and <nsw> when dumping SCEV AddRec's
...
that have the bit set.
llvm-svn: 123104
2011-01-09 02:16:18 +00:00
Chris Lattner
16e42128c2
fix rdar://8813415 - a miscompilation of 164.gzip that loop-idiom
...
exposed. It turns out to be a latent bug in basicaa, scary.
llvm-svn: 122772
2011-01-03 21:03:33 +00:00
Chris Lattner
12fa3c6a94
filecheckize
...
llvm-svn: 122771
2011-01-03 21:01:26 +00:00
Dan Gohman
189508c4c5
-enable-tbaa is on by default now.
...
llvm-svn: 121945
2010-12-16 02:53:48 +00:00
Dan Gohman
e1a17a3473
Make memcpyopt TBAA-aware.
...
llvm-svn: 121944
2010-12-16 02:51:19 +00:00
Duncan Sands
0a2c416894
Move Sub simplifications and additional Add simplifications out of
...
instcombine and into InstructionSimplify.
llvm-svn: 121861
2010-12-15 14:07:39 +00:00
Dan Gohman
c4bf5cac9f
Reapply r121520, PartialAlias implementation for BasicAA, now that
...
memdep is updated to handle it.
llvm-svn: 121725
2010-12-13 22:50:24 +00:00
Dan Gohman
39de62348f
Revert r121520, which may have introduced miscompilations.
...
llvm-svn: 121573
2010-12-10 21:48:28 +00:00
Dan Gohman
041f74e762
Implement PartialAlias checking in BasicAA.
...
llvm-svn: 121520
2010-12-10 20:47:03 +00:00