Eli Friedman
bda9e7af58
Upgrade a couple more tests to the new atomic instructions.
...
llvm-svn: 140558
2011-09-26 20:15:56 +00:00
Eli Friedman
f9b785f185
PR10987: add a missed safety check to isSafePHIToSpeculate in scalarrepl.
...
llvm-svn: 140327
2011-09-22 18:56:30 +00:00
Eli Friedman
1815b688cc
Make sure IPSCCP never marks a tracked call as overdefined in SCCPSolver::ResolvedUndefsIn. If we do, we can end up in a situation where a function is resolved to return a constant, but the caller is marked overdefined, which confuses the code later.
...
<rdar://problem/9956541> (again).
llvm-svn: 140210
2011-09-20 23:28:51 +00:00
Bill Wendling
cf1372d183
Update this test to the new EH model.
...
Though I think it may be obsolete with the loop extract changes. And I couldn't
get the old version of LLVM to compile so that I could reduce this testcase.
llvm-svn: 140197
2011-09-20 22:29:43 +00:00
Bill Wendling
626a6f4160
Update to new EH model.
...
llvm-svn: 140177
2011-09-20 20:21:16 +00:00
Bill Wendling
708d38e06a
Update to the new EH syntax.
...
llvm-svn: 140103
2011-09-19 23:50:34 +00:00
Bill Wendling
ff5d9cc389
Dramatically reduce this testcase.
...
llvm-svn: 140101
2011-09-19 23:47:06 +00:00
Bill Wendling
7cdaa3a1a8
Revert r140083 and r140084 until buildbots can be fixed.
...
llvm-svn: 140094
2011-09-19 23:30:41 +00:00
Bill Wendling
d01aee587f
Update test to remove the 'unwind' instruction.
...
llvm-svn: 140084
2011-09-19 23:01:11 +00:00
Bill Wendling
8bf0eab34d
Replace uses of unwind with unreachable for the same effect.
...
llvm-svn: 140077
2011-09-19 22:16:15 +00:00
Bill Wendling
e7b02b8170
Replace more uses of 'unwind' in the tests with calls to landingpad and
...
resume. Note that some of these tests were basically dead.
llvm-svn: 140076
2011-09-19 22:11:35 +00:00
Eli Friedman
61d7c8a065
Fix an infinite loop where a transform in InstCombiner::visitAnd claims a construct is changed when it is not. (See included testcase.)
...
Patch by Xiaoyi Guo.
llvm-svn: 140072
2011-09-19 21:58:15 +00:00
Bill Wendling
c945f54ea5
This testcase is dead. It doesn't inline even if I add the 'alwaysinline'
...
attribute to the @foo function.
llvm-svn: 140067
2011-09-19 21:14:33 +00:00
Andrew Trick
7251e41b16
[indvars] Fix PR10946: SCEV cannot handle Vector IVs.
...
llvm-svn: 140026
2011-09-19 17:54:39 +00:00
Andrew Trick
74111ee07f
Reapply r139759. Disable IV rewriting by default. See PR10916.
...
llvm-svn: 139842
2011-09-15 20:58:37 +00:00
Eli Friedman
888bea0b95
Make demanded-elt simplification for shufflevector slightly stronger. Spotted by inspection.
...
llvm-svn: 139768
2011-09-15 01:14:29 +00:00
Dan Gohman
d4b5e3a4d9
objc_retainBlock is not NoModRef because it can update forwarding pointers
...
in memory relevant to the optimizer. rdar://10050579.
llvm-svn: 139708
2011-09-14 18:13:00 +00:00
Andrew Trick
f9f68b816b
[indvars] Revert r139579 until 401.bzip -arch i386 miscompilation is fixed. PR10920.
...
llvm-svn: 139583
2011-09-13 05:23:49 +00:00
Andrew Trick
061d811c51
Disable IV rewriting by default. See PR10916.
...
llvm-svn: 139579
2011-09-13 03:23:21 +00:00
Andrew Trick
5b28cc84f0
Generalize test case to handle multiple indvars modes.
...
llvm-svn: 139578
2011-09-13 03:17:25 +00:00
Andrew Trick
3de5b8e4c1
[indvars] Fix bugs in floating point IV range checks noticed by inspection.
...
llvm-svn: 139574
2011-09-13 01:59:32 +00:00
Andrew Trick
54a109845d
Conditionalize indvars test that relies on SCEV expansion of geps,
...
which is only relevant with canonical IVs
llvm-svn: 139556
2011-09-12 23:13:57 +00:00
Andrew Trick
a8315c3f2b
indvars test only relevant for -enable-iv-rewrite.
...
Otherwise this case is now covered by no-iv-rewrite.ll.
llvm-svn: 139552
2011-09-12 22:59:00 +00:00
Andrew Trick
d2e61e1f70
Conditionalize indvars tests that rely on SCEV expansion of geps,
...
which is relevant with canonical IVs. Anything else being checked by
these tests is already covered by early CSE.
llvm-svn: 139535
2011-09-12 20:26:34 +00:00
Andrew Trick
30e8db98b8
Removing indvars tests that directly test canonical IVs and nothing else.
...
llvm-svn: 139518
2011-09-12 18:33:08 +00:00
Andrew Trick
183013d8d4
Rename -disable-iv-rewrite to -enable-iv-rewrite=false in preparation for default change.
...
llvm-svn: 139517
2011-09-12 18:28:44 +00:00
Andrew Trick
8c6fb3af6e
Test case for r139453, WidenIV::GetExtendedOperandRecurrence.
...
llvm-svn: 139504
2011-09-12 17:20:57 +00:00
Duncan Sands
ba60b04148
Mark the eh.typeid.for intrinsic as being 'const', which it is inside
...
any given function. As pointed out by John McCall, this is needed to
have redundant eh.typeid.for tests be eliminated in the presence of
cleanups.
llvm-svn: 139360
2011-09-09 07:50:37 +00:00
Duncan Sands
524c33a27f
When inlining exception handling code into another function, ensure that
...
duplicate tests are eliminated (for example if the two functions both have
a catch clause catching the same type, ensure the redundant one is removed).
Note that it would probably be safe to say that eh.typeid.for is 'const',
but since two calls to it with the same argument can give different results
(but only if the calls are in different functions), it seems more correct to
mark it only 'pure'; this doesn't get in the way of the optimization.
llvm-svn: 139236
2011-09-07 16:44:14 +00:00
Duncan Sands
d7430cea10
Forgot to add this trampoline testcase.
...
llvm-svn: 139229
2011-09-07 09:21:38 +00:00
Owen Anderson
58704ee442
Try again at r138809 (make DSE more aggressive in removing dead stores at the end of a function), now with less deleting stores before memcpy's.
...
llvm-svn: 139150
2011-09-06 18:14:09 +00:00
Duncan Sands
a098436b32
Split the init.trampoline intrinsic, which currently combines GCC's
...
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC. While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function. To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function. Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!). Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC. Patch mostly by Sanjoy Das.
llvm-svn: 139140
2011-09-06 13:37:06 +00:00
Benjamin Kramer
4b79c21ef2
InstSimplify: Don't try to replace an extractvalue/insertvalue pair with the original value if types don't match.
...
Fixes clang selfhost.
llvm-svn: 139120
2011-09-05 18:16:19 +00:00
Duncan Sands
29192d042e
Delete trivial landing pads that just continue unwinding the caught
...
exception.
llvm-svn: 139117
2011-09-05 12:57:57 +00:00
Duncan Sands
fd26a954a8
Add some simple insertvalue simplifications, for the purpose of cleaning
...
up do-nothing exception handling code produced by dragonegg.
llvm-svn: 139113
2011-09-05 06:52:48 +00:00
Bill Wendling
4aa2573748
Try to eliminate the use of the 'unwind' instruction.
...
llvm-svn: 139046
2011-09-02 22:41:11 +00:00
Andrew Trick
310a448cfe
Test case update for unroll-scev.
...
llvm-svn: 139037
2011-09-02 21:21:03 +00:00
Jakub Staszak
63a3a0e010
Extra CHECK-NOT to make sure that GVN transform works properly.
...
llvm-svn: 139012
2011-09-02 17:40:39 +00:00
Andrew Trick
4a31ba3bae
-unroll-scev flag removal
...
llvm-svn: 139010
2011-09-02 17:36:14 +00:00
Jakub Staszak
057d423e4b
ConstantVector returns arbitrary value for the wrong index.
...
This fixes PR10813.
llvm-svn: 139006
2011-09-02 15:43:43 +00:00
Jakub Staszak
7470fb01d0
Compare type size instead of type _store_ size to make sure that BitCastInst
...
will be valid. This fixes PR10820.
llvm-svn: 139005
2011-09-02 14:57:37 +00:00
Bill Wendling
723cec7a5f
Update to new EH scheme.
...
llvm-svn: 138989
2011-09-02 01:25:11 +00:00
Eli Friedman
4028a51c74
Fix test; sorry for any inconvenience.
...
llvm-svn: 138966
2011-09-01 21:25:42 +00:00
Eli Friedman
71f5c2f158
Fix an issue with the IR sink pass found by inspection. (I'm not sure anyone is actually using this, but might as well fix it since I found the issue.)
...
llvm-svn: 138965
2011-09-01 21:21:24 +00:00
Eli Friedman
cc6e92892f
Add missing newline.
...
llvm-svn: 138964
2011-09-01 21:20:11 +00:00
Bill Wendling
185d377597
Update to new EH scheme.
...
llvm-svn: 138933
2011-09-01 01:28:25 +00:00
Bill Wendling
d33e3007fa
Update to new EH scheme.
...
llvm-svn: 138928
2011-09-01 01:08:21 +00:00
Bill Wendling
3b17c1b48d
Update to new EH scheme.
...
llvm-svn: 138927
2011-09-01 01:02:41 +00:00
Bill Wendling
e88632d667
Update some tests to the new EH scheme.
...
llvm-svn: 138925
2011-09-01 00:58:03 +00:00
Bill Wendling
080f40a49d
Reenable test.
...
llvm-svn: 138916
2011-08-31 23:08:05 +00:00