Commit Graph

1265 Commits

Author SHA1 Message Date
Dale Johannesen
b762c086c8 Make test work on non-x86 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42671 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-06 01:22:39 +00:00
Evan Cheng
bf287b63b3 Test case for 3-address conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42664 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 23:33:09 +00:00
Evan Cheng
ecf80ac68a Enable convertToThreeAddress for X86 by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42655 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 22:31:10 +00:00
Dale Johannesen
161e897b0f First round of ppc long double. call/return and
basic arithmetic works.
Rename RTLIB long double functions to distinguish
different flavors of long double; the lib functions
have different names, alas.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 20:04:43 +00:00
Evan Cheng
eca18214bb New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42628 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05 01:44:22 +00:00
Evan Cheng
d18ba7c8de -pre-RA-sched=none, simple, simple-noitin are gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42505 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-01 22:17:20 +00:00
Dan Gohman
9fe4662d9a Teach SplitVectorOp how to split INSERT_VECTOR_ELT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 23:53:40 +00:00
Rafael Espindola
068317bfa3 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42433 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 12:53:01 +00:00
Dale Johannesen
317096ab37 Add sqrt and powi intrinsics for long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 01:08:20 +00:00
Dale Johannesen
fe5293daa2 Modernize fabs.ll, add long double. Add tests
for direct codegen of fsin/fcos.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42369 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 21:12:10 +00:00
Dan Gohman
a37c9f7506 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42308 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 18:23:27 +00:00
Dale Johannesen
2246bb6011 Some tests for APFloat conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42303 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 17:50:55 +00:00
Evan Cheng
6ee23ad74b Forgot to check in the changes. Fix test case so it doesn't break with any scheduling changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42302 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 17:47:38 +00:00
Dan Gohman
e40c7b0973 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42264 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 15:54:53 +00:00
Dan Gohman
ea81d095dc Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42263 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 15:50:11 +00:00
Dale Johannesen
c557a9c00a Implementation of +sse -sse2 has changed; add
-sse to preserve intent of this test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42247 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-23 14:58:14 +00:00
Rafael Espindola
a37ac9ff53 Don't add a default STACK_ALIGN (use the generic ABI alignment)
Implement calls to functions with byval arguments on X86


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42192 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-21 15:50:22 +00:00
Evan Cheng
b7c8017208 Disable if-conversion for this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42170 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 18:06:22 +00:00
Evan Cheng
4226689f44 -enable-arm-if-conversion is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42169 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 18:03:23 +00:00
Dan Gohman
a4ddacf60b Fix several more entries in the x86 reload/remat folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42162 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 14:17:21 +00:00
Evan Cheng
921c85c487 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42112 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 22:56:31 +00:00
Evan Cheng
e0480d2ec2 Fix a bogus splat xform:
shuffle <undef, undef, x, undef>, <undef, undef, undef, undef>, <2, 2, 2, 2>
!=
<undef, undef, x, undef>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 21:54:37 +00:00
Bill Wendling
6e19896999 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42074 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 01:47:22 +00:00
Gordon Henriksen
8c33da5dc4 Fix for PR1633: Verifier doesn't fully verify GC intrinsics
LLVM now enforces the following prototypes for the write barriers:

<ty>* @llvm.gcread(<ty2>*, <ty>**)
void @llvm.gcwrite(<ty>*, <ty2>*, <ty>**)

And for @llvm.gcroot, the first stack slot is verified to be an alloca or a 
bitcast of an alloca.

Fixes test/CodeGen/Generic/GC/lower_gcroot.ll, which violated these.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42051 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 20:30:04 +00:00
Dan Gohman
5f6913cecd Emit integer x<1 as x<=0, as comparisons with zero (now includeing
64-bit) can use test instead of cmp with an immediate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42026 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 14:49:27 +00:00
Dan Gohman
11f7bfbb83 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42024 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 14:35:24 +00:00
Dan Gohman
99da4e719c Add explicit triples to avoid default behavior that varies by host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41959 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 20:37:18 +00:00
Rafael Espindola
7effac5475 Add support for functions with byval arguments on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41953 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 15:48:13 +00:00
Evan Cheng
0d8d31674f Fixed a typo that's causing a missing kill marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 23:02:04 +00:00
Evan Cheng
6d6d352ed9 Sometimes a MI can define a register as well as defining a super-register at the
same time. Do not mark the "smaller" def as dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41871 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 22:34:47 +00:00
Chris Lattner
8de5f1cc7b this is not infinite recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41806 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-10 21:16:23 +00:00
Dale Johannesen
907f28ce30 Implement misaligned FP loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41786 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-08 19:29:23 +00:00
Bill Wendling
82d25148a7 Add missing index versions of instructions to the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 22:01:02 +00:00
Dan Gohman
1ab79897e2 Avoid storing and reloading zeros and other constants from stack slots
by flagging the associated instructions as being trivially rematerializable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41775 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 21:32:51 +00:00
Rafael Espindola
588af2fb99 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41768 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
8806c7b1f5 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41763 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 11:39:35 +00:00
Anton Korobeynikov
325be7c608 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41746 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 17:21:48 +00:00
Evan Cheng
61d9c861fd Fix a bug in X86InstrInfo::convertToThreeAddress that caused it to codegen:
leal    (,%rcx,8), %rcx
It should be
leal    (,%rcx,8), %ecx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41735 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 00:14:41 +00:00
Dale Johannesen
c2ec2baf3d Change all floating constants that are not exactly
representable to use hex format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41722 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 17:50:36 +00:00
Duncan Sands
e9685143f4 Testcases for PR1628.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41719 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 11:53:04 +00:00
Bill Wendling
c3536b8ecb Add the 64-bit versions of the DS* Altivec instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41717 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 04:05:20 +00:00
Evan Cheng
a34d395358 Fix for PR1632. EHSELECTION always produces a i32 value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41712 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 20:39:26 +00:00
Evan Cheng
67c906dce7 Fix for PR1613: added 64-bit rotate left PPC instructions and patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41711 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 20:20:29 +00:00
Evan Cheng
4e9c473c4d Fix a gcroot lowering bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-01 02:00:51 +00:00
Rafael Espindola
1b5dcc34b7 Initial support for calling functions with byval arguments on x86-64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41643 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 15:06:30 +00:00
Evan Cheng
144451fd99 Update test case to reflect Dale's change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41639 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 06:29:32 +00:00
Tanya Lattner
cad62802f4 Do not run on darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41608 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 16:07:20 +00:00
Evan Cheng
f4c3a59dba Added support to fold X86 load / store instructions. This allow rematerialized loads to be folded into their uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41599 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 05:54:07 +00:00
Dan Gohman
9bd8a566eb Add explicit triples to avoid default behavior that varies by host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41510 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 20:54:48 +00:00
Duncan Sands
56fe9b7396 Remove this test as it is too hard to fix after the
latest EH changes, and in any case it is hard to
imagine how the original bug could be reintroduced.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 17:08:14 +00:00