1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

4795 Commits

Author SHA1 Message Date
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
Tanya Lattner
03755061ae Remove llvm-upgrade.
llvm-svn: 47238
2008-02-17 20:02:20 +00:00
Chris Lattner
1ce2265908 fix this test.
llvm-svn: 47232
2008-02-17 00:15:25 +00:00
Tanya Lattner
bcf113b2ca Remove llvm-upgrade
llvm-svn: 47231
2008-02-17 00:15:09 +00:00
Tanya Lattner
71db645ff2 Remove llvm-upgrade.
llvm-svn: 47230
2008-02-17 00:13:09 +00:00
Chris Lattner
37c93d2a82 this test isn't useful since we added @ notation for globals.
llvm-svn: 47229
2008-02-17 00:12:03 +00:00
Chris Lattner
52d5239f6d this line was commented out.
llvm-svn: 47228
2008-02-17 00:09:08 +00:00
Tanya Lattner
c08b5f0208 Remove llvm-upgrade and update tests.
llvm-svn: 47227
2008-02-16 23:55:46 +00:00
Tanya Lattner
1ffe4f2e88 Removing llvm upgrade, so remove tests specific to llvm-upgrade and update the tests that used it.
llvm-svn: 47225
2008-02-16 23:27:24 +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
Andrew Lenharth
c178981b85 llvm.memory.barrier, and impl for x86 and alpha
llvm-svn: 47204
2008-02-16 01:24:58 +00:00
Chris Lattner
f8ab0af3c0 upgrade this test, which wasn't testing the right thing since llvm-upgrade came around.
llvm-svn: 47194
2008-02-15 23:58:25 +00:00
Chris Lattner
afae31f812 rename llx -> ll
llvm-svn: 47192
2008-02-15 23:51:48 +00:00
Evan Cheng
94742fb5d4 This test is not interesting.
llvm-svn: 47189
2008-02-15 23:06:21 +00:00
Dale Johannesen
15e608542e Modify test to expect improved code.
llvm-svn: 47182
2008-02-15 22:05:15 +00:00
Duncan Sands
e0330d632a Fix this test on linux, which returns S242
using sret.

llvm-svn: 47173
2008-02-15 19:42:13 +00:00
Devang Patel
01f9252f73 Fix PR2028
llvm-svn: 47150
2008-02-15 01:24:49 +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
Chris Lattner
9c24f3ec37 Fix a miscompilation from Dan's recent apintification.
llvm-svn: 47128
2008-02-14 18:48:56 +00:00
Tanya Lattner
df7da98f55 Remove llvm-upgrade
llvm-svn: 47119
2008-02-14 07:57:12 +00:00
Nick Lewycky
12098ea401 Testcase for PR2032.
llvm-svn: 47113
2008-02-14 07:15:11 +00:00
Tanya Lattner
f37f44f9ec Remove llvm-upgrade.
llvm-svn: 47110
2008-02-14 06:56:27 +00:00
Chris Lattner
d696c25db5 This readme entry is done, testcase here: CodeGen/X86/zero-remat.ll
llvm-svn: 47106
2008-02-14 05:39:46 +00:00
Evan Cheng
cbbcb3144d Fix test.
llvm-svn: 47102
2008-02-14 01:32:53 +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
Dale Johannesen
cc4f128930 New test, see comments.
llvm-svn: 47078
2008-02-13 18:36:48 +00:00
Duncan Sands
2e9661573f Teach LegalizeTypes how to expand and promote CTLZ,
CTTZ and CTPOP.  The expansion code differs from
that in LegalizeDAG in that it chooses to take the
CTLZ/CTTZ count from the Hi/Lo part depending on
whether the Hi/Lo value is zero, not on whether
CTLZ/CTTZ of Hi/Lo returned 32 (or whatever the
width of the type is) for it.  I made this change
because the optimizers may well know that Hi/Lo
is zero and exploit it.  The promotion code for
CTTZ also differs from that in LegalizeDAG: it
uses an "or" to get the right result when the
original value is zero, rather than using a compare
and select.  This also means the value doesn't
need to be zero extended.

llvm-svn: 47075
2008-02-13 18:01:53 +00:00
Eli Friedman
cf6273d015 Add a note pointing to PR1996.
llvm-svn: 47055
2008-02-13 07:56:04 +00:00
Chris Lattner
a30946c576 In SDISel, for targets that support FORMAL_ARGUMENTS nodes, lower this
node as soon as we create it in SDISel.  Previously we would lower it in
legalize.  The problem with this is that it only exposes the argument
loads implied by FORMAL_ARGUMENTs after legalize, so that only dag combine 2
can hack on them.  This causes us to miss some optimizations because 
datatype expansion also happens here.

Exposing the loads early allows us to do optimizations on them.  For example
we now compile arg-cast.ll to:

_foo:
	movl	$2147483647, %eax
	andl	8(%esp), %eax
	ret

where we previously produced:

_foo:
	subl	$12, %esp
	movsd	16(%esp), %xmm0
	movsd	%xmm0, (%esp)
	movl	$2147483647, %eax
	andl	4(%esp), %eax
	addl	$12, %esp
	ret

It might also make sense to do this for ISD::CALL nodes, which have implicit
stores on many targets.

llvm-svn: 47054
2008-02-13 07:39:09 +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
Nate Begeman
cfd9883301 Add testcase for recent legalizer change
llvm-svn: 47049
2008-02-13 06:48:40 +00:00
Evan Cheng
68a88c1f52 New tests.
llvm-svn: 47047
2008-02-13 03:23:53 +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
Evan Cheng
0d2efb485d Don't mask the isel bug.
llvm-svn: 47018
2008-02-12 19:11:29 +00:00
Evan Cheng
6c7520f922 This test assumes no SSE4.1.
llvm-svn: 47017
2008-02-12 19:11:08 +00:00
Wojciech Matyjewicz
6df5450bc4 Now that ScalarEvolution::print writes to the correct stream, there is
no need to redirect stderr into stdout.

llvm-svn: 47009
2008-02-12 15:12:40 +00:00
Wojciech Matyjewicz
ae01857e92 Change negative grep into positive one in my yesterday's testcase.
llvm-svn: 47008
2008-02-12 15:10:35 +00:00
Wojciech Matyjewicz
b6e6dacc60 Fix PR2002. Suppose n is the initial value for the induction
variable (with step 1) and m is its final value. Then, the correct trip 
count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may 
overflow and can't in general be interpreted as signed.

Patch by Nick Lewycky.

llvm-svn: 47007
2008-02-12 15:09:36 +00:00
Tanya Lattner
cefcef7955 Test case for annotate builtin.
llvm-svn: 46999
2008-02-12 07:46:33 +00:00
Evan Cheng
1ab096a313 Fix some test cases.
llvm-svn: 46998
2008-02-12 07:22:46 +00:00
Wojciech Matyjewicz
2874a19254 If the LHS of the comparison is a loop-invariant we also want to move it
to the RHS. This simple change allows to compute loop iteration count 
for loops with condition similar to the one in the testcase (which seems 
to be quite common).

llvm-svn: 46959
2008-02-11 18:37:34 +00:00
Wojciech Matyjewicz
76c2b22ee4 Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
arbitrary iteration.

The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the 
computations (essentially, the division) in BinomialCoefficient() are 
performed with the apprioprate bitwidth necessary to avoid overflow; 
unsigned division is used instead of the signed one.

Computations in BinomialCoefficient() require support from the code 
generator for APInts. Currently, we use a hack rounding up the 
neccessary bitwidth to the nearest power of 2. The hack is easy to turn 
off in future.

One remaining issue: we assume the divisor of the binomial coefficient 
formula can be computed accurately using 16 bits. It means we can handle 
AddRecs of length up to 9. In future, we should use APInts to evaluate 
the divisor.

Thanks to Nicholas for cooperation!

llvm-svn: 46955
2008-02-11 11:03:14 +00:00
Evan Cheng
19f684ed72 Determine whether a spill kills the register it's spilling before insertion rather than trying to undo the kill marker afterwards.
llvm-svn: 46953
2008-02-11 08:30:52 +00:00
Dan Gohman
cabaec582f Rename MRegisterInfo to TargetRegisterInfo.
llvm-svn: 46930
2008-02-10 18:45:23 +00:00
Dale Johannesen
304406f01c Alignment of struct containing vectors depends on
whether SSE is present, on Darwin anyway.  Make it
explicit.

llvm-svn: 46909
2008-02-09 19:04:25 +00:00