Commit Graph

37521 Commits

Author SHA1 Message Date
Tanya Lattner
ceca194c43 Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48137 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 07:21:50 +00:00
Evan Cheng
f79e60649a Avoid creating BUILD_VECTOR of all zero elements of "non-normalized" type (e.g. v8i16 on x86) after legalizer. Instruction selection does not expect to see them. In all likelihood this can only be an issue in a bugpoint reduced test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48136 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 07:19:13 +00:00
Chris Lattner
8d88dbcbae remove an execution test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48135 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 06:53:14 +00:00
Chris Lattner
3efa1a77b2 switch from hard coded g++/as tools to the ones detected from
the build system.  Patch by Joachim Durchholz  for PR2121



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48134 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 06:52:10 +00:00
Chris Lattner
27137a5e34 Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48133 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 06:49:40 +00:00
Chris Lattner
aadbda85a0 Fix PR2120 by changing the replacement order to change compile_cxx
before compile_c.  Patch by Joachim Durchholz!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 06:45:35 +00:00
Christopher Lamb
3feb0170a8 Allow insert_subreg into implicit, target-specific values.
Change insert/extract subreg instructions to be able to be used in TableGen patterns.
Use the above features to reimplement an x86-64 pseudo instruction as a pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48130 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 06:12:08 +00:00
Nick Lewycky
7e93e16193 Update the .cvs files to match today's asm syntax change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48128 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 05:01:34 +00:00
Christopher Lamb
02f693708d Revert accidentally committed local changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48126 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 04:16:09 +00:00
Christopher Lamb
620d741250 Add support in TableGen for unknown operands that infer their type from the pattern their used in. This will be used to allow insert/extract subreg patterns in .td files!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48125 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 04:13:41 +00:00
Nick Lewycky
9be3c97183 Turn unwind_to into "unwinds to".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48123 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 02:20:00 +00:00
Dale Johannesen
b8cafe3427 Increase ISD::ParamFlags to 64 bits. Increase the ByValSize
field to 32 bits, thus enabling correct handling of ByVal
structs bigger than 0x1ffff.  Abstract interface a bit.
Fixes gcc.c-torture/execute/pr23135.c and 
gcc.c-torture/execute/pr28982b.c in gcc testsuite (were ICE'ing
on ppc32, quietly producing wrong code on x86-32.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48122 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 02:17:22 +00:00
Anton Korobeynikov
29c8c37045 This works on x86_64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48121 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 22:24:03 +00:00
Chris Lattner
dc9971a2e3 Darwin PPC64 indirect call target goes in X12, not R12. This fixes these
two regression tests:
test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert.ll
test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert2.ll



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48120 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 20:49:33 +00:00
Chris Lattner
5e09da236e cell really does support cross-regclass moves, because R3 is in lots of different regclasses, and the code is not consistent when it comes to value tracking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 20:31:11 +00:00
Chris Lattner
68a0d0984d make sure ar.pfs is in a register class, this fixes test/CodeGen/IA64/ret-0.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48118 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 20:12:44 +00:00
Chris Lattner
4c55c633d9 remove an extraneous (and ugly) default argument, thanks Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48117 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 20:04:36 +00:00
Evan Cheng
7a0690d1b6 Fix RUN line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48116 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 19:55:22 +00:00
Ted Kremenek
58d5e05157 Fix some compilation errors on msvc:
- "Redefinition of I" (iterator masks previous definition)
- include missing header file

Patch by Argiris Kirtzidis!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48115 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 18:32:50 +00:00
Nick Lewycky
3c4a26226f And again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48112 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 17:13:05 +00:00
Nick Lewycky
f336983bbc Braces belong here. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48111 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 17:11:18 +00:00
Anton Korobeynikov
e2dc21aa1d Temporary XFAIL the test, until I'll commit a fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 16:24:04 +00:00
Nick Lewycky
a66696ef0d SCCP also needs to be taught to follow unwind_to
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48109 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 09:44:38 +00:00
Chris Lattner
4468c1fd1c fp_round's produced by getCopyFromParts should always be exact, because
they are produced by calls (which are known exact) and by cross block copies
which are known to be produced by extends.

This improves:

define double @test2() {
	%tmp85 = call double asm sideeffect "fld0", "={st(0)}"()
	ret double %tmp85
}

from:

_test2:
	subl	$20, %esp
	# InlineAsm Start
	fld0
	# InlineAsm End
	fstpl	8(%esp)
	movsd	8(%esp), %xmm0
	movsd	%xmm0, (%esp)
	fldl	(%esp)
	addl	$20, %esp
	#FP_REG_KILL
	ret

to:

_test2:
	# InlineAsm Start
	fld0
	# InlineAsm End
	#FP_REG_KILL
	ret

by avoiding a f64 <-> f80 trip



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48108 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 09:38:46 +00:00
Chris Lattner
f30e1cf9b7 teach X86InstrInfo::copyRegToReg how to copy into ST(0) from
an RFP register class.

Teach ScheduleDAG how to handle CopyToReg with different src/dst 
reg classes.

This allows us to compile trivial inline asms that expect stuff
on the top of x87-fp stack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48107 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 09:15:31 +00:00
Nick Lewycky
9143699260 Don't eliminate blocks that are only reachable by unwind_to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48106 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 08:50:23 +00:00
Chris Lattner
02b6d25a27 Add ScheduleDAG support for copytoreg where the src/dst register are
in different register classes, e.g. copy of ST(0) to RFP*.  This gets
some really trivial inline asm working that plops things on the top of
stack (PR879)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48105 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 08:49:15 +00:00
Chris Lattner
5c927500c8 add some code to support cross-register class copying from
RST -> RFP{32/64/80}.  We only handle ST(0) for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48104 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 08:46:19 +00:00
Tanya Lattner
76806b6a43 Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48103 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 08:16:40 +00:00
Chris Lattner
90b347dc90 rearrange some code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48101 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:58:04 +00:00
Chris Lattner
d9c4c450bf fix 80 col violation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48100 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:51:01 +00:00
Nick Lewycky
3f4cc3101e Firstly, having a BranchInst isn't exclusive with having an unwind_to.
Secondly, we have to check whether the branch is actually pointing to the block
with the unwind in it. We could have gotten here because of the unwind_to alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48099 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:50:37 +00:00
Chris Lattner
8dc023f684 claim ST(x) registers are 80 bits, which is true. This doesn't affect
codegen yet because these can't be spilled (they don't exist until after RA).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48098 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:49:01 +00:00
Chris Lattner
d43d85ccc9 extend fp values with FP_EXTEND not FP_ROUND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:47:22 +00:00
Nick Lewycky
db96ae9607 A BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_to
at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48096 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:36:38 +00:00
Gordon Henriksen
3b646de036 This patch cleans up the OCaml bindings so that they format nicely with
ocamldoc. It does not yet hook into the build system, though.

Patch by Erick Tryzelaar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48095 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:17:38 +00:00
Chris Lattner
afb23f48a4 rename FP_SETRESULT -> FP_SET_ST0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48094 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:08:44 +00:00
Chris Lattner
6fa2f9c636 rename FpGETRESULT32 -> FpGET_ST0_32 etc. Add support for
isel'ing value preserving FP roundings from one fp stack reg to another
into a noop, instead of stack traffic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48093 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 07:05:32 +00:00
Chris Lattner
ce6e492997 reduce this testcase more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48092 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 06:57:21 +00:00
Chris Lattner
67f453aae7 Finish implementing a readme entry: when inserting an i64 variable
into a vector of zeros or undef, and when the top part is obviously
zero, we can just use movd + shuffle.  This allows us to compile
vec_set-B.ll into:

_test3:
	movl	$1234567, %eax
	andl	4(%esp), %eax
	movd	%eax, %xmm0
	ret

instead of:

_test3:
	subl	$28, %esp
	movl	$1234567, %eax
	andl	32(%esp), %eax
	movl	%eax, (%esp)
	movl	$0, 4(%esp)
	movq	(%esp), %xmm0
	addl	$28, %esp
	ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48090 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 05:42:06 +00:00
Nick Lewycky
529de8a457 Update the block cloner which fixes bugpoint on code using unwind_to (phew!)
and also update the cloning interface's major user, the loop optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48088 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 05:24:34 +00:00
Nick Lewycky
6af31aab63 Update the inliner and simplifycfg to handle unwind_to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48086 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 05:10:13 +00:00
Nick Lewycky
c6694228fa Two things. Preserve the unwind_to when splitting a BB.
Add the ability to remove just one instance of a BB from a phi node. This fixes
the compile error in the tree now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48085 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 05:04:48 +00:00
Nick Lewycky
c0d025f54f Prune the unwind_to labels on BBs that don't need them. Another step in the
removal of invoke, PR1269.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48084 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 04:55:16 +00:00
Chris Lattner
f68cbceb17 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48064 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 01:08:22 +00:00
Chris Lattner
62098040a1 Implement a readme entry, compiling
#include <xmmintrin.h>
__m128i doload64(short x) {return _mm_set_epi16(0,0,0,0,0,0,0,1);}

into:
	movl	$1, %eax
	movd	%eax, %xmm0
	ret

instead of a constant pool load.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48063 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 01:05:04 +00:00
Chris Lattner
8aca4b13a8 upgrade this test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48062 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 00:32:10 +00:00
Chris Lattner
da8de316a8 make this test harder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48061 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 00:30:06 +00:00
Chris Lattner
f9d95c8835 Fix two problems in SelectionDAGLegalize::ExpandBUILD_VECTOR's handling
of BUILD_VECTORS that only have two unique elements:

1. The previous code was nondeterminstic, because it walked a map in
   SDOperand order, which isn't determinstic.
2. The previous code didn't handle the case when one element was undef
   very well.  Now we ensure that the generated shuffle mask has the
   undef vector on the RHS (instead of potentially being on the LHS)
   and that any elements that refer to it are themselves undef.  This
   allows us to compile CodeGen/X86/vec_set-9.ll into:

_test3:
	movd	%rdi, %xmm0
	punpcklqdq	%xmm0, %xmm0
	ret

instead of:

_test3:
	movd	%rdi, %xmm1
	#IMPLICIT_DEF %xmm0
	punpcklqdq	%xmm1, %xmm0
	ret

... saving a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48060 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 00:29:42 +00:00
Chris Lattner
f3ba434781 Teach SD some vector identities, allowing us to compile vec_set-9 into:
_test3:
	movd	%rdi, %xmm1
	#IMPLICIT_DEF %xmm0
	punpcklqdq	%xmm1, %xmm0
	ret

instead of:

_test3:
	#IMPLICIT_DEF %rax
	movd	%rax, %xmm0
	movd	%rdi, %xmm1
	punpcklqdq	%xmm1, %xmm0
	ret

This is still not ideal.  There is no reason to two xmm regs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48058 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08 23:43:36 +00:00