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
Bill Wendling
a420d660c8
If there's an unaligned memcpy to/from the stack, don't lower it. Just call the
...
memcpy library function instead.
llvm-svn: 43270
2007-10-23 23:32:40 +00:00
Evan Cheng
0590c75f18
Temporary solution: added a different set of BCTRL_Macho / BCTRL_ELF with right callee-saved defs set for ppc64.
...
llvm-svn: 43248
2007-10-23 06:42:42 +00:00
Evan Cheng
252d9ddb4d
Fix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
...
llvm-svn: 43234
2007-10-22 22:11:27 +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
85eb733eff
Use ptr type in the immediate field of a BxA instruction so we don't end up selecting 32-bit call instruction for ppc64.
...
llvm-svn: 43228
2007-10-22 19:46:19 +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
Bill Wendling
32c9cd9e94
Pointer arithmetic should be done with the index the same size as the pointer.
...
llvm-svn: 43120
2007-10-18 08:32:37 +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
Chris Lattner
45d9c7aa07
Fix a bug handling frame references in ppc inline asm when the frame offset
...
doesn't fit into 16 bits.
llvm-svn: 43032
2007-10-16 18:00:18 +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
Chris Lattner
a7666b08ad
new testcase
...
llvm-svn: 42953
2007-10-13 06:56:18 +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
Dale Johannesen
c7b51b678d
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.
llvm-svn: 42644
2007-10-05 20:04:43 +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