Evan Cheng [Mon, 19 Dec 2005 23:11:49 +0000 (23:11 +0000)]
Print out opcode number if it's an unknown target node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24869
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Dec 2005 22:40:04 +0000 (22:40 +0000)]
Fix another bug related to chain / flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24868
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Dec 2005 22:36:02 +0000 (22:36 +0000)]
It's essential we clear CodeGenMap after isel every basic block!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 22:21:21 +0000 (22:21 +0000)]
Fix a case where the DAG Combiner would accidentally CSE flag-producing nodes,
creating graphs that cannot be scheduled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24866
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 19 Dec 2005 20:27:24 +0000 (20:27 +0000)]
Added the llvm-kernel project to the list of automatically configured
projects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24865
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 19 Dec 2005 20:14:38 +0000 (20:14 +0000)]
Prefix DSA specific options with dsa.
Make the dsa-alloc-list and dsa-free-list options hidden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24864
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 19 Dec 2005 19:54:23 +0000 (19:54 +0000)]
Added an option to specify the names of heap freeing functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24863
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 19 Dec 2005 17:38:39 +0000 (17:38 +0000)]
Added a command line option that allows the user to specify a list of
functions that allocate memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24862
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Mon, 19 Dec 2005 16:32:26 +0000 (16:32 +0000)]
Amend comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24861
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Mon, 19 Dec 2005 16:30:13 +0000 (16:30 +0000)]
Create a strong dependency for loads following stores. This will leave a
latency period between the two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24860
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 07:57:53 +0000 (07:57 +0000)]
Fix pifft by correcting the case when a i64/f64 straddles O5 and memory:
we were storing into [FP+88] instead of [FP+92].
Improve codegen by emitting [FP+92], instead of emitting a copy of FP into
another GPR which wouldn't be coallesced because FP isn't register allocated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24859
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 19 Dec 2005 07:18:51 +0000 (07:18 +0000)]
Fixes for a number of bugs: save flag results in CodeGenMap, folded chains
may not all have ResNo == 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24858
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 02:51:12 +0000 (02:51 +0000)]
don't emit 'add %o6, 0, %o6' instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24857
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 02:15:51 +0000 (02:15 +0000)]
Fix calls to functions returning i64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24856
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 02:06:50 +0000 (02:06 +0000)]
Correct bool truncstore operand order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24855
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 01:44:58 +0000 (01:44 +0000)]
add the other bool zextload as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24854
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 01:43:04 +0000 (01:43 +0000)]
implement zextload bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24853
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 01:39:40 +0000 (01:39 +0000)]
mark some unsupported ops as unsupported
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24852
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrick Meredith [Mon, 19 Dec 2005 01:23:31 +0000 (01:23 +0000)]
This is a script to extract nodes and edges associated with those nodes
from a dot file that is the output of DSA. Nodes to extract
are specified by giving the name of the node seen in the graphical
representation, i.e. in the .ps if the node is specified %xyz
asking for just x, xy, or xyz will retain it in the output file.
Because it operates on substrings underspecifying may result
in additional unexpected nodes. Be as specific as possible.
Obviously, however, if you ask for %xyz and there is a
getelementptr of %xyz you will get both nodes. Some manual
editing may still be necessary because of this, but this script
can pare down 10,000 line files to 20 line files, making like easier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24851
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 01:22:53 +0000 (01:22 +0000)]
Fix syntax for indirect calls. This fixes Olden/mst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24850
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 01:15:13 +0000 (01:15 +0000)]
Keep stack frames 8-byte aligned. This fixes olden/voronoi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24849
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 00:53:02 +0000 (00:53 +0000)]
apparently rdy isn't actually a psuedo instruction. Use rd %y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24848
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 00:50:12 +0000 (00:50 +0000)]
add fneg/fabs support for doubles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 00:46:20 +0000 (00:46 +0000)]
Various cleanups to this pass, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24846
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 00:19:21 +0000 (00:19 +0000)]
add bool truncstores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24845
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Dec 2005 00:06:52 +0000 (00:06 +0000)]
Elimiante SP and FP, which weren't members of the IntRegs register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24844
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 23:54:29 +0000 (23:54 +0000)]
Make sure to relegalize new nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24843
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 23:36:45 +0000 (23:36 +0000)]
The sun assembler only supports .xword in V9 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24842
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 23:35:05 +0000 (23:35 +0000)]
Configure the asmwriter to allow constant pools to be printed correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 23:18:37 +0000 (23:18 +0000)]
add support for integer extloads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24840
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 23:10:57 +0000 (23:10 +0000)]
Add support for undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24839
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 23:07:11 +0000 (23:07 +0000)]
Add support for calls to external symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 23:00:27 +0000 (23:00 +0000)]
we have no memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24837
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 22:57:47 +0000 (22:57 +0000)]
Fix a crash on a call with no arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24836
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sun, 18 Dec 2005 22:20:05 +0000 (22:20 +0000)]
Keep VC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24835
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 21:06:11 +0000 (21:06 +0000)]
This is handled by the autogen'd code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24834
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 21:05:44 +0000 (21:05 +0000)]
Handle basic block nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24833
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 21:03:04 +0000 (21:03 +0000)]
Change return lowering so that we can autogen the matching code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24832
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 21:00:53 +0000 (21:00 +0000)]
Add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24831
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 15:55:15 +0000 (15:55 +0000)]
Implement Calls for V8. This would be completely autogenerated except for
a small bug in tblgen. When that is fixed, we can remove the ISD::Call case
in Select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24830
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 15:45:51 +0000 (15:45 +0000)]
More fixes for Selection of copyto/fromreg with a flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24829
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 15:36:21 +0000 (15:36 +0000)]
More corrections for flagged copyto/from reg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24828
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 15:28:25 +0000 (15:28 +0000)]
Select copytoreg and copyfromreg nodes that have flag operands correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24827
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 15:27:43 +0000 (15:27 +0000)]
legalize copytoreg and copyfromreg nodes that have flag operands correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24826
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 13:33:06 +0000 (13:33 +0000)]
Implement the full V8 ABI for incoming arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24825
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 08:21:00 +0000 (08:21 +0000)]
Push ops list, asm string, and pattern all the way up to InstV8. Move the
InstV8 class to the InstrFormats file where it belongs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24824
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 08:13:54 +0000 (08:13 +0000)]
Give V8 select_cc, in the spirit of the PPC backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24823
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 07:15:17 +0000 (07:15 +0000)]
remove some unused instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24822
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 07:13:32 +0000 (07:13 +0000)]
V8 doesn't have FP extload
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24821
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 07:09:06 +0000 (07:09 +0000)]
simplifications, fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24820
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 07:05:21 +0000 (07:05 +0000)]
add a node, for completeness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24819
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 06:59:57 +0000 (06:59 +0000)]
Add frameindex support
Add support for copying (e.g. returning) doubles
Add support for F<->I instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24818
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 06:40:34 +0000 (06:40 +0000)]
Tighten up some checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24817
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Sun, 18 Dec 2005 04:40:52 +0000 (04:40 +0000)]
Fix a bug Sabre was having where the DAG root was a group. The group dominator
needed to be added to the ordering list, not the first member of the group.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24816
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Sun, 18 Dec 2005 03:59:21 +0000 (03:59 +0000)]
Groups were not emitted if the dominator node and the node in the ordering list
were not the same node. Ultimately the test was bogus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24815
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 18 Dec 2005 02:48:48 +0000 (02:48 +0000)]
Since extload can also be used by FP, split STDIntExtLoad into two parts,
one for use with extload, one for use with sextload and zextload, which
are integer only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24814
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 02:37:35 +0000 (02:37 +0000)]
Add constant pool support, including folding into addresses.
Pretty print addresses a bit, to not print [%r1+%g0]: just print [%r1]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24813
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 02:27:00 +0000 (02:27 +0000)]
Teach the addressing mode stuff to fold "%lo" into 'ri' addressing modes,
allowing us to compile this:
to this:
%G1 = external global int
%G2 = external global int
void %test() {
%X = load int* %G1
store int %X, int* %G2
ret void
}
test:
save -96, %sp, %sp
sethi %hi(G1), %l0
ld [%l0+%lo(G1)], %l0
sethi %hi(G2), %l1
st %l0, [%l1+%lo(G2)]
restore %g0, %g0, %g0
retl
nop
instead of this:
test:
save -96, %sp, %sp
sethi %hi(G1), %l0
or %g0, %lo(G1), %l1
ld [%l1+%l0], %l0
sethi %hi(G2), %l1
or %g0, %lo(G2), %l2
st %l0, [%l2+%l1]
restore %g0, %g0, %g0
retl
nop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24812
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 02:10:39 +0000 (02:10 +0000)]
Add initial support for global variables, and fix a bug in addr mode selection
where we didn't select the operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24811
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 01:46:58 +0000 (01:46 +0000)]
Claiming that branch targets are registers is not very wholesome. Change them
to be basic blocks. Also, add uncond branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24810
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 01:41:39 +0000 (01:41 +0000)]
Add unordered comparisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24809
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 01:38:19 +0000 (01:38 +0000)]
Add patterns to the rest of the int condbranches and some of the fp branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24808
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 01:20:35 +0000 (01:20 +0000)]
Add initial conditional branch support. This doesn't actually work yet due
to a bug in the scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 18 Dec 2005 01:03:46 +0000 (01:03 +0000)]
Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24806
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 23:52:08 +0000 (23:52 +0000)]
Eliminate CMPri, which is a synonym for SUBCCri
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24805
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 23:46:46 +0000 (23:46 +0000)]
allow custom expansion of BR_CC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24804
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 23:20:27 +0000 (23:20 +0000)]
add fneg,fabs,fsqrt instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24803
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 23:14:30 +0000 (23:14 +0000)]
Add patterns for fround/fextend and the funny fsmuld instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24802
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 23:10:46 +0000 (23:10 +0000)]
Add FP +,-,*,/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24801
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 23:05:35 +0000 (23:05 +0000)]
Give patterns to F3_3 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24800
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 22:55:57 +0000 (22:55 +0000)]
Implement 64-bit add/sub, make sure to receive and return 64-bit args with
the right halves in the right regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24799
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 22:39:19 +0000 (22:39 +0000)]
implement div and rem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24798
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 22:30:00 +0000 (22:30 +0000)]
implement MULHU/MULHS for 64-bit multiplies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24797
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 22:22:53 +0000 (22:22 +0000)]
Add patterns for multiply, simplify Y register handling stuff, add RDY instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24796
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 21:25:27 +0000 (21:25 +0000)]
Make the addressing modes smarter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24795
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 21:13:50 +0000 (21:13 +0000)]
remove some unused instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24794
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 21:05:49 +0000 (21:05 +0000)]
add andn/orn/xorn patterns. This allows us to compile this:
long %test(ubyte, short, long %X, long %Y) {
%A = xor long %X, -1
%B = and long %Y, %A
ret long %B
}
to this:
test:
save -96, %sp, %sp
andn %i4, %i2, %i0
andn %i5, %i3, %i1
restore %g0, %g0, %g0
retl
nop
instead of this:
test:
save -96, %sp, %sp
xor %i2, -1, %l0
xor %i3, -1, %l1
and %i4, %l0, %i0
and %i5, %l1, %i1
restore %g0, %g0, %g0
retl
nop
The simpleisel emits: :(
test:
save -96, %sp, %sp
or %g0, -1, %l0
or %g0, -1, %l0
or %g0, -1, %l0
or %g0, -1, %l1
xor %i2, %l0, %l0
xor %i3, %l1, %l1
and %i4, %l0, %i0
and %i5, %l1, %i1
restore %g0, %g0, %g0
retl
nop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24793
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:59:06 +0000 (20:59 +0000)]
Add support for 64-bit arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24792
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:50:42 +0000 (20:50 +0000)]
Sparc doesn't have sext_inreg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24791
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:47:16 +0000 (20:47 +0000)]
add patterns for FP stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24790
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:44:36 +0000 (20:44 +0000)]
Add [reg+reg] integer stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24789
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:42:55 +0000 (20:42 +0000)]
Add store patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24788
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:42:29 +0000 (20:42 +0000)]
add truncstore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24787
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:32:47 +0000 (20:32 +0000)]
add fp load patterns, switch rest of loads and stores to use addrmodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24786
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:26:45 +0000 (20:26 +0000)]
Add integer load[r+r] forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24785
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:18:49 +0000 (20:18 +0000)]
Rename load/store instructions to include an RI suffix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24784
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:18:24 +0000 (20:18 +0000)]
Add patterns for the rest of the loads. Add 'ri' suffixes to the load and store insts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24783
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 20:04:49 +0000 (20:04 +0000)]
Add basic addressing mode support and one load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24782
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 19:47:05 +0000 (19:47 +0000)]
eliminate some redundancy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24781
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 19:41:43 +0000 (19:41 +0000)]
Use a combination of sethi and or to build arbitrary immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24780
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 19:37:00 +0000 (19:37 +0000)]
Use sethi to build large immediates with zeros at the bottom
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24779
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 19:07:57 +0000 (19:07 +0000)]
Add shift and small immediate support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24778
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 18:53:33 +0000 (18:53 +0000)]
Add some basic reg-reg instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24777
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 18:49:14 +0000 (18:49 +0000)]
Add empty patterns to all F3_1 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24776
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 09:13:43 +0000 (09:13 +0000)]
Darwin API issue: indirect load of external and weak symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24775
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 08:26:38 +0000 (08:26 +0000)]
Add some simple integer patterns. This allows us to compile this:
int %test(int %A) {
%B = add int %A, 1
%C = xor int %B, 123
ret int %C
}
into this:
test:
save -96, %sp, %sp
add %i0, 1, %l0
xor %l0, 123, %i0
restore %g0, %g0, %g0
retl
nop
for example. I guess it would make sense to add reg/reg versions too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24774
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 08:15:09 +0000 (08:15 +0000)]
Implement ret with operand, giving us this:
int %test(int %A) {
ret int %A
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24773
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 08:08:42 +0000 (08:08 +0000)]
Add a pattern for 'ret'. This now compiles:
void %test() { ret void }
:)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24772
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 08:06:43 +0000 (08:06 +0000)]
Add empty patterns for F3_2 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24771
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 08:03:24 +0000 (08:03 +0000)]
Implement LowerArguments, at least for the first 6 integer args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24770
91177308-0d34-0410-b5e6-
96231b3b80d8