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
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
Dan Gohman
39313e0fa3
Fix a typo in a comment.
...
llvm-svn: 42263
2007-09-24 15:50:11 +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
Evan Cheng
66bccf335b
Disable if-conversion for this test.
...
llvm-svn: 42170
2007-09-20 18:06:22 +00:00
Evan Cheng
ae2dbcb25f
-enable-arm-if-conversion is gone.
...
llvm-svn: 42169
2007-09-20 18:03:23 +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
Gordon Henriksen
fa3a5915b1
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.
llvm-svn: 42051
2007-09-17 20:30:04 +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
Dan Gohman
27ab14af9b
Add explicit triples to avoid default behavior that varies by host.
...
llvm-svn: 41959
2007-09-14 20:37:18 +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
Evan Cheng
0d738fff6d
Fixed a typo that's causing a missing kill marker.
...
llvm-svn: 41893
2007-09-12 23:02:04 +00:00
Evan Cheng
b9a6798216
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.
llvm-svn: 41871
2007-09-11 22:34:47 +00:00
Chris Lattner
5fd9bec89d
this is not infinite recursion.
...
llvm-svn: 41806
2007-09-10 21:16:23 +00:00
Dale Johannesen
9dfdc452d9
Implement misaligned FP loads and stores.
...
llvm-svn: 41786
2007-09-08 19:29:23 +00:00
Bill Wendling
04a6163921
Add missing index versions of instructions to the map.
...
llvm-svn: 41776
2007-09-07 22:01:02 +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
Duncan Sands
2e32997f97
Testcases for PR1628.
...
llvm-svn: 41719
2007-09-05 11:53:04 +00:00
Bill Wendling
13549db795
Add the 64-bit versions of the DS* Altivec instructions.
...
llvm-svn: 41717
2007-09-05 04:05:20 +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
Evan Cheng
02c6081f2d
Fix for PR1613: added 64-bit rotate left PPC instructions and patterns.
...
llvm-svn: 41711
2007-09-04 20:20:29 +00:00
Evan Cheng
9c7cff8e62
Fix a gcroot lowering bug.
...
llvm-svn: 41668
2007-09-01 02:00:51 +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
Duncan Sands
454200b3bf
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.
llvm-svn: 41497
2007-08-27 17:08:14 +00:00
Duncan Sands
50af87bf0b
Now that we don't output cleanups by default, the action
...
offset needs to be adjusted in this test.
llvm-svn: 41490
2007-08-27 16:30:05 +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
Chris Lattner
093144e147
Allow target constants to be illegal types. The target should
...
know how to handle them. This fixes
test/CodeGen/Generic/asm-large-immediate.ll
llvm-svn: 41388
2007-08-25 01:00:22 +00:00
Andrew Lenharth
12f7bd64b4
update test to check that codegen works with llvm.used in llvm.metadata section
...
llvm-svn: 41289
2007-08-22 19:36:31 +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
Lauro Ramos Venancio
9f9e5b3971
Implement FPOWI ExpandOp.
...
Fix PR1287.
llvm-svn: 41112
2007-08-15 22:13:27 +00:00
Evan Cheng
46b797bbed
Test case for PR1609.
...
llvm-svn: 41110
2007-08-15 20:30:10 +00:00
Dan Gohman
74e688fce1
This test used "wc | grep ..."; convert it to use the count script.
...
llvm-svn: 41101
2007-08-15 13:55:47 +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
Evan Cheng
92df220df4
New test.
...
llvm-svn: 41087
2007-08-14 23:34:50 +00:00
Evan Cheng
e10e5e71b4
Test case for PR1596.
...
llvm-svn: 41085
2007-08-14 23:21:10 +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
Chandler Carruth
00e56b0e81
This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
...
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.
llvm-svn: 40807
2007-08-04 01:51: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
Lauro Ramos Venancio
1ef30713de
Expand unaligned loads/stores when the target doesn't support them. (PR1548)
...
llvm-svn: 40682
2007-08-01 19:34:21 +00:00
Chris Lattner
5d3a429915
we're now handling this right :)
...
llvm-svn: 40675
2007-08-01 17:10:30 +00:00