Devang Patel
a6ec13ef6b
Place for sret promotion tests.
...
llvm-svn: 48016
2008-03-07 20:00:15 +00:00
Nick Lewycky
c6edcb8904
Commit the testcase too.
...
llvm-svn: 47988
2008-03-06 06:50:03 +00:00
Nick Lewycky
f249c5d5ad
Don't try to simplify urem and srem using arithmetic rules that don't work
...
under modulo (overflow). Fixes PR1933.
llvm-svn: 47987
2008-03-06 06:48:30 +00:00
Devang Patel
84e9abbb60
Use cast instead of dyn_cast.
...
Update test to use multiple return value directly, instead of relying on -sretpromotion.
llvm-svn: 47907
2008-03-04 21:45:28 +00:00
Devang Patel
a14b91d6a3
Handle multiple return values.
...
llvm-svn: 47904
2008-03-04 21:15:15 +00:00
Tanya Lattner
c072619922
Remove llvm-upgrade and update test cases.
...
llvm-svn: 47793
2008-03-01 09:15:35 +00:00
Chris Lattner
75f5d14574
fix a bug Anders ran into where scalarrepl would crash when promoting
...
a union containing a vector and an array whose elements were smaller than
the vector elements. this means we need to compile the load of the
array elements into an extract element plus a truncate.
llvm-svn: 47752
2008-02-29 07:12:06 +00:00
Chris Lattner
5aeccb7353
Folding or(fcmp,fcmp) only works if the operands of the fcmps are the same fp type.
...
llvm-svn: 47750
2008-02-29 06:09:11 +00:00
Owen Anderson
a39b18223f
Add PR number to testcase.
...
llvm-svn: 47640
2008-02-26 23:16:11 +00:00
Owen Anderson
eadd074b22
Fix an issue where GVN had the sizes of the two memcpy's reverse, resulting
...
in an invalid transformation.
llvm-svn: 47639
2008-02-26 23:06:17 +00:00
Chris Lattner
9d19e558b7
fix this test so that the fn name doesn't match the regex
...
llvm-svn: 47608
2008-02-26 18:13:51 +00:00
Gabor Greif
a8990a9cac
Really feed llvm-as with the testcase, do not let it read from stdin. This fixes the hangs seen on solaris10.
...
llvm-svn: 47604
2008-02-26 13:37:13 +00:00
Owen Anderson
6eafd532ab
Fix an issue where GVN was performing the return slot optimization when it was
...
not safe. This is fixed by more aggressively checking that the return slot is
not used elsewhere in the function.
llvm-svn: 47544
2008-02-25 04:08:09 +00:00
Owen Anderson
432abc0479
Fix an issue where GVN would try to use an instruction before its definition when performing return slot optimization.
...
llvm-svn: 47541
2008-02-25 00:40:41 +00:00
Zhou Sheng
5f4e29db89
Testcase for Revision 47478.
...
llvm-svn: 47531
2008-02-23 10:59:51 +00:00
Nick Lewycky
1f3c58df08
Correctly fold divide-by-constant, even when faced with overflow.
...
llvm-svn: 47287
2008-02-18 22:48:05 +00:00
Chris Lattner
a6dc8aaa3f
make this just a bit more strict.
...
llvm-svn: 47274
2008-02-18 17:33:10 +00:00
Owen Anderson
7b092ea631
Add support to GVN for performing sret return slot optimization. This means that, if an sret function tail calls
...
another sret function, it should pass its own sret parameter to the tail callee, allowing it to fill in the correct
return value. llvm-gcc does not emit this by default. Instead, it allocates space in the caller for the sret of
the tail call and then uses memcpy to copy the result into the caller's sret parameter. This optimization detects
and optimizes that case.
llvm-svn: 47265
2008-02-18 09:24:53 +00:00
Chris Lattner
9851db050b
optimize away stackrestore calls that have no intervening alloca or call.
...
llvm-svn: 47258
2008-02-18 06:12:38 +00:00
Chris Lattner
dd489bf3eb
upgrade this test.
...
llvm-svn: 47257
2008-02-18 06:11:00 +00:00
Chris Lattner
2fa904b3af
Fold (-x + -y) -> -(x+y) which promotes better association, fixing
...
the second half of PR2047
llvm-svn: 47244
2008-02-17 21:03:36 +00:00
Chris Lattner
4a34461d64
Split up subtracts into add+negate if they have a reassociable use or operand
...
that is also a subtract. This implements PR2047 and Transforms/Reassociate/subtest2.ll
llvm-svn: 47241
2008-02-17 20:51:26 +00:00
Chris Lattner
7cd16f34b3
upgrade and simplify this test.
...
llvm-svn: 47240
2008-02-17 20:48:43 +00:00
Duncan Sands
cd0325cce1
Remove any 'nest' parameter attributes if the function
...
is not passed as an argument to a trampoline intrinsic.
llvm-svn: 47220
2008-02-16 20:56:04 +00:00
Devang Patel
8af92b942c
If loop header is also loop exiting block then OrigPN is incoming value for B loop header.
...
Fixes PR 2030.
llvm-svn: 47141
2008-02-14 23:18:47 +00:00
Chris Lattner
b8bf200b77
Fix PR2029
...
llvm-svn: 47129
2008-02-14 19:18:13 +00:00
Nick Lewycky
12098ea401
Testcase for PR2032.
...
llvm-svn: 47113
2008-02-14 07:15:11 +00:00
Devang Patel
38de2d11a5
A loop latch phi node may have uses inside loop, not just in loop header.
...
llvm-svn: 47093
2008-02-13 22:23:07 +00:00
Devang Patel
1e71afe2df
While moving exit condition, do not drop loop latch on the floor.
...
llvm-svn: 47089
2008-02-13 22:06:36 +00:00
Devang Patel
d48bbbf07b
Keep track of exit value operand number when operands are swapped.
...
llvm-svn: 47082
2008-02-13 19:48:48 +00:00
Eli Friedman
cf6273d015
Add a note pointing to PR1996.
...
llvm-svn: 47055
2008-02-13 07:56:04 +00:00
Eli Friedman
75220639b6
Add test for PR1996. (This is my first time adding a test for a
...
transform, so please review.)
llvm-svn: 47050
2008-02-13 06:55:57 +00:00
Owen Anderson
274aa2846e
Re-apply the patch to improve the optimizations of memcpy's, with several
...
bugs fixed. This now passes PPC bootstrap.
llvm-svn: 47026
2008-02-12 21:15:18 +00:00
Devang Patel
9aba178666
Fix PR 1995.
...
llvm-svn: 46898
2008-02-08 22:49:13 +00:00
Bill Wendling
8a28ab4b1f
Temporarily reverting:
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080128/057882.html
This is causing a miscompilation on PPC G5 and just now seeing it on iMac x86-64.
llvm-svn: 46822
2008-02-06 20:03:07 +00:00
Chris Lattner
96deed5d4d
Fix a bug compiling PR1978 (perhaps not the only one though) which
...
was incorrectly simplifying "x == (gep x, 1, i)" into false, even
though i could be negative. As it turns out, all the code to
handle this already existed, we just need to disable the incorrect
optimization case and let the general case handle it.
llvm-svn: 46739
2008-02-05 04:45:32 +00:00
Owen Anderson
e2150dfe24
Make this test more aggressive, to cover recent improvements.
...
llvm-svn: 46695
2008-02-04 04:55:24 +00:00
Owen Anderson
aaba6f96da
Allow GVN to hack on memcpy's, making them open to further optimization.
...
llvm-svn: 46693
2008-02-04 02:59:58 +00:00
Nick Lewycky
81cc718a25
Tag this test with the PR reference.
...
llvm-svn: 46688
2008-02-03 16:35:19 +00:00
Nick Lewycky
febd3642ce
There are some cases where icmp(add) can be folded into a new icmp. Handle them.
...
llvm-svn: 46687
2008-02-03 16:33:09 +00:00
Duncan Sands
454a8eaee9
Don't drop function/call return attributes like 'nounwind'.
...
llvm-svn: 46645
2008-02-01 20:37:16 +00:00
Owen Anderson
ad9a347656
Make DSE much more aggressive by performing DCE earlier. Update a testcase to reflect this increased aggressiveness.
...
llvm-svn: 46542
2008-01-30 01:24:47 +00:00
Chris Lattner
83227e350d
Fix a bug where scalarrepl would discard offset if type would match.
...
In practice this can only happen on code with already undefined behavior,
but this is still a good thing to handle correctly.
llvm-svn: 46539
2008-01-30 00:39:15 +00:00
Chris Lattner
e08ec140e0
Don't let globalopt hack on volatile loads or stores.
...
llvm-svn: 46523
2008-01-29 19:01:37 +00:00
Chris Lattner
83f411c586
eliminate additions of 0.0 when they are obviously dead. This has to be careful to
...
avoid turning -0.0 + 0.0 -> -0.0 which is incorrect.
llvm-svn: 46499
2008-01-29 06:52:45 +00:00
Owen Anderson
2688087c9c
Add a testcase for eliminating memcpy's at the end of functions. Forgot to commit this with my last commit.
...
llvm-svn: 46497
2008-01-29 06:40:32 +00:00
Devang Patel
86ff705c22
Filter loops that subtract induction variables.
...
These loops are not yet handled.
Fix PR 1912.
llvm-svn: 46484
2008-01-29 02:20:41 +00:00
Chris Lattner
20854cf4e7
this test is now compiled into the right thing.
...
llvm-svn: 46454
2008-01-28 17:38:46 +00:00
Nick Lewycky
6b070b1b93
Handle some more combinations of extend and icmp. Fixes PR1940.
...
llvm-svn: 46431
2008-01-28 03:48:02 +00:00
Chris Lattner
359756ea4b
Fix PR1932 by disabling an xform invalid for fdiv.
...
llvm-svn: 46429
2008-01-28 00:58:18 +00:00