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
Chris Lattner [Sat, 17 Dec 2005 07:47:01 +0000 (07:47 +0000)]
Add the framework for a dag-dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24769
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 07:18:44 +0000 (07:18 +0000)]
Remove a few lines of dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24768
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 07:17:59 +0000 (07:17 +0000)]
asmprinter done, added crucial missing step
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24767
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 07:17:08 +0000 (07:17 +0000)]
Use the AsmPrinter for global variable init printing. This eliminates a
bunch of code and causes V8 to start using the fancy .asciz directive that
the sun assembler supports.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24766
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 07:11:43 +0000 (07:11 +0000)]
Switch constant pool printing over to use the Shared AsmPrinter version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24765
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 07:04:29 +0000 (07:04 +0000)]
Use the shared AsmPrinter code for some basic stuff. No functionality
change except for fewer .section directives emitted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24764
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 06:54:43 +0000 (06:54 +0000)]
Added an idea about any_extend for performance tuning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24763
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 06:54:41 +0000 (06:54 +0000)]
Convert the remaining instructions over, branches and calls. Fix a couple
minor bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24762
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 17 Dec 2005 06:32:52 +0000 (06:32 +0000)]
convert FP instructions to use an asmstring and operand list, allowing FP
programs to work on V8 again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24761
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 02:02:50 +0000 (02:02 +0000)]
Added truncate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24760
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 01:47:57 +0000 (01:47 +0000)]
Added anyext, modelled as zext on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24759
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 01:44:51 +0000 (01:44 +0000)]
Yet another variant of getTargetNode().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24758
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 01:25:19 +0000 (01:25 +0000)]
Added some isel ideas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24757
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 01:24:02 +0000 (01:24 +0000)]
Added support for cmp, test, and conditional move instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24756
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 01:22:13 +0000 (01:22 +0000)]
Only lower SELECT when using DAG based isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24755
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 01:21:05 +0000 (01:21 +0000)]
X86 lowers SELECT to a cmp / test followed by a conditional move.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24754
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 01:19:28 +0000 (01:19 +0000)]
Support for read / write from explicit registers with FlagVT type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24753
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Dec 2005 01:03:57 +0000 (01:03 +0000)]
Remove hidden DOS characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24752
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 17 Dec 2005 00:19:22 +0000 (00:19 +0000)]
Fix VC++ level 4 warnings. Because a base class has declared these private, VC++ complains it cannot automatically generate this methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24751
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 17 Dec 2005 00:18:06 +0000 (00:18 +0000)]
Fix VC++ level 4 warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24750
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 17 Dec 2005 00:14:47 +0000 (00:14 +0000)]
Turn on string pooling for smaller binaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24749
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Fri, 16 Dec 2005 22:45:29 +0000 (22:45 +0000)]
Added source file/line correspondence for dwarf (PowerPC only at this point.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24748
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 21:46:14 +0000 (21:46 +0000)]
Weak and linkonce global vars should still have a .globl emitted for them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24747
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 16 Dec 2005 09:19:13 +0000 (09:19 +0000)]
Add a second vector type to the VRRC register class, and fix some patterns
so that tablegen can infer all types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24746
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 07:20:53 +0000 (07:20 +0000)]
add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24745
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 07:18:48 +0000 (07:18 +0000)]
Add a couple more instrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24744
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 07:16:02 +0000 (07:16 +0000)]
remove some dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24743
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 07:13:26 +0000 (07:13 +0000)]
asmprint pseudo instrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24742
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 07:10:02 +0000 (07:10 +0000)]
Autogenerate asmprinter for F3_2 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24741
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 06:52:00 +0000 (06:52 +0000)]
Switch F3_1 instructions over to use AsmStrings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24740
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 06:34:17 +0000 (06:34 +0000)]
Plug in basic hooks for an autogenerated asm printer to fill in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24739
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 06:25:42 +0000 (06:25 +0000)]
Add operand info for F3_[12] instructions, getting V8 back to basic functionality.
With this, Regression/CodeGen/SparcV8/basictest.ll now passes. Lets hear it
for regression tests :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24738
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 06:24:55 +0000 (06:24 +0000)]
A truly trivial testcase to ensure sparcv8 doesn't get completely broken
again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24737
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 06:06:07 +0000 (06:06 +0000)]
Remove JIT support, which doesn't work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24736
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 06:02:58 +0000 (06:02 +0000)]
add some simple operand info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24735
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 05:19:55 +0000 (05:19 +0000)]
rename option for consistency with -mcpu -mattr etc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24734
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 05:19:35 +0000 (05:19 +0000)]
rename options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24733
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 05:19:18 +0000 (05:19 +0000)]
rename option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24732
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 05:18:53 +0000 (05:18 +0000)]
Document -mcpu -mattr -triple
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24731
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 05:00:21 +0000 (05:00 +0000)]
provide an option to override the target triple in a module from the commandline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24730
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 04:59:57 +0000 (04:59 +0000)]
provide an option to override the target triple in a module from the command
line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24729
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 00:22:14 +0000 (00:22 +0000)]
Update the darwin handling of linkonce & weak functions and GV stubs. This
should work in all permutations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24728
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Dec 2005 00:07:30 +0000 (00:07 +0000)]
Don't globalize internal functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24727
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 15 Dec 2005 19:49:23 +0000 (19:49 +0000)]
* Promote all 1 bit entities to 8 bit.
* Handling extload (1 bit -> 8 bit) and remove C++ code that handle 1 bit
zextload.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24726
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Dec 2005 19:02:38 +0000 (19:02 +0000)]
Don't create SEXTLOAD/ZEXTLOAD instructions that the target doesn't support
if after legalize. This fixes IA64 failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24725
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 15 Dec 2005 08:31:04 +0000 (08:31 +0000)]
Added frameindex, constpool, globaladdr, and externalsym as root nodes of
leaaddr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24724
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 15 Dec 2005 08:29:48 +0000 (08:29 +0000)]
Added constpool, frameindex, and externalsym nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24723
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 15 Dec 2005 01:02:48 +0000 (01:02 +0000)]
Handling zero extension of 1 bit value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24722
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 15 Dec 2005 00:59:17 +0000 (00:59 +0000)]
Use MOV8rm to load 1 bit value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24721
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 14 Dec 2005 22:56:16 +0000 (22:56 +0000)]
Remove a now unused statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24720
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 14 Dec 2005 22:54:33 +0000 (22:54 +0000)]
Use the new predicate support that Evan Cheng added to remove some code
from the DAGToDAG cpp file. This adds pattern support for vector and
scalar fma, which passes test/Regression/CodeGen/PowerPC/fma.ll, and
does the right thing in the presence of -disable-excess-fp-precision.
Allows us to match:
void %foo(<4 x float> * %a) {
entry:
%tmp1 = load <4 x float> * %a;
%tmp2 = mul <4 x float> %tmp1, %tmp1
%tmp3 = add <4 x float> %tmp2, %tmp1
store <4 x float> %tmp3, <4 x float> *%a
ret void
}
As:
_foo:
li r2, 0
lvx v0, r2, r3
vmaddfp v0, v0, v0, v0
stvx v0, r2, r3
blr
Or, with llc -disable-excess-fp-precision,
_foo:
li r2, 0
lvx v0, r2, r3
vxor v1, v1, v1
vmaddfp v1, v0, v0, v1
vaddfp v0, v1, v0
stvx v0, r2, r3
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24719
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 14 Dec 2005 22:51:13 +0000 (22:51 +0000)]
Add a case for float just to make sure the patterns for both precisions
are matching
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24718
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 14 Dec 2005 22:28:18 +0000 (22:28 +0000)]
Fixed a typo: line 2323: MOVSX16rm8 -> MOVZX16rm8. This was the cause fo 12/14/2005 hbd failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24717
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 14 Dec 2005 22:07:12 +0000 (22:07 +0000)]
Added predicate !NoExcessFPPrecision to FMADD, FMADDS, FMSUB, and FMSUBS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24716
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 14 Dec 2005 22:02:59 +0000 (22:02 +0000)]
Added support to specify predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24715
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Dec 2005 22:01:07 +0000 (22:01 +0000)]
Fix printing of the instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24714
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 14 Dec 2005 19:40:54 +0000 (19:40 +0000)]
Fixed extload type profile. The 4th operand is a ValueType node with type
OtherVT, it cannot be compare to type of 1st operand which is an integer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24713
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Dec 2005 19:25:30 +0000 (19:25 +0000)]
When folding loads into ops, immediately replace uses of the op with the
load. This reduces number of worklist iterations and avoid missing optimizations
depending on folding of things into sext_inreg nodes (which aren't supported by
all targets).
Tested by Regression/CodeGen/X86/extend.ll:test2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24712
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Dec 2005 19:24:08 +0000 (19:24 +0000)]
new testcase, each function should have one extension instr in it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24711
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 14 Dec 2005 19:08:51 +0000 (19:08 +0000)]
Remove -start-group and -end-group no-op options, accidentally committed
in last patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24710
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Dec 2005 19:05:06 +0000 (19:05 +0000)]
Fix the (zext (zextload)) case to trigger, similarly for sign extends.
Allow (zext (truncate)) to apply after legalize if the target supports
AND (which all do).
This compiles
short %foo() {
%tmp.0 = load ubyte* %X ; <ubyte> [#uses=1]
%tmp.3 = cast ubyte %tmp.0 to short ; <short> [#uses=1]
ret short %tmp.3
}
to:
_foo:
movzbl _X, %eax
ret
instead of:
_foo:
movzbl _X, %eax
movzbl %al, %eax
ret
thanks to Evan for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24709
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Dec 2005 17:23:59 +0000 (17:23 +0000)]
Fix Transforms/ScalarRepl/2005-12-14-UnionPromoteCrash.ll, a crash on undefined
behavior in 126.gcc on big-endian systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24708
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Dec 2005 17:23:20 +0000 (17:23 +0000)]
new (undefined) testcase, distilled from 126.gcc that scalarrepl crashes on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24707
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Dec 2005 07:58:38 +0000 (07:58 +0000)]
Fix a miscompilation in crafty due to a recent patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24706
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 14 Dec 2005 02:22:27 +0000 (02:22 +0000)]
Added sext and zext patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24705
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 14 Dec 2005 02:21:57 +0000 (02:21 +0000)]
Skip over srcvalue nodes when generating ISEL code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24704
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 14 Dec 2005 02:21:01 +0000 (02:21 +0000)]
Added sextld + zextld DAG nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24703
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 14 Dec 2005 02:19:23 +0000 (02:19 +0000)]
Fold (zext (load x) to (zextload x).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24702
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 14 Dec 2005 00:34:09 +0000 (00:34 +0000)]
Add support for fmul node of type v4f32.
void %foo(<4 x float> * %a) {
entry:
%tmp1 = load <4 x float> * %a;
%tmp2 = mul <4 x float> %tmp1, %tmp1
store <4 x float> %tmp2, <4 x float> *%a
ret void
}
Is selected to:
_foo:
li r2, 0
lvx v0, r2, r3
vxor v1, v1, v1
vmaddfp v0, v0, v0, v1
stvx v0, r2, r3
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24701
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 13 Dec 2005 22:55:22 +0000 (22:55 +0000)]
Prepare support for AltiVec multiply, divide, and sqrt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24700
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 13 Dec 2005 20:00:37 +0000 (20:00 +0000)]
Adjust the constructor to the Linker class to take an argument that names
the module being constructed. This is used to correctly name the module.
Previously the name of the linker tool was used which produces confusing
output when the module identifier is used in an error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24699
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 13 Dec 2005 19:56:51 +0000 (19:56 +0000)]
Improve ResolveFunctions to:
a) use better local variable names (OldMT -> OldFT) where "M" is used to
mean "Function" (perhaps it was previously "Method"?)
b) print out the module identifier in a warning message so that it is
possible to track down in which module the error occurred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24698
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Dec 2005 17:40:33 +0000 (17:40 +0000)]
Don't lump the filename and working dir together
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24697
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Dec 2005 07:24:22 +0000 (07:24 +0000)]
Add load + store folding srl and sra patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24696
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Dec 2005 06:32:50 +0000 (06:32 +0000)]
Use the shared asmprinter code for printing special llvm globals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24695
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Dec 2005 06:32:10 +0000 (06:32 +0000)]
Add a couple more fields, move ctor init list to .cpp file, add support
for emitting the ctor/dtor list for common targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24694
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Dec 2005 04:53:51 +0000 (04:53 +0000)]
Add ELF and darwin support for static ctors and dtors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24693
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Dec 2005 04:33:58 +0000 (04:33 +0000)]
reindent a loop, unswitch a loop. No functionality changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24692
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 13 Dec 2005 03:03:23 +0000 (03:03 +0000)]
Lowering constant pool entries on ppc exposed a bug in the recently added
ConstantVec legalizing code, which would return constantpool nodes that
were not of the target's pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24691
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Dec 2005 02:40:18 +0000 (02:40 +0000)]
Beautify a few patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24690
91177308-0d34-0410-b5e6-
96231b3b80d8