1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

1419 Commits

Author SHA1 Message Date
Chris Lattner
109f0e56f5 make sure to use a cpu that has sse.
llvm-svn: 46060
2008-01-16 06:32:02 +00:00
Chris Lattner
41e1fd13b2 My previous commit had an incomplete message, it should have been:
make the 'fp return in ST(0)' optimization smart enough to
look through token factor nodes.  THis allows us to compile 
testcases like CodeGen/X86/fp-stack-retcopy.ll into:

_carg:
	subl	$12, %esp
	call	L_foo$stub
	fstpl	(%esp)
	fldl	(%esp)
	addl	$12, %esp
	ret

instead of:

_carg:
	subl	$28, %esp
	call	L_foo$stub
	fstpl	16(%esp)
	movsd	16(%esp), %xmm0
	movsd	%xmm0, 8(%esp)
	fldl	8(%esp)
	addl	$28, %esp
	ret

Still not optimal, but much better and this is a trivial patch.  Fixing 
the rest requires invasive surgery that is is not llvm 2.2 material.

llvm-svn: 46054
2008-01-16 05:56:59 +00:00
Chris Lattner
afd4056065 verify x86 generates ud2 for llvm.trap
llvm-svn: 46023
2008-01-15 22:22:02 +00:00
Dale Johannesen
8ca78844b0 Disable for now.
llvm-svn: 45881
2008-01-11 20:47:33 +00:00
Duncan Sands
2c89976416 Output sinl for a long double FSIN node, not sin.
Likewise fix up a bunch of other libcalls.  While
there I remove NEG_F32 and NEG_F64 since they are
not used anywhere.  This fixes 9 Ada ACATS failures.

llvm-svn: 45833
2008-01-10 10:28:30 +00:00
Evan Cheng
0747381b13 Codegen improvement has reduced one spill.
llvm-svn: 45814
2008-01-10 02:54:40 +00:00
Evan Cheng
ba0214a6cb Special copy SUnit's do not have SDNode's.
llvm-svn: 45787
2008-01-09 23:01:55 +00:00
Evan Cheng
f91cfb435f Fix sse2.psrl.w and sse2.psrl.q definitions.
llvm-svn: 45772
2008-01-09 02:16:44 +00:00
Chris Lattner
c93ad7d569 Make load->store deletion a bit smarter. This allows us to compile this:
void test(long long *P) { *P ^= 1; }

into just:

_test:
	movl	4(%esp), %eax
	xorl	$1, (%eax)
	ret

instead of code like this:

_test:
	movl	4(%esp), %ecx
        xorl    $1, (%ecx)
	movl	4(%ecx), %edx
	movl	%edx, 4(%ecx)
	ret

llvm-svn: 45762
2008-01-08 23:08:06 +00:00
Duncan Sands
b3b1ae18ab Crashes llc when using Chris's new legalization logic.
llvm-svn: 45758
2008-01-08 21:51:53 +00:00
Nate Begeman
98dba4b0ce Update test to catch recent x86 insert regression and improvements
llvm-svn: 45705
2008-01-07 17:49:23 +00:00
Chris Lattner
7d567adef9 fix this to use a valid triple.
llvm-svn: 45509
2008-01-02 22:21:45 +00:00
Chris Lattner
fbd8cc03c8 verify that aligned common support doesn't break.
llvm-svn: 45495
2008-01-02 19:48:24 +00:00
Chris Lattner
d55e743cfe One readme entry is done, one is really easy (Evan, want to investigate
eliminating the llvm.x86.sse2.loadl.pd intrinsic?), one shuffle optzn
may be done (if shufps is better than pinsw, Evan, please review), and
we already know about LICM of simple instructions.

llvm-svn: 45407
2007-12-29 19:31:47 +00:00
Chris Lattner
ed55329cc9 upgrade this test
llvm-svn: 45406
2007-12-29 19:24:06 +00:00
Chris Lattner
cd147e5596 Fold comparisons against a constant nan, and optimize ORD/UNORD
comparisons with a constant.  This allows us to compile isnan to:

_foo:
	fcmpu cr7, f1, f1
	mfcr r2
	rlwinm r3, r2, 0, 31, 31
	blr 

instead of:

LCPI1_0:					;  float
	.space	4
_foo:
	lis r2, ha16(LCPI1_0)
	lfs f0, lo16(LCPI1_0)(r2)
	fcmpu cr7, f1, f0
	mfcr r2
	rlwinm r3, r2, 0, 31, 31
	blr 

llvm-svn: 45405
2007-12-29 08:37:08 +00:00
Chris Lattner
b36a4a7a84 this xform is implemented.
llvm-svn: 45404
2007-12-29 08:19:39 +00:00
Chris Lattner
f8e408b7b1 Codegen:
as:

_bar:
	pushl	%esi
	subl	$8, %esp
	movl	16(%esp), %esi
	call	L_foo$stub
	fstps	(%esi)
	addl	$8, %esp
	popl	%esi
	#FP_REG_KILL
	ret

instead of:

_bar:
	pushl	%esi
	subl	$8, %esp
	movl	16(%esp), %esi
	call	L_foo$stub
	fstpl	(%esi)
	cvtsd2ss	(%esi), %xmm0
	movss	%xmm0, (%esi)
	addl	$8, %esp
	popl	%esi
	#FP_REG_KILL
	ret

llvm-svn: 45401
2007-12-29 06:57:38 +00:00
Chris Lattner
e3515220d2 avoid going through a stack slot to convert from fpstack to xmm reg
if we are just going to store it back anyway.  This improves things 
like:
double foo();
void bar(double *P) { *P = foo(); }

llvm-svn: 45399
2007-12-29 06:41:28 +00:00
Chris Lattner
a432f12b76 one fewer uncond branch with my codegenprepare hack for single-mbb backedges.
llvm-svn: 45360
2007-12-26 17:23:47 +00:00
Evan Cheng
8824950e8f Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store node id.
llvm-svn: 45167
2007-12-18 19:38:14 +00:00
Evan Cheng
36bfae49e3 FIX for PR1799: When a load is unfolded from an instruction, check if it is a new node. If not, do not create a new SUnit.
llvm-svn: 45157
2007-12-18 08:42:10 +00:00
Evan Cheng
1d95b669b6 Make better use of instructions that clear high bits; fix various 2-wide shuffle bugs.
llvm-svn: 45058
2007-12-15 03:00:47 +00:00
Evan Cheng
6909ff8c4b Fix ctlz and cttz. llvm definition requires them to return number of bits in of the src type when value is zero.
llvm-svn: 45029
2007-12-14 08:30:15 +00:00
Evan Cheng
51cf86ded0 Implement ctlz and cttz with bsr and bsf.
llvm-svn: 45024
2007-12-14 02:13:44 +00:00
Evan Cheng
a152909956 Be extra careful with extension use optimation. Now turned on by default.
llvm-svn: 44981
2007-12-13 03:32:53 +00:00
Evan Cheng
343929c773 Fold some and + shift in x86 addressing mode.
llvm-svn: 44970
2007-12-13 00:43:27 +00:00
Evan Cheng
64a1febf9a Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable and they should not be spilled.
llvm-svn: 44960
2007-12-12 23:12:09 +00:00
Dan Gohman
0075ea1f5f Allow vector integer constants to be created with
SelectionDAG::getConstant, in the same way as vector floating-point
constants. This allows the legalize expansion code for @llvm.ctpop and
friends to be usable with vector types.

llvm-svn: 44954
2007-12-12 22:21:26 +00:00
Evan Cheng
ad3e7f3286 Use shuffles to implement insert_vector_elt for i32, i64, f32, and f64.
llvm-svn: 44929
2007-12-12 07:55:34 +00:00
Evan Cheng
af6ba4dfd4 Add a test case for -optimize-ext-uses.
llvm-svn: 44928
2007-12-12 07:54:08 +00:00
Evan Cheng
d36d69fe92 Lower a build_vector with all constants into a constpool load unless it can be done with a move to low part.
llvm-svn: 44921
2007-12-12 06:45:40 +00:00
Evan Cheng
f6c2838f36 - Improved v8i16 shuffle lowering. It now uses pshuflw and pshufhw as much as
possible before resorting to pextrw and pinsrw.
- Better codegen for v4i32 shuffles masquerading as v8i16 or v16i8 shuffles.
- Improves (i16 extract_vector_element 0) codegen by recognizing
  (i32 extract_vector_element 0) does not require a pextrw.

llvm-svn: 44836
2007-12-11 01:46:18 +00:00
Christopher Lamb
5c577eb543 Improve branch folding by recgonizing that explict successor relationships impact the value of fall-through choices.
llvm-svn: 44785
2007-12-10 07:24:06 +00:00
Evan Cheng
34c7b35135 Much improved v8i16 shuffles. (Step 1).
llvm-svn: 44676
2007-12-07 08:07:39 +00:00
Evan Cheng
8d1f8b2f27 New test case.
llvm-svn: 44672
2007-12-07 01:48:46 +00:00
Evan Cheng
cab253ba13 Fix a bogus test case.
llvm-svn: 44668
2007-12-06 22:12:45 +00:00
Evan Cheng
d53f72dfb1 Turning simple splitting on. Start testing new coalescer heuristics as new llcbeta.
llvm-svn: 44660
2007-12-06 08:54:31 +00:00
Chris Lattner
64a1a9f502 third time around: instead of disabling this completely,
only disable it if we don't know it will be obviously profitable.
Still fixme, but less so. :)

llvm-svn: 44658
2007-12-06 07:47:55 +00:00
Chris Lattner
bb5fb18af8 Actually, disable this code for now. More analysis and improvements to
the X86 backend are needed before this should be enabled by default.

llvm-svn: 44657
2007-12-06 07:44:31 +00:00
Chris Lattner
c467b49c96 implement a readme entry, compiling the code into:
_foo:
	movl	$12, %eax
	andl	4(%esp), %eax
	movl	_array(%eax), %eax
	ret

instead of:

_foo:
	movl	4(%esp), %eax
	shrl	$2, %eax
	andl	$3, %eax
	movl	_array(,%eax,4), %eax
	ret

As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:

-       movl    8(%eax), %eax
-       shll    $2, %eax
-       andl    $1020, %eax
-       movl    (%esi,%eax), %eax
+       movzbl  8(%eax), %eax
+       movl    (%esi,%eax,4), %eax


-       shll    $2, %edx
-       andl    $1020, %edx
-       movl    (%edi,%edx), %edx
+       andl    $255, %edx
+       movl    (%edi,%edx,4), %edx

Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:

-       andl    $85, %ebx
-       addl    _bit_count(,%ebx,4), %ebp
+       shll    $2, %ebx
+       andl    $340, %ebx
+       addl    _bit_count(%ebx), %ebp

llvm-svn: 44656
2007-12-06 07:33:36 +00:00
Chris Lattner
1de4db0446 fix this when run on non x86 hosts.
llvm-svn: 44645
2007-12-06 01:05:52 +00:00
Evan Cheng
79e8b92dc3 Allow some reloads to be folded in multi-use cases. Specifically testl r, r -> cmpl [mem], 0.
llvm-svn: 44479
2007-12-01 02:07:52 +00:00
Evan Cheng
90c548af8e Do not fold reload into an instruction with multiple uses. It issues one extra load.
llvm-svn: 44467
2007-11-30 21:23:43 +00:00
Dan Gohman
d12155d8c8 Remove unnecessary && from the RUN lines of this test.
llvm-svn: 44342
2007-11-27 00:03:38 +00:00
Dan Gohman
a9f8208852 Don't lower srem/urem X%C to X-X/C*C unless the division is actually
optimized. This avoids creating illegal divisions when the combiner is
running after legalize; this fixes PR1815. Also, it produces better
code in the included testcase by avoiding the subtract and multiply
when the division isn't optimized.

llvm-svn: 44341
2007-11-26 23:46:11 +00:00
Chris Lattner
be0c5a0500 Fix a long standing deficiency in the X86 backend: we would
sometimes emit "zero" and "all one" vectors multiple times,
for example:

_test2:
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M1
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M2
	ret

instead of:

_test2:
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M1
	movq	%mm0, _M2
	ret

This patch fixes this by always arranging for zero/one vectors
to be defined as v4i32 or v2i32 (SSE/MMX) instead of letting them be
any random type.  This ensures they get trivially CSE'd on the dag.
This fix is also important for LegalizeDAGTypes, as it gets unhappy
when the x86 backend wants BUILD_VECTOR(i64 0) to be legal even when
'i64' isn't legal.

This patch makes the following changes:

1) X86TargetLowering::LowerBUILD_VECTOR now lowers 0/1 vectors into
   their canonical types.
2) The now-dead patterns are removed from the SSE/MMX .td files.
3) All the patterns in the .td file that referred to immAllOnesV or
   immAllZerosV in the wrong form now use *_bc to match them with a
   bitcast wrapped around them.
4) X86DAGToDAGISel::SelectScalarSSELoad is generalized to handle 
   bitcast'd zero vectors, which simplifies the code actually.
5) getShuffleVectorZeroOrUndef is updated to generate a shuffle that
   is legal, instead of generating one that is illegal and expecting
   a later legalize pass to clean it up.
6) isZeroShuffle is generalized to handle bitcast of zeros.
7) several other minor tweaks.

This patch is definite goodness, but has the potential to cause random
code quality regressions.  Please be on the lookout for these and let 
me know if they happen.

llvm-svn: 44310
2007-11-25 00:24:49 +00:00
Chris Lattner
6304b1e16d upgrade this test
llvm-svn: 44298
2007-11-24 05:39:29 +00:00
Dan Gohman
0f62120b01 Add support in SplitVectorOp for remainder operators.
llvm-svn: 44233
2007-11-19 15:15:03 +00:00
Chris Lattner
bef568f3f8 fix bogus test that the more strict lexer is finding.
llvm-svn: 44216
2007-11-18 18:26:45 +00:00
Evan Cheng
121c50d5e3 Typo.
llvm-svn: 44196
2007-11-16 23:55:08 +00:00
Evan Cheng
c19506f69d Fix a thinko in post-allocation coalescer.
llvm-svn: 44166
2007-11-15 08:13:29 +00:00
Anton Korobeynikov
58298cb9cc Fix PIC jump table codegen on x86-32/linux. In fact, such thing should be applied
to all targets uses GOT-relative offsets for PIC (Alpha?)

llvm-svn: 44108
2007-11-14 09:18:41 +00:00
Arnold Schwaighofer
64ad6fa1fa Update tailcall code to include inline attribute operand for memcpy.
llvm-svn: 43978
2007-11-10 10:48:01 +00:00
Evan Cheng
ea1474bdf3 Fix tests.
llvm-svn: 43961
2007-11-09 20:46:00 +00:00
Evan Cheng
d9bab93a44 If both parts of smul_lohi, etc. are used, don't simplify. If only one part is used, try simplify it.
llvm-svn: 43888
2007-11-08 09:25:29 +00:00
Evan Cheng
3764ad2bac Add pseudo dependency to force two-address instruction to be scheduled after
other uses. There was a overly restricted check that prevented some obvious
cases.

llvm-svn: 43762
2007-11-06 08:44:59 +00:00
Dan Gohman
6255ce9f5d Add support for vector remainder operations.
llvm-svn: 43744
2007-11-05 23:35:22 +00:00
Dale Johannesen
1f70f86c7a Make labels work in asm blocks; allow labels as
parameters.  Rename ValueRefList to ParamList
in AsmParser, since its only use is for parameters.

llvm-svn: 43734
2007-11-05 21:20:28 +00:00
Evan Cheng
e5eac2c5ac Handle cases where a register and one of its super-register are both marked as
defined on the same instruction. This fixes PR1767.

llvm-svn: 43699
2007-11-05 03:11:55 +00:00
Evan Cheng
bc39e175c4 Fix test case. Chris didn't do make check. :-)
llvm-svn: 43698
2007-11-05 03:04:26 +00:00
Evan Cheng
947c271e37 Doh. PR1187 -> PR1766.
llvm-svn: 43693
2007-11-05 01:00:44 +00:00
Evan Cheng
13d79ab67a Fix PR1187.
llvm-svn: 43692
2007-11-05 00:59:10 +00:00
Chris Lattner
8fac63c8b5 Fix PR1761 by not printing (rip) suffix when in -static mode.
Evan, please review this.

llvm-svn: 43680
2007-11-04 19:23:28 +00:00
Chris Lattner
67cd357fb8 Fix PR1763 by allowing the 'q' constraint to work with 64-bit
regs on x86-64.

llvm-svn: 43669
2007-11-04 06:51:12 +00:00
Evan Cheng
1771f6da9c There are times when the coalescer would not coalesce away a copy but the copy
can be eliminated by the allocator is the destination and source targets the
same register. The most common case is when the source and destination registers
are in different class. For example, on x86 mov32to32_ targets GR32_ which
contains a subset of the registers in GR32.

The allocator can do 2 things:
1. Set the preferred allocation for the destination of a copy to that of its source.
2. After allocation is done, change the allocation of a copy destination (if
   legal) so the copy can be eliminated.

This eliminates 443 extra moves from 403.gcc.

llvm-svn: 43662
2007-11-03 07:20:12 +00:00
Evan Cheng
8d473f667d Add run line.
llvm-svn: 43645
2007-11-02 17:36:58 +00:00
Evan Cheng
65a07e73e2 One more extract_subreg coalescing bug.
llvm-svn: 43644
2007-11-02 17:35:08 +00:00
Evan Cheng
b50cc64eb0 Missing a getNumOperands check.
llvm-svn: 43630
2007-11-02 01:26:22 +00:00
Dale Johannesen
c125d9b4e8 Test that expand_vector_elt(v2i64) works in 32-bit mode.
llvm-svn: 43598
2007-11-01 02:38:24 +00:00
Evan Cheng
5e058e94b5 It's not safe to tell SplitCriticalEdge to merge identical edges. It may delete the phi instruction that's being processed.
llvm-svn: 43524
2007-10-30 22:27:26 +00:00
Evan Cheng
633cd3e84d - Bug fixes.
- Allow icmp rewrite using an iv / stride of a smaller integer type.

llvm-svn: 43480
2007-10-29 22:07:18 +00:00
Dan Gohman
02b8beff5f Fix a DAGCombiner abort on a bitcast from a scalar to a vector.
llvm-svn: 43470
2007-10-29 20:44:42 +00:00
Evan Cheng
5fe81cf64e Enable more fold (sext (load x)) -> (sext (truncate (sextload x)))
transformation. Previously, it's restricted by ensuring the number of load uses
is one. Now the restriction is loosened up by allowing setcc uses to be
"extended" (e.g. setcc x, c, eq -> setcc sext(x), sext(c), eq).

llvm-svn: 43465
2007-10-29 19:58:20 +00:00
Chris Lattner
1503362624 Add support for the x86-64 'q' regigster modifier, and add support for the
b/h/w/k/q inline asm memory modifiers, which are just ignored.  This fixes
PR1748 and CodeGen/X86/2007-10-28-inlineasm-q-modifier.ll

llvm-svn: 43430
2007-10-29 03:09:07 +00:00
Evan Cheng
53696b7e9f Loosen up iv reuse to allow reuse of the same stride but a larger type when truncating from the larger type to smaller type is free.
e.g.
Turns this loop:
LBB1_1: # entry.bb_crit_edge
        xorl    %ecx, %ecx
        xorw    %dx, %dx
        movw    %dx, %si
LBB1_2: # bb
        movl    L_X$non_lazy_ptr, %edi
        movw    %si, (%edi)
        movl    L_Y$non_lazy_ptr, %edi
        movw    %dx, (%edi)
		addw    $4, %dx
		incw    %si
		incl    %ecx
		cmpl    %eax, %ecx
		jne     LBB1_2  # bb
	
into

LBB1_1: # entry.bb_crit_edge
        xorl    %ecx, %ecx
        xorw    %dx, %dx
LBB1_2: # bb
        movl    L_X$non_lazy_ptr, %esi
        movw    %cx, (%esi)
        movl    L_Y$non_lazy_ptr, %esi
        movw    %dx, (%esi)
        addw    $4, %dx
		incl    %ecx
        cmpl    %eax, %ecx
        jne     LBB1_2  # bb

llvm-svn: 43375
2007-10-26 01:56:11 +00:00
Evan Cheng
66cbf54030 If a loop termination compare instruction is the only use of its stride,
and the compaison is against a constant value, try eliminate the stride
by moving the compare instruction to another stride and change its
constant operand accordingly. e.g.

loop:
...
v1 = v1 + 3
v2 = v2 + 1
if (v2 < 10) goto loop
=>
loop:
...
v1 = v1 + 3
if (v1 < 30) goto loop

llvm-svn: 43336
2007-10-25 09:11:16 +00:00
Dale Johannesen
402c11966a This was failing on Darwin, which defaults to PIC;
no lea was generated.  I think this follows the intent.

llvm-svn: 43312
2007-10-24 20:58:14 +00:00
Dan Gohman
df1f166e4a Strength reduction improvements.
- Avoid attempting stride-reuse in the case that there are users that
   aren't addresses. In that case, there will be places where the
   multiplications won't be folded away, so it's better to try to
   strength-reduce them.

 - Several SSE intrinsics have operands that strength-reduction can
   treat as addresses. The previous item makes this more visible, as
   any non-address use of an IV can inhibit stride-reuse.

 - Make ValidStride aware of whether there's likely to be a base
   register in the address computation. This prevents it from thinking
   that things like stride 9 are valid on x86 when the base register is
   already occupied.

Also, XFAIL the 2007-08-10-LEA16Use32.ll test; the new logic to avoid
stride-reuse elimintes the LEA in the loop, so the test is no longer
testing what it was intended to test.

llvm-svn: 43231
2007-10-22 20:40:42 +00:00
Dan Gohman
76e104c8ad Fix the folding of multiplication into addresses on x86, which was broken
by the recent {U,S}MUL_LOHI changes.

llvm-svn: 43230
2007-10-22 20:22:24 +00:00
Evan Cheng
2d53c3f15e New test case.
llvm-svn: 43193
2007-10-19 22:05:00 +00:00
Rafael Espindola
2b5b200b9f Test byval with a 8 bit aligned struct
llvm-svn: 43173
2007-10-19 11:29:21 +00:00
Rafael Espindola
d8d4372845 Add support for byval function whose argument is not 32 bit aligned.
To do this it is necessary to add a "always inline" argument to the
memcpy node. For completeness I have also added this node to memmove
and memset.  I have also added getMem* functions, because the extra
argument makes it cumbersome to use getNode and because I get confused
by it :-)

llvm-svn: 43172
2007-10-19 10:41:11 +00:00
Evan Cheng
f6d1c7be14 Really fix PR1734. Carefully track which register uses are sub-register uses by
traversing inverse register coalescing map.

llvm-svn: 43118
2007-10-18 07:49:59 +00:00
Dan Gohman
2903f7fc26 Add support for ISD::SELECT in SplitVectorOp.
llvm-svn: 43072
2007-10-17 14:48:28 +00:00
Evan Cheng
524c0e6c3d Yet another test case for extract_subreg coalescing crash.
llvm-svn: 43063
2007-10-17 02:15:06 +00:00
Evan Cheng
09fa6ed483 Fix PR1734.
llvm-svn: 43035
2007-10-16 19:29:47 +00:00
Dale Johannesen
dd254c4efa New test for svn rev 43033, radar 5538745.
llvm-svn: 43034
2007-10-16 18:10:14 +00:00
Evan Cheng
f5bcd3d737 LowerFP_TO_SINT must not create a stack object if it's not needed.
llvm-svn: 43004
2007-10-15 20:11:21 +00:00
Dan Gohman
2dc6099def Reapply the fix in 42908 for this file. This changes the function names
from "test" to "foo" so that they don't match the grep -i ST.

llvm-svn: 43001
2007-10-15 19:22:17 +00:00
Evan Cheng
43887d3714 Fix PR1729: watch out for val# with no def.
llvm-svn: 42996
2007-10-15 18:33:50 +00:00
Tanya Lattner
3a64752342 Fix run line.
llvm-svn: 42990
2007-10-15 16:35:13 +00:00
Evan Cheng
850c8739dc New test case.
llvm-svn: 42963
2007-10-14 10:15:03 +00:00
Evan Cheng
33df6a6bed Revert 42908 for now.
llvm-svn: 42960
2007-10-14 05:57:21 +00:00
Evan Cheng
f5ed18f7d3 Fix test case.
llvm-svn: 42949
2007-10-13 03:14:06 +00:00
Evan Cheng
6101e4ffdf New tests.
llvm-svn: 42948
2007-10-13 03:10:54 +00:00
Dan Gohman
c96f2809ca Fix this test to not depend on the assembly output containing something
that includes the string "st". This probably fixes the regression on
Darwin.

llvm-svn: 42932
2007-10-12 20:42:14 +00:00
Dan Gohman
a75e4a62e6 Change the names used for internal labels to use the current
function symbol name instead of a codegen-assigned function
number.

Thanks Evan! :-)

llvm-svn: 42908
2007-10-12 14:53:36 +00:00
Evan Cheng
51791564b0 Doh.
llvm-svn: 42901
2007-10-12 09:10:27 +00:00
Evan Cheng
947b4a6c3d EXTRACT_SUBREG test case.
llvm-svn: 42900
2007-10-12 09:03:31 +00:00
Arnold Schwaighofer
f1e49dd41d Added missing -march=x86 flag.
llvm-svn: 42893
2007-10-12 07:49:48 +00:00
Dan Gohman
ab5c3ed0d1 Add intrinsics for sin, cos, and pow. These use llvm_anyfloat_ty, and so
may be overloaded with vector types. And add a testcase for codegen for
these.

llvm-svn: 42885
2007-10-12 00:01:22 +00:00
Dan Gohman
9a70be46f1 Add an explicit target triple to make this test behave as expected on
non-Apple hosts. And use the count script instead of wc + grep.

llvm-svn: 42878
2007-10-11 23:04:36 +00:00
Arnold Schwaighofer
d47210011e Added tail call optimization to the x86 back end. It can be
enabled by passing -tailcallopt to llc.  The optimization is
performed if the following conditions are satisfied:
* caller/callee are fastcc
* elf/pic is disabled OR
  elf/pic enabled + callee is in module + callee has
  visibility protected or hidden

llvm-svn: 42870
2007-10-11 19:40:01 +00:00
Dan Gohman
708e76e663 These two tests now require only two multiply instructions,
instead of four.

llvm-svn: 42784
2007-10-09 15:39:37 +00:00
Evan Cheng
25b65542d9 Update test.
llvm-svn: 42775
2007-10-08 22:20:32 +00:00
Dan Gohman
9da3bddf43 These two tests now require only three multiply instructions,
instead of four.

llvm-svn: 42765
2007-10-08 20:48:12 +00:00
Dale Johannesen
b600202c68 Make test work on non-x86 hosts.
llvm-svn: 42671
2007-10-06 01:22:39 +00:00
Evan Cheng
0a642eaa62 Test case for 3-address conversion.
llvm-svn: 42664
2007-10-05 23:33:09 +00:00
Evan Cheng
dc467c6323 Enable convertToThreeAddress for X86 by default.
llvm-svn: 42655
2007-10-05 22:31:10 +00:00
Evan Cheng
6fd2606ff5 New test case.
llvm-svn: 42628
2007-10-05 01:44:22 +00:00
Evan Cheng
1d3c836933 -pre-RA-sched=none, simple, simple-noitin are gone.
llvm-svn: 42505
2007-10-01 22:17:20 +00:00
Dan Gohman
02f80006f8 Teach SplitVectorOp how to split INSERT_VECTOR_ELT.
llvm-svn: 42457
2007-09-28 23:53:40 +00:00
Rafael Espindola
01b306e575 Refactor the memcpy lowering for the x86 target.
The only generated code difference is that now we call memcpy when
the size of the array is unknown. This matches GCC behavior and is
better since the run time value can be arbitrarily large.

llvm-svn: 42433
2007-09-28 12:53:01 +00:00
Dale Johannesen
e61886cee4 Add sqrt and powi intrinsics for long double.
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Dale Johannesen
57b6470e8b Modernize fabs.ll, add long double. Add tests
for direct codegen of fsin/fcos.

llvm-svn: 42369
2007-09-26 21:12:10 +00:00
Dan Gohman
1bb346f9f1 When both x/y and x%y are needed (x and y both scalar integer), compute
both results with a single div or idiv instruction. This uses new X86ISD
nodes for DIV and IDIV which are introduced during the legalize phase
so that the SelectionDAG's CSE can automatically eliminate redundant
computations.

llvm-svn: 42308
2007-09-25 18:23:27 +00:00
Dale Johannesen
fe773726a9 Some tests for APFloat conversions.
llvm-svn: 42303
2007-09-25 17:50:55 +00:00
Evan Cheng
dab211c87b Forgot to check in the changes. Fix test case so it doesn't break with any scheduling changes.
llvm-svn: 42302
2007-09-25 17:47:38 +00:00
Dan Gohman
dd675a5064 Use the correct result value type instead of using getValueType(0)
in ExpandEXTRACT_VECTOR_ELT and SplitVectorOp. This fixes an abort
in the included testcase.

llvm-svn: 42264
2007-09-24 15:54:53 +00:00
Dale Johannesen
a928e8b8b2 Implementation of +sse -sse2 has changed; add
-sse to preserve intent of this test.

llvm-svn: 42247
2007-09-23 14:58:14 +00:00
Rafael Espindola
11ee0898b9 Don't add a default STACK_ALIGN (use the generic ABI alignment)
Implement calls to functions with byval arguments on X86

llvm-svn: 42192
2007-09-21 15:50:22 +00:00
Dan Gohman
eb622df2ef Fix several more entries in the x86 reload/remat folding tables.
llvm-svn: 42162
2007-09-20 14:17:21 +00:00
Evan Cheng
28a7839505 Clean up.
llvm-svn: 42112
2007-09-18 22:56:31 +00:00
Evan Cheng
2716b97b13 Fix a bogus splat xform:
shuffle <undef, undef, x, undef>, <undef, undef, undef, undef>, <2, 2, 2, 2>
!=
<undef, undef, x, undef>

llvm-svn: 42111
2007-09-18 21:54:37 +00:00
Bill Wendling
803e0d9970 Objective-C was generating EH frame info like this:
"_-[NSString(local) isNullOrNil]".eh = 0
        .no_dead_strip  "_-[NSString(local) isNullOrNil]".eh

The ".eh" should be inside the quotes.

llvm-svn: 42074
2007-09-18 01:47:22 +00:00
Dan Gohman
1aeaeec570 Emit integer x<1 as x<=0, as comparisons with zero (now includeing
64-bit) can use test instead of cmp with an immediate.

llvm-svn: 42026
2007-09-17 14:49:27 +00:00
Dan Gohman
b9449c9118 Use "test reg,reg" in place of "cmp reg,0" for 64-bit operands. This was
previously only done for 32-bit and smaller operands.

llvm-svn: 42024
2007-09-17 14:35:24 +00:00
Rafael Espindola
5d8b225881 Add support for functions with byval arguments on x86
llvm-svn: 41953
2007-09-14 15:48:13 +00:00
Dan Gohman
3bc1bc2590 Avoid storing and reloading zeros and other constants from stack slots
by flagging the associated instructions as being trivially rematerializable.

llvm-svn: 41775
2007-09-07 21:32:51 +00:00
Rafael Espindola
8c57e70f93 Add support for having different alignment for objects on call frames.
The x86-64 ABI states that objects passed on the stack have
8 byte alignment. Implement that.

llvm-svn: 41768
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
899c0c9c8d Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register
liveins and we let frontend solve type issue, not lowering code :)

llvm-svn: 41763
2007-09-07 11:39:35 +00:00
Anton Korobeynikov
0e3789f07a Proper handle case, when aliasee is external weak symbol referenced only by alias itself.
Also, fix a case, when target doesn't have weak symbols supported.

llvm-svn: 41746
2007-09-06 17:21:48 +00:00
Evan Cheng
896c1ed385 Fix a bug in X86InstrInfo::convertToThreeAddress that caused it to codegen:
leal    (,%rcx,8), %rcx
It should be
leal    (,%rcx,8), %ecx

llvm-svn: 41735
2007-09-06 00:14:41 +00:00
Dale Johannesen
f9ca7b6094 Change all floating constants that are not exactly
representable to use hex format.

llvm-svn: 41722
2007-09-05 17:50:36 +00:00
Evan Cheng
bb21883dd3 Fix for PR1632. EHSELECTION always produces a i32 value.
llvm-svn: 41712
2007-09-04 20:39:26 +00:00
Rafael Espindola
4ddaad4de0 Initial support for calling functions with byval arguments on x86-64
llvm-svn: 41643
2007-08-31 15:06:30 +00:00
Evan Cheng
064691b876 Update test case to reflect Dale's change.
llvm-svn: 41639
2007-08-31 06:29:32 +00:00
Tanya Lattner
0b279ff814 Do not run on darwin.
llvm-svn: 41608
2007-08-30 16:07:20 +00:00
Evan Cheng
cb317912b2 Added support to fold X86 load / store instructions. This allow rematerialized loads to be folded into their uses.
llvm-svn: 41599
2007-08-30 05:54:07 +00:00
Dan Gohman
c6e88b9bc2 Add explicit triples to avoid default behavior that varies by host.
llvm-svn: 41510
2007-08-27 20:54:48 +00:00
Dan Gohman
2e7e251f24 If the source and destination pointers in an llvm.memmove are known
to not alias each other, it can be translated as an llvm.memcpy.

llvm-svn: 41489
2007-08-27 16:26:13 +00:00
Rafael Espindola
3d52fe3ef3 call libc memcpy/memset if array size is bigger then threshold.
Coping 100MB array (after a warmup) shows that glibc 2.6.1 implementation on
x86-64 (core 2) is 30% faster (from 0.270917s to 0.188079s)

llvm-svn: 41479
2007-08-27 10:18:20 +00:00
Evan Cheng
703bafa177 Test dag xform: Fold C ? 0 : 1 to ~C or zext(~C) or trunc(~C)
llvm-svn: 41164
2007-08-18 06:11:57 +00:00
Evan Cheng
97e0a167ec New test. Make sure dynamic_stackalloc size is rounded up.
llvm-svn: 41135
2007-08-16 23:52:23 +00:00
Evan Cheng
625e712911 Update test: dynamic_stackalloc size *must* be rounded to ensure stack ptr be left in a valid state.
llvm-svn: 41134
2007-08-16 23:51:28 +00:00
Rafael Espindola
817adb6532 add byval test
llvm-svn: 41123
2007-08-16 13:09:02 +00:00
Dan Gohman
34263074cb Convert tests using "grep -c ... | grep ..." to use the count script.
llvm-svn: 41100
2007-08-15 13:49:33 +00:00
Dan Gohman
10c3892fde Delete extraneous uses of wc -l.
llvm-svn: 41099
2007-08-15 13:45:35 +00:00
Dan Gohman
f259c770df Convert another test to use the count script. This one didn't fit the
regex used to convert all the others because the first '|' was on a
separate line.

llvm-svn: 41098
2007-08-15 13:42:36 +00:00
Dan Gohman
794fa1f8f7 Convert tests using "| wc -l | grep ..." to use the count script.
llvm-svn: 41097
2007-08-15 13:36:28 +00:00
Chris Lattner
603e77e54e tcl seems to hate |& for some reason.
llvm-svn: 41073
2007-08-14 16:19:35 +00:00
Chris Lattner
a76ba56608 switch this to use fastcc to avoid fpstack traffic on x86-32. Switch to
using the count script instead of wc -l

llvm-svn: 41072
2007-08-14 16:14:10 +00:00
Evan Cheng
5c28086ce6 Update test case. A spill should now be deleted.
llvm-svn: 41070
2007-08-14 09:16:00 +00:00
Evan Cheng
fb29461720 Spiller reuse test case.
llvm-svn: 41068
2007-08-14 05:51:03 +00:00
Evan Cheng
e79599dc2d Now capable of rematerializing coalesced live intervals.
llvm-svn: 41061
2007-08-13 23:54:16 +00:00
Dan Gohman
2390ff5060 When x86 addresses matching exceeds its recursion limit, check to
see if the base register is already occupied before assuming it can be
used. This fixes bogus code generation in the accompanying testcase.

llvm-svn: 41049
2007-08-13 20:03:06 +00:00
Chris Lattner
7dfec1ee54 Fix PR1607
llvm-svn: 41048
2007-08-13 18:42:37 +00:00
Christopher Lamb
6c79abee5d Fix test so it passes.
llvm-svn: 41012
2007-08-10 22:20:57 +00:00
Christopher Lamb
450f6815b9 Increase efficiency of sign_extend_inreg by using subregisters for truncation. As the README suggests sign_extend_subreg is selected to (sext(trunc)).
llvm-svn: 41010
2007-08-10 21:48:46 +00:00
Christopher Lamb
7196f0d724 Add 2-addr to 3-addr promotion code that allows 32-bit LEA to be used via subregisters when 16-bit LEA is disabled.
llvm-svn: 41007
2007-08-10 21:18:25 +00:00
Dan Gohman
f18e94535f Fix EXTRACT_ELEMENT, EXTRACT_SUBVECTOR, and EXTRACT_VECTOR_ELT to
use an intptr ValueType instead of i32 for the index operand in
getCopyToParts.

llvm-svn: 40987
2007-08-10 14:59:38 +00:00
Chris Lattner
f2a88ac82d allow this to pass on ppc hosts.
llvm-svn: 40846
2007-08-05 18:48:18 +00:00
Dan Gohman
1afde4166e Fix the alignment requirements of several unpck and shuf instructions.
Generalize isPSHUFDMask and add a unary SHUFPD pattern so that SHUFPD's
memory operand alignment can be tested as well, with a fix to avoid
breaking MMX's use of isPSHUFDMask.

llvm-svn: 40756
2007-08-02 21:17:01 +00:00
Dan Gohman
a599a813d5 Mark the SSE and MMX load instructions that
X86InstrInfo::isReallyTriviallyReMaterializable knows how to handle
with the isReMaterializable flag so that it is given a chance to handle
them. Without hoisting constant-pool loads from loops this isn't very
visible, though it does keep CodeGen/X86/constant-pool-remat-0.ll from
making a copy of the constant pool on the stack.

llvm-svn: 40736
2007-08-02 14:27:55 +00:00
Evan Cheng
5a30bb6d47 Fix test.
llvm-svn: 40721
2007-08-02 05:04:16 +00:00
Evan Cheng
8183a284fd New test. Bogus implicit-def prevented a copy from being coalesced.
llvm-svn: 40690
2007-08-01 20:26:40 +00:00
Chris Lattner
5d3a429915 we're now handling this right :)
llvm-svn: 40675
2007-08-01 17:10:30 +00:00
Evan Cheng
7a025bad7a Requires SSE2.
llvm-svn: 40657
2007-08-01 00:10:12 +00:00
Dan Gohman
e3464e6bec Change the x86 assembly output to use tab characters to separate the
mnemonics from their operands instead of single spaces. This makes the
assembly output a little more consistent with various other compilers
(f.e. GCC), and slightly easier to read. Also, update the regression
tests accordingly.

llvm-svn: 40648
2007-07-31 20:11:57 +00:00
Evan Cheng
3493ec0ce1 Redo and generalize previously removed opt for pinsrw: (vextract (v4i32 bc (v4f32 s2v (f32 load ))), 0) -> (i32 load )
llvm-svn: 40628
2007-07-31 08:04:03 +00:00
Dan Gohman
0252aa07ee Re-apply 40504, but with a fix for the segfault it caused in oggenc:
Make the alignedload and alignedstore patterns always require 16-byte
alignment. This way when they are used in the "Fs" instructions, in which
a vector instruction is used for a scalar purpose, they can still require
the full vector alignment. And add a regression test for this.

llvm-svn: 40555
2007-07-27 17:16:43 +00:00
Evan Cheng
cb8f08ebca Reverting 40504 for now. It's breaking oggenc.
llvm-svn: 40547
2007-07-27 01:37:47 +00:00
Evan Cheng
7b20c11ccf Test case for PR1573.
llvm-svn: 40539
2007-07-26 17:45:57 +00:00
Evan Cheng
a681654ef4 Fix test.
llvm-svn: 40536
2007-07-26 17:07:03 +00:00
Dan Gohman
513dcba4f8 Remove X86ISD::LOAD_PACK and X86ISD::LOAD_UA and associated code from the
x86 target, replacing them with the new alignment attributes on memory
references.

llvm-svn: 40504
2007-07-26 00:31:09 +00:00
Dan Gohman
a2e07a38bc Use movaps to load a v4f32 build_vector of all-constant values into a
register instead of loading each element individually.

llvm-svn: 40478
2007-07-24 22:55:08 +00:00
Dan Gohman
df9edb66c2 Update these regression tests to accomodate X86InstrSSE.td now using movups/movaps
for everything.

llvm-svn: 40101
2007-07-20 16:31:26 +00:00
Evan Cheng
d846db5ab8 New test.
llvm-svn: 40077
2007-07-20 00:27:56 +00:00
Evan Cheng
d7a079b7e2 New test.
llvm-svn: 40073
2007-07-19 23:53:50 +00:00
Evan Cheng
b95db5ea4b Try fixing it again.
llvm-svn: 40072
2007-07-19 23:53:29 +00:00
Reid Spencer
44d34e9b61 For PR1553:
Change the keywords for the zext and sext parameter attributes to be 
zeroext and signext so they don't conflict with the keywords for the
instructions of the same name. This gets around the ambiguity.

llvm-svn: 40069
2007-07-19 23:13:04 +00:00
Bill Wendling
649bfb8c03 Don't need the "&&" to glue lines together.
llvm-svn: 40063
2007-07-19 18:06:26 +00:00
Bill Wendling
ca081ee3f7 Testcase for PR1549
llvm-svn: 40041
2007-07-19 06:31:11 +00:00
Evan Cheng
626af8e187 New test.
llvm-svn: 40020
2007-07-18 21:39:16 +00:00
Dan Gohman
2fc9d5171e Implement initial memory alignment awareness for SSE instructions. Vector loads
and stores that have a specified alignment of less than 16 bytes now use
instructions that support misaligned memory references.

llvm-svn: 40015
2007-07-18 20:23:34 +00:00
Dan Gohman
4c140b7128 It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment.

llvm-svn: 40004
2007-07-18 16:29:46 +00:00
Evan Cheng
0c49836a9f Fix test.
llvm-svn: 39976
2007-07-17 18:16:09 +00:00
Evan Cheng
532b73311e Use push / pop for prologues and epilogues.
llvm-svn: 39967
2007-07-17 07:59:08 +00:00
Dale Johannesen
469ed8e17e Skeleton of post-RA scheduler; doesn't do anything yet.
Change name of -sched option and DEBUG_TYPE to
pre-RA-sched; adjust testcases.

llvm-svn: 39816
2007-07-13 17:13:54 +00:00
Evan Cheng
9f43f89d89 Add test case for PR1545.
llvm-svn: 39749
2007-07-11 19:29:05 +00:00
Dan Gohman
629311ca52 Change the peep for EXTRACT_VECTOR_ELT of BUILD_PAIR to look for
the new CONCAT_VECTORS node type instead, as that's what legalize
uses now. And add a peep for EXTRACT_VECTOR_ELT of INSERT_VECTOR_ELT.

llvm-svn: 38503
2007-07-10 18:20:44 +00:00
Dan Gohman
5202c50198 Add a regression test for folding spill code into scalar min and max.
llvm-svn: 38492
2007-07-10 15:34:29 +00:00
Chris Lattner
9ce649f66e force a cpu without SSE
llvm-svn: 38466
2007-07-09 17:35:18 +00:00
Chris Lattner
5f21d8c4a8 allow this to work on ppc-darwin
llvm-svn: 38465
2007-07-09 17:32:28 +00:00
Bill Wendling
3600c7a835 Allow a GR64 to be moved into an MMX register via the "movd" instruction.
Still need to have JIT generate this code.

llvm-svn: 37863
2007-07-04 00:19:54 +00:00
Dale Johannesen
a12e448c37 New testcases for rev 37847 (PR's 1489 and 1505).
llvm-svn: 37848
2007-07-03 00:58:37 +00:00
Dan Gohman
965e6efe24 Add a basic test-case for passing and returning <4 x double> and
<8 x float> values on X86.

llvm-svn: 37845
2007-07-02 16:23:47 +00:00
Dan Gohman
f46ec01deb New test case. DAGCombiner should be able to fold -sin(-x)
in -enable-unsafe-fp-math mode.

llvm-svn: 37841
2007-07-02 15:43:20 +00:00
Evan Cheng
bf3744d05b New test.
llvm-svn: 37823
2007-06-29 23:17:15 +00:00
Evan Cheng
f07b7f27f2 New test.
llvm-svn: 37815
2007-06-29 21:40:30 +00:00
John Criswell
57e5ed4b5a Convert .cvsignore files
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Evan Cheng
995493fd4a New tests.
llvm-svn: 37787
2007-06-29 00:27:18 +00:00
Evan Cheng
f1397aafd9 New test case: identity operation of RHS / LHS of a VECTOR_SHUFFLE.
llvm-svn: 37637
2007-06-19 00:06:08 +00:00
Chris Lattner
4534df9032 ensure we don't regress on these tests. We generate aweful code in x86-32 for
these though.

llvm-svn: 37619
2007-06-17 23:29:57 +00:00
Bill Wendling
ad8326e004 XFAILing until I can fix properly.
llvm-svn: 37618
2007-06-16 23:57:51 +00:00
Bill Wendling
e90b29f646 Testcase for MMX int to MMX register failure.
llvm-svn: 37612
2007-06-16 06:31:47 +00:00
Chris Lattner
f75572a776 make this test harder, include a tied register.
llvm-svn: 37600
2007-06-15 19:09:53 +00:00
Dale Johannesen
62f49dd524 Do not treat FP_REG_KILL as terminator in branch analysis (X86).
llvm-svn: 37578
2007-06-14 22:03:45 +00:00
Chris Lattner
ea380b16b7 new testcase for PR1495
llvm-svn: 37452
2007-06-06 01:21:46 +00:00
Evan Cheng
ba4c97df9f New test.
llvm-svn: 37431
2007-06-05 01:45:08 +00:00
Dale Johannesen
a68662e4a4 Tail merging wasn't working for predecessors of landing pads. PR 1496.
llvm-svn: 37427
2007-06-04 23:52:54 +00:00
Dale Johannesen
fd7f1ad2f7 Implement smarter algorithm for choosing which blocks to tail-merge.
See test/CodeGen/X86/test-pic-jtbl.ll for a case where it works well;
shaves another 10K off our favorite benchmark.  I was hesitant about
this because of compile speed, but seems to do OK on a bootstrap.

llvm-svn: 37392
2007-06-01 23:02:45 +00:00
Dale Johannesen
54db6d2e4d tail merging shrinks this code a bit. Could do more in future.
llvm-svn: 37316
2007-05-23 21:09:26 +00:00
Evan Cheng
cfb1ffc73f Add test for PR1259.
llvm-svn: 37273
2007-05-21 23:30:33 +00:00
Chris Lattner
ac4e2f1414 add source
llvm-svn: 37253
2007-05-19 01:22:52 +00:00
Chris Lattner
a0fc844390 new testcase
llvm-svn: 37251
2007-05-19 01:21:39 +00:00
Evan Cheng
c741fd8106 New test case.
llvm-svn: 37174
2007-05-17 18:49:50 +00:00
Chris Lattner
4922cfb5b2 testcase for PR1427
llvm-svn: 37140
2007-05-17 03:29:17 +00:00
Chris Lattner
7db5630b2b testcase for maskmovq
llvm-svn: 37101
2007-05-16 06:14:10 +00:00
Evan Cheng
eee2e3bfab New test.
llvm-svn: 37048
2007-05-14 20:47:21 +00:00
Evan Cheng
0f1466ebc1 Doh. .cpp -> .ll
llvm-svn: 37047
2007-05-14 20:43:28 +00:00
Duncan Sands
f84f319401 Testcase for PR1398.
llvm-svn: 36905
2007-05-07 20:45:20 +00:00
Chris Lattner
c2c16a967e remove this xfail'd test, move it to the X86 readme.
llvm-svn: 36800
2007-05-05 22:10:53 +00:00
Chris Lattner
d3d8aaf877 We need support for tail calls, this is moved to PR1392
llvm-svn: 36798
2007-05-05 22:03:12 +00:00
Chris Lattner
faf5ed3a6b new testcase for PR1371
llvm-svn: 36786
2007-05-05 19:38:43 +00:00
Evan Cheng
3116234ebc negatize -> negative
llvm-svn: 36683
2007-05-03 18:20:17 +00:00
Reid Spencer
01a611f06a Split target dependent test portions to target-specific directories.
llvm-svn: 36612
2007-05-01 02:56:15 +00:00
Reid Spencer
6045236615 For PR1370:
Rearrange some tests so that if PowerPC is not being built we don't try to
run PowerPC specific tests.

llvm-svn: 36587
2007-04-30 05:11:58 +00:00
Anton Korobeynikov
f807cfe71f Updated aliases test
llvm-svn: 36558
2007-04-29 10:34:42 +00:00
Chris Lattner
937ced8d2c new testcase for PR1356
llvm-svn: 36535
2007-04-28 06:41:13 +00:00
Chris Lattner
6556ee94c9 update for new inline asm syntax
llvm-svn: 36526
2007-04-28 05:20:26 +00:00
Dan Gohman
a5891279ef testcase for PR1339: http://llvm.org/PR1339
llvm-svn: 36492
2007-04-26 21:04:39 +00:00
Anton Korobeynikov
4ddd712259 Add test to proper place. Also, XFAIL until ppc bootstrap will be ok.
llvm-svn: 36491
2007-04-26 20:49:05 +00:00
Anton Korobeynikov
3e0f9076d0 Fixx off-by-one bug, which prevents llvm-gcc bootstrap on ppc32
llvm-svn: 36490
2007-04-26 20:44:04 +00:00
Evan Cheng
908f2265de PR1348 test case.
llvm-svn: 36457
2007-04-26 01:14:14 +00:00
Evan Cheng
1f7af4892a New test case.
llvm-svn: 36455
2007-04-26 00:07:36 +00:00
Chris Lattner
22ce25e1ec && no longer needed
llvm-svn: 36453
2007-04-25 22:32:55 +00:00
Bill Wendling
43dbe6d0d2 Testcase for codegen bug.
llvm-svn: 36450
2007-04-25 21:58:17 +00:00
Anton Korobeynikov
25dc9a61cb Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
will follow.

llvm-svn: 36435
2007-04-25 14:27:10 +00:00
Chris Lattner
a5b8a2b50e new testcase that crashes llc
llvm-svn: 36412
2007-04-25 00:00:12 +00:00
Bill Wendling
c41beb8e13 Testcases for MMX.
llvm-svn: 36408
2007-04-24 22:28:30 +00:00
Lauro Ramos Venancio
e9c75ee05b Add TLS tests.
llvm-svn: 36360
2007-04-23 01:29:35 +00:00
Reid Spencer
6dbda77071 Use the llvm_supports_target function to prevent running of tests for
targets that LLVM is not configured to support.

llvm-svn: 36315
2007-04-21 20:41:27 +00:00
Evan Cheng
98d8512d2c Fix test.
llvm-svn: 36266
2007-04-20 00:45:36 +00:00
Chris Lattner
4bb1ca868a new testcase
llvm-svn: 36243
2007-04-18 03:04:37 +00:00
Evan Cheng
8080cdfd60 New crasher test case.
llvm-svn: 36241
2007-04-18 02:35:10 +00:00
Anton Korobeynikov
9bc4b792bf Implemented correct stack probing on mingw/cygwin for dynamic alloca's.
Also, fixed static case in presence of eax livin. This fixes PR331

PS: Why don't we still have push/pop instructions? :)
llvm-svn: 36195
2007-04-17 09:20:00 +00:00
Chris Lattner
8e80b077c8 refix this
llvm-svn: 36172
2007-04-16 21:30:21 +00:00
Chris Lattner
21e25d6aa6 use an x86 t-t for an x86 test. Thanks to Dan for noticing this!
llvm-svn: 36170
2007-04-16 21:26:37 +00:00
Chris Lattner
513bdd23e0 fix this test
llvm-svn: 36160
2007-04-16 21:05:37 +00:00
Evan Cheng
097bb4df97 Fixes tests and remove xfail.
llvm-svn: 36152
2007-04-16 20:04:11 +00:00
Evan Cheng
fe50dfe505 One more callee-saved register used.
llvm-svn: 36151
2007-04-16 18:59:25 +00:00
Reid Spencer
df17fa8ef9 For PR1319:
Remove && from the end of the lines to prevent tests from throwing run
lines into the background. Also, clean up places where the same command
is run multiple times by using a temporary file.

llvm-svn: 36142
2007-04-16 17:36:08 +00:00
Reid Spencer
43899915e9 For PR1319:
Fix syntax of tests to ensure grep pattern is properly quoted.

llvm-svn: 36134
2007-04-16 15:31:49 +00:00
Reid Spencer
d93b834b52 For PR1319:
Fix test syntax per new rules.

llvm-svn: 36133
2007-04-16 15:15:52 +00:00
Reid Spencer
8e4a595f77 For PR1336:
Rename test functions to not conflict with an instruction mnemonic.

llvm-svn: 36130
2007-04-16 14:23:07 +00:00
Reid Spencer
bb43799aa9 For PR1336:
Ignore case for instruction mnemonic comparison.

llvm-svn: 36129
2007-04-16 14:20:28 +00:00
Reid Spencer
37e4686e85 Wrap long line.
llvm-svn: 36128
2007-04-16 14:17:04 +00:00
Reid Spencer
92d0a986ea For PR1336:
Ignore case for register name compare.

llvm-svn: 36127
2007-04-16 14:14:31 +00:00
Reid Spencer
8f0fe6f2cf For PR1336:
XFAIL tests covered by the PR. These will be un-XFAILed as they are fixed.

llvm-svn: 36093
2007-04-15 23:00:46 +00:00
Reid Spencer
9d19c17dab For PR1319: Upgrade to new test harness.
llvm-svn: 36091
2007-04-15 22:20:47 +00:00
Chris Lattner
49c74d2ff7 this test isn't testing what it thought it was
llvm-svn: 36088
2007-04-15 21:33:36 +00:00
Chris Lattner
c65c4e9916 New testcase
llvm-svn: 35969
2007-04-13 20:28:08 +00:00
Chris Lattner
e3db14f830 new testcase
llvm-svn: 35942
2007-04-12 05:58:21 +00:00
Reid Spencer
56b310ae49 Make the llvm-runtest function much more amenable by eliminating all the
global variables that needed to be passed in. This makes it possible to
add new global variables with only a couple changes (Makefile and llvm-dg.exp)
instead of touching every single dg.exp file.

llvm-svn: 35918
2007-04-11 19:56:59 +00:00
Chris Lattner
e557a69c34 this got better
llvm-svn: 35908
2007-04-11 16:12:27 +00:00
Chris Lattner
e827f7dfe6 new testcases for integer abs function
llvm-svn: 35880
2007-04-11 05:02:57 +00:00
Chris Lattner
d75e2127c8 add another test
llvm-svn: 35801
2007-04-09 05:26:48 +00:00
Chris Lattner
45ebb3ba95 The x constraint allows scalar FP values as well as vectors.
llvm-svn: 35798
2007-04-09 05:11:03 +00:00
Chris Lattner
b9f8792e26 testcase for PR1314
llvm-svn: 35778
2007-04-08 22:22:53 +00:00
Evan Cheng
89768803e7 Better still.
llvm-svn: 35663
2007-04-04 08:49:40 +00:00
Evan Cheng
3af3f8e696 These got better.
llvm-svn: 35661
2007-04-04 07:41:15 +00:00
Chris Lattner
3d0eeb2046 fix this testcase on ppc hosts
llvm-svn: 35603
2007-04-02 20:39:48 +00:00
Reid Spencer
6a1841b291 Let llvm-upgrade upgrade the bswap intrinsic.
llvm-svn: 35569
2007-04-02 01:09:19 +00:00
Reid Spencer
f5e95d339f For PR1297:
Update these test cases to use proper signatures for bswap which is now
and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32
since both the parameter and the result or of type "iAny". Also, the
bit counting intrinsics changed to always return i32.

llvm-svn: 35548
2007-04-01 07:36:28 +00:00
Chris Lattner
8c48bc4ec0 add a testcase for x86
llvm-svn: 35516
2007-03-30 21:22:46 +00:00
Chris Lattner
9dca6fc9d4 new testcases
llvm-svn: 35433
2007-03-28 18:11:17 +00:00
Chris Lattner
a22ce41d77 new testcase
llvm-svn: 35432
2007-03-28 18:03:14 +00:00
Reid Spencer
50ee6b8557 Remove use of implementation keyword.
llvm-svn: 35412
2007-03-28 02:38:26 +00:00
Chris Lattner
99ba969ae3 new testcase
llvm-svn: 35331
2007-03-25 05:00:23 +00:00
Chris Lattner
60fa65770f new testcase
llvm-svn: 35326
2007-03-25 04:35:23 +00:00
Chris Lattner
6aa707f1b2 new testcase
llvm-svn: 35323
2007-03-25 02:17:58 +00:00
Chris Lattner
62598bf96c new testcase
llvm-svn: 35317
2007-03-25 01:44:40 +00:00
Chris Lattner
10311baf63 These functions should use shll, not lea.
llvm-svn: 35203
2007-03-20 06:01:41 +00:00
Reid Spencer
c124adcc12 For PR1258:
Revise numeric value references to accommodate collapsed type planes.

llvm-svn: 35170
2007-03-19 18:27:35 +00:00
Devang Patel
f215bd701b Test case for X86 inline asm constraint 'I'
llvm-svn: 35130
2007-03-17 00:14:52 +00:00
Bill Wendling
8ced23ee5a And now support for MMX logical operations.
llvm-svn: 35125
2007-03-16 09:44:46 +00:00
Bill Wendling
feaff80149 Multiplication support for MMX.
llvm-svn: 35118
2007-03-15 21:24:36 +00:00
Evan Cheng
64f09e6241 This got better.
llvm-svn: 35090
2007-03-13 23:26:41 +00:00
Bill Wendling
236cfc4344 Adding more arithmetic operators to MMX. This is an almost exact copy of
the addition. Please let me know if you have suggestions.

llvm-svn: 35055
2007-03-10 09:57:05 +00:00
Chris Lattner
cec3666863 upgrade this testcase, add test for fp immediate to memory operand.
llvm-svn: 35034
2007-03-08 22:33:06 +00:00
Bill Wendling
4fbc327c54 Add MMX arithmetic testcase.
llvm-svn: 35032
2007-03-08 22:14:51 +00:00
Bill Wendling
c52174dee3 Add the emms intrinsic for MMX support.
llvm-svn: 34938
2007-03-05 23:09:45 +00:00
Evan Cheng
ce6c3c3004 Add a new test case.
llvm-svn: 34842
2007-03-02 10:37:19 +00:00
Anton Korobeynikov
eaf27d276a Ensure that fastcall'ed function is correctly mangled & stack is
properly aligned

llvm-svn: 34788
2007-03-01 16:29:22 +00:00
Chris Lattner
9d7106a01c Eliminate enable-x86-fastcc
llvm-svn: 34753
2007-02-28 18:38:58 +00:00
Chris Lattner
1fa940fc5f fastcc -> fastcall
llvm-svn: 34749
2007-02-28 18:35:36 +00:00
Chris Lattner
310a8f7f8f fastcc -> fastcall
llvm-svn: 34747
2007-02-28 18:21:50 +00:00
Chris Lattner
07db51943e fastcc -> fastcall
llvm-svn: 34746
2007-02-28 17:42:50 +00:00
Chris Lattner
0a14efc457 new testcase
llvm-svn: 34622
2007-02-26 03:16:20 +00:00
Chris Lattner
5c1d3eff0a new testcase
llvm-svn: 34614
2007-02-25 23:08:29 +00:00
Chris Lattner
4d419b02ec new testcase
llvm-svn: 34612
2007-02-25 22:23:15 +00:00
Chris Lattner
200d389a17 verify that double is returned in XMM0 if the function is fastcc.
llvm-svn: 34591
2007-02-25 09:30:03 +00:00
Chris Lattner
b71ec8d1cf new testcase
llvm-svn: 34583
2007-02-25 08:23:01 +00:00
Chris Lattner
a38cc935a9 verify i128 return on x86-64 continues to codegen optimally.
llvm-svn: 34575
2007-02-25 06:06:49 +00:00
Evan Cheng
aa8e491a2f Added test case for PR1207.
llvm-svn: 34429
2007-02-19 21:53:59 +00:00
Dale Johannesen
960bd79f88 Fixes PR 1200
llvm-svn: 34359
2007-02-17 00:44:34 +00:00
Chris Lattner
e85be004b9 new testcase, by Dan Gohman
llvm-svn: 34255
2007-02-13 23:41:24 +00:00
Evan Cheng
4b13f9f031 i64 setcc tests.
llvm-svn: 34067
2007-02-08 22:27:55 +00:00
Reid Spencer
c7525207b8 Make the RUN: line readable.
llvm-svn: 33906
2007-02-05 10:09:41 +00:00
Reid Spencer
b33f883a96 For PR411:
Don't re-use var names.

llvm-svn: 33899
2007-02-05 04:00:04 +00:00
Chris Lattner
4223274f91 new testcase for x86 backend miscompilation
llvm-svn: 33883
2007-02-04 20:15:15 +00:00
Reid Spencer
591bfa1e0b Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Reid Spencer
82293f34de For PR411:
Update these tests to not use the same name even though the type of the
value differs. After PR411 hits, type planes will be gone and it will be
illegal for a name to be used twice, regardless of type.

llvm-svn: 33660
2007-01-30 16:16:01 +00:00
Chris Lattner
1800f109f8 test that the 'ir' constraint works.
llvm-svn: 33646
2007-01-29 23:55:20 +00:00
Reid Spencer
6a31ec1259 For PR761:
Remove "target endian/pointersize" or add "target datalayout" to make
the test parse properly or set the datalayout because defaults changes.

For PR645:
Make global names use the @ prefix.

For llvm-upgrade changes:
Fix test cases or completely remove use of llvm-upgrade for test cases
that cannot survive the new renaming or upgrade capabilities.

llvm-svn: 33533
2007-01-26 08:25:06 +00:00
Anton Korobeynikov
2509765bef * Fix one more bug in PIC codegen: extra load is needed for *all*
non-statics.
* Introduce new option to output zero-initialized data to .bss section.
This can reduce size of binaries. Enable it by default for ELF &
Cygwin/Mingw targets. Probably, Darwin should be also added.

llvm-svn: 33299
2007-01-17 10:33:08 +00:00
Reid Spencer
4572ce85b0 Regression is gone, don't try to find it on clean target.
llvm-svn: 33296
2007-01-17 07:59:14 +00:00