Chris Lattner [Fri, 3 Feb 2006 18:59:39 +0000 (18:59 +0000)]
remove an old comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25940
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 18:54:24 +0000 (18:54 +0000)]
Remove the X86PeepholeOptimizerPass, a truly horrible old hack that is now
obsolete. yaay :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25939
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 18:20:04 +0000 (18:20 +0000)]
When rewriting frame instructions, emit the appropriate small-immediate
instruction when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25938
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 18:06:02 +0000 (18:06 +0000)]
node predicates add to the complexity of a pattern. This ensures that the
X86 backend attempts to match small-immediate versions of instructions before
the full size immediate versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25937
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 07:06:25 +0000 (07:06 +0000)]
Teach sparc to fold loads/stores into copies.
Remove the dead getRegClassForType method
minor formating changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25936
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 06:51:34 +0000 (06:51 +0000)]
remove dead fn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25935
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 3 Feb 2006 06:46:56 +0000 (06:46 +0000)]
Add common code for reassociating ops in the dag combiner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25934
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 3 Feb 2006 06:46:41 +0000 (06:46 +0000)]
Added a (store (op (load ...) ...) ...) folding test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25933
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 06:44:54 +0000 (06:44 +0000)]
Implement isLoadFromStackSlot and isStoreToStackSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25932
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 3 Feb 2006 06:22:41 +0000 (06:22 +0000)]
(store (op (load ...))) folding problem. In the generated matching code,
Chain is initially set to the chain operand of store node, when it reaches
load, if it matches the load then Chain is set to the chain operand of the
load.
However, if the matching code that follows this fails, isel moves on to the
next pattern but it does not restore Chain to the chain operand of the store.
So when it tries to match the next store / op / load pattern it would fail on
the Chain == load.getOperand(0) test.
The solution is for each chain operand to get a unique name. e.g. Chain10.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25931
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 06:22:11 +0000 (06:22 +0000)]
remove some target-indep and implemented notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25930
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 06:21:43 +0000 (06:21 +0000)]
target independent notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25929
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 3 Feb 2006 05:17:06 +0000 (05:17 +0000)]
Flesh out a couple of the items in the README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25928
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Fri, 3 Feb 2006 03:48:54 +0000 (03:48 +0000)]
Fix VC++ compilation error caused by using a std::map iterator variable to receive
a std::multimap iterator value. For some reason, GCC doesn't have a problem with this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25927
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 03:16:14 +0000 (03:16 +0000)]
Remove move copies and dead stuff by not clobbering the result reg of a noop copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25926
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 3 Feb 2006 03:07:37 +0000 (03:07 +0000)]
isStoreToStackSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25925
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 03:06:49 +0000 (03:06 +0000)]
Simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25924
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 02:59:58 +0000 (02:59 +0000)]
the X86 backend no longer needs to delete its own noop copies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25923
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 02:02:59 +0000 (02:02 +0000)]
Add code that checks for noop copies, which triggers when either:
1. a target doesn't know how to fold load/stores into copies, or
2. the spiller rewrites the input to a copy to the same register as the dest
instead of to the reloaded reg.
This will be moved/improved in the near future, but allows elimination of
some ancient x86 hacks. This eliminates 92 copies from SMG2000 on X86 and
163 copies from 252.eon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25922
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 01:49:49 +0000 (01:49 +0000)]
Add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25921
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 3 Feb 2006 01:33:01 +0000 (01:33 +0000)]
Added case HANDLENODE to getOperationName().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25920
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 3 Feb 2006 00:36:31 +0000 (00:36 +0000)]
Physregs may hold multiple stack slot values at the same time. Keep track
of this, and use it to our advantage (bwahahah). This allows us to eliminate another
60 instructions from smg2000 on PPC (probably significantly more on X86). A common
old-new diff looks like this:
stw r2, 3304(r1)
- lwz r2, 3192(r1)
stw r2, 3300(r1)
- lwz r2, 3192(r1)
stw r2, 3296(r1)
- lwz r2, 3192(r1)
stw r2, 3200(r1)
- lwz r2, 3192(r1)
stw r2, 3196(r1)
- lwz r2, 3192(r1)
+ or r2, r2, r2
stw r2, 3188(r1)
and
- lwz r31, 604(r1)
- lwz r13, 604(r1)
- lwz r14, 604(r1)
- lwz r15, 604(r1)
- lwz r16, 604(r1)
- lwz r30, 604(r1)
+ or r31, r30, r30
+ or r13, r30, r30
+ or r14, r30, r30
+ or r15, r30, r30
+ or r16, r30, r30
+ or r30, r30, r30
Removal of the R = R copies is coming next...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25919
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 23:50:22 +0000 (23:50 +0000)]
update a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25918
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 23:29:36 +0000 (23:29 +0000)]
Fix a deficiency in the spiller that Evan noticed. In particular, consider
this code:
store [stack slot #0], R10
= add R14, [stack slot #0]
The spiller didn't know that the store made the value of [stackslot#0] available
in R10 *IF* the store came from a copy instruction with the store folded into it.
This patch teaches VirtRegMap to look at these stores and recognize the values
they make available. In one case Evan provided, this code:
divsd %XMM0, %XMM1
movsd %XMM1, QWORD PTR [%ESP + 40]
1) movsd QWORD PTR [%ESP + 48], %XMM1
2) movsd %XMM1, QWORD PTR [%ESP + 48]
addsd %XMM1, %XMM0
3) movsd QWORD PTR [%ESP + 48], %XMM1
movsd QWORD PTR [%ESP + 4], %XMM0
turns into:
divsd %XMM0, %XMM1
movsd %XMM1, QWORD PTR [%ESP + 40]
addsd %XMM1, %XMM0
3) movsd QWORD PTR [%ESP + 48], %XMM1
movsd QWORD PTR [%ESP + 4], %XMM0
In this case, instruction #2 was removed because of the value made
available by #1, and inst #1 was later deleted because it is now
never used before the stack slot is redefined by #3.
This occurs here and there in a lot of code with high spilling, on PPC
most of the removed loads/stores are LSU-reject-causing loads, which is
nice.
On X86, things are much better (because it spills more), where we nuke
about 1% of the instructions from SMG2000 and several hundred from eon.
More improvements to come...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25917
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 2 Feb 2006 21:07:50 +0000 (21:07 +0000)]
add 64b gpr store to the possible list of isStoreToStackSlot opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25916
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 20:38:12 +0000 (20:38 +0000)]
fix operand numbers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25915
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 20:16:12 +0000 (20:16 +0000)]
implement isStoreToStackSlot for PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25914
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 20:12:32 +0000 (20:12 +0000)]
Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,a far more logical place. Other methods should also be moved if anyoneis interested. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25913
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 20:11:55 +0000 (20:11 +0000)]
Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,
a far more logical place. Other methods should also be moved if anyone
is interested. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25912
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 20:00:41 +0000 (20:00 +0000)]
implement isStoreToStackSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25911
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 19:57:16 +0000 (19:57 +0000)]
add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25910
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 19:55:29 +0000 (19:55 +0000)]
add a new isStoreToStackSlot method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25909
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 19:43:28 +0000 (19:43 +0000)]
more notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25908
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 19:16:34 +0000 (19:16 +0000)]
add a note, I have no idea how important this is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25907
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 08:02:20 +0000 (08:02 +0000)]
%fcc is not an alias for %fcc0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25906
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 07:56:15 +0000 (07:56 +0000)]
correct an opcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25905
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 07:37:11 +0000 (07:37 +0000)]
new example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25903
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 2 Feb 2006 07:27:56 +0000 (07:27 +0000)]
Update the README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25902
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 07:17:31 +0000 (07:17 +0000)]
Turn any_extend nodes into zero_extend nodes when it allows us to remove an
and instruction. This allows us to compile stuff like this:
bool %X(int %X) {
%Y = add int %X, 14
%Z = setne int %Y, 12345
ret bool %Z
}
to this:
_X:
cmpl $12331, 4(%esp)
setne %al
movzbl %al, %eax
ret
instead of this:
_X:
cmpl $12331, 4(%esp)
setne %al
movzbl %al, %eax
andl $1, %eax
ret
This occurs quite a bit with the X86 backend. For example, 25 times in
lambda, 30 times in 177.mesa, 14 times in galgel, 70 times in fma3d,
25 times in vpr, several hundred times in gcc, ~45 times in crafty,
~60 times in parser, ~140 times in eon, 110 times in perlbmk, 55 on gap,
16 times on bzip2, 14 times on twolf, and 1-2 times in many other SPEC2K
programs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25901
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 06:43:15 +0000 (06:43 +0000)]
Implement MaskedValueIsZero for ANY_EXTEND nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25900
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 06:36:48 +0000 (06:36 +0000)]
implemented, testcase here: test/Regression/CodeGen/X86/compare-add.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25899
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 06:36:13 +0000 (06:36 +0000)]
add two dag combines:
(C1-X) == C2 --> X == C1-C2
(X+C1) == C2 --> X == C2-C1
This allows us to compile this:
bool %X(int %X) {
%Y = add int %X, 14
%Z = setne int %Y, 12345
ret bool %Z
}
into this:
_X:
cmpl $12331, 4(%esp)
setne %al
movzbl %al, %eax
andl $1, %eax
ret
not this:
_X:
movl $14, %eax
addl 4(%esp), %eax
cmpl $12345, %eax
setne %al
movzbl %al, %eax
andl $1, %eax
ret
Testcase here: Regression/CodeGen/X86/compare-add.ll
nukage of the and coming up next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25898
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 06:35:38 +0000 (06:35 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25897
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 2 Feb 2006 02:40:17 +0000 (02:40 +0000)]
Update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25896
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 00:38:08 +0000 (00:38 +0000)]
make -debug output less newliney
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25895
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 2 Feb 2006 00:28:23 +0000 (00:28 +0000)]
Fix a erroneous comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25894
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 00:25:23 +0000 (00:25 +0000)]
Implement matching constraints. We can now say things like this:
%C = call int asm "xyz $0, $1, $2, $3", "=r,r,r,0"(int %A, int %B, int 4)
and get:
xyz r2, r3, r4, r2
note that the r2's are pinned together. Yaay for 2-address instructions.
2342 ----------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25893
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 00:23:53 +0000 (00:23 +0000)]
validate matching constraints and remember when we see them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25892
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 2 Feb 2006 00:23:12 +0000 (00:23 +0000)]
add an instance var and argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25891
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 23:38:08 +0000 (23:38 +0000)]
more notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25890
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 23:03:16 +0000 (23:03 +0000)]
Tell codegen MOVAPSrr and MOVAPDrr are copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25889
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 23:02:25 +0000 (23:02 +0000)]
Added SSE entries to foldMemoryOperand().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25888
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 23:01:57 +0000 (23:01 +0000)]
Rearrange code to my liking. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25887
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 22:41:11 +0000 (22:41 +0000)]
Implement smart printing of inline asm strings, handling variants and
substituted operands. For this testcase:
int %test(int %A, int %B) {
%C = call int asm "xyz $0, $1, $2", "=r,r,r"(int %A, int %B)
ret int %C
}
we now emit:
_test:
or r2, r3, r3
or r3, r4, r4
xyz r2, r2, r3 ;; look here
or r3, r2, r2
blr
... note the substituted operands. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25886
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 22:39:30 +0000 (22:39 +0000)]
add a new PrintAsmOperand method, move some stuff around for ease of reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25885
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 22:38:46 +0000 (22:38 +0000)]
add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25884
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 21:44:48 +0000 (21:44 +0000)]
another note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25883
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 1 Feb 2006 19:37:33 +0000 (19:37 +0000)]
Add immediate forms of cmov and remove some cruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25882
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 1 Feb 2006 19:36:52 +0000 (19:36 +0000)]
test cmov immediate form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25881
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 19:12:23 +0000 (19:12 +0000)]
add a note, ya knoe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25880
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 1 Feb 2006 19:05:15 +0000 (19:05 +0000)]
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25879
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 18:59:47 +0000 (18:59 +0000)]
Implement simple register assignment for inline asms. This allows us to compile:
int %test(int %A, int %B) {
%C = call int asm "xyz $0, $1, $2", "=r,r,r"(int %A, int %B)
ret int %C
}
into:
(0x8906130, LLVM BB @0x8902220):
%r2 = OR4 %r3, %r3
%r3 = OR4 %r4, %r4
INLINEASM <es:xyz $0, $1, $2>, %r2<def>, %r2, %r3
%r3 = OR4 %r2, %r2
BLR
which asmprints as:
_test:
or r2, r3, r3
or r3, r4, r4
xyz $0, $1, $2 ;; need to print the operands now :)
or r3, r2, r2
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25878
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 18:10:56 +0000 (18:10 +0000)]
Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25877
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 17:54:23 +0000 (17:54 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25876
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 1 Feb 2006 07:19:44 +0000 (07:19 +0000)]
Fix some of the stuff in the PPC README file, and clean up legalization
of the SELECT_CC, BR_CC, and BRTWOWAY_CC nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25875
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 06:40:32 +0000 (06:40 +0000)]
add a note, I'll take care of this after nate commits his big patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25873
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 06:13:50 +0000 (06:13 +0000)]
- Use xor to clear integer registers (set R, 0).
- Added a new format for instructions where the source register is implied
and it is same as the destination register. Used for pseudo instructions
that clear the destination register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25872
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 06:08:48 +0000 (06:08 +0000)]
Remove another entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25871
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 06:06:31 +0000 (06:06 +0000)]
If a pattern's root node is a constant, its size should be 3 rather than 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25870
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Wed, 1 Feb 2006 04:37:04 +0000 (04:37 +0000)]
Fix VC++ compilation error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25869
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 01:45:02 +0000 (01:45 +0000)]
new testcase for the 'ret double folding with load' opzn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25868
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 01:44:25 +0000 (01:44 +0000)]
Another regression from the pattern isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 01:29:47 +0000 (01:29 +0000)]
Beef up the interface to inline asm constraint parsing, making it more general, useful, and easier to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25866
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 01:28:23 +0000 (01:28 +0000)]
adjust to changes in InlineAsm interface. Fix a few minor bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25865
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 01:27:37 +0000 (01:27 +0000)]
Beef up the interface to inline asm constraint parsing, making it more
general, useful, and easier to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25864
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 01:19:32 +0000 (01:19 +0000)]
Return's chain should be matching either the chain produced by the
value or the chain going into the load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25863
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Feb 2006 00:28:12 +0000 (00:28 +0000)]
another testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25862
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 00:20:21 +0000 (00:20 +0000)]
When folding a load into a return of SSE value, check the chain to
ensure the memory location has not been clobbered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25861
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 1 Feb 2006 00:15:53 +0000 (00:15 +0000)]
Remove an item. It's done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25860
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Jan 2006 23:19:54 +0000 (23:19 +0000)]
Be smarter about whether to store the SSE return value in memory. If
it is already available in memory, do a fld directly from there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25859
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 22:59:46 +0000 (22:59 +0000)]
turning these into 'adds' would require extra copies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25858
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Jan 2006 22:28:30 +0000 (22:28 +0000)]
- Allow XMM load (for scalar use) to be folded into ANDP* and XORP*.
- Use XORP* to implement fneg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25857
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Jan 2006 22:26:21 +0000 (22:26 +0000)]
Remove entries on fabs and fneg. These are done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25856
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Jan 2006 22:23:14 +0000 (22:23 +0000)]
Allow the specification of explicit alignments for constant pool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25855
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 19:43:35 +0000 (19:43 +0000)]
* Fix 80-column violations
* Rename hasSSE -> hasSSE1 to avoid my continual confusion with 'has any SSE'.
* Add inline asm constraint specification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25854
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 19:20:21 +0000 (19:20 +0000)]
add info about the inline asm register constraints for PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25853
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Jan 2006 18:14:25 +0000 (18:14 +0000)]
Allow custom lowering of fabs. I forgot to check in this change which
caused several test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25852
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 17:20:06 +0000 (17:20 +0000)]
add a missing break that caused a lot of failures last night :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25851
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 16:10:53 +0000 (16:10 +0000)]
solaris won't clobber an existing symlink with ln -sf apparently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25849
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 31 Jan 2006 08:17:29 +0000 (08:17 +0000)]
Codegen
bool %test(int %X) {
%Y = seteq int %X, 13
ret bool %Y
}
as
_test:
addi r2, r3, -13
cntlzw r2, r2
srwi r3, r2, 5
blr
rather than
_test:
cmpwi cr7, r3, 13
mfcr r2
rlwinm r3, r2, 31, 31, 31
blr
This has very little effect on most code, but speeds up analyzer 23% and
mason 11%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25848
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 07:45:45 +0000 (07:45 +0000)]
okay, one more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 07:45:08 +0000 (07:45 +0000)]
another note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25846
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 07:43:33 +0000 (07:43 +0000)]
More notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25845
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 07:38:32 +0000 (07:38 +0000)]
another one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25844
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 07:37:20 +0000 (07:37 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25843
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 07:26:55 +0000 (07:26 +0000)]
add conditional moves of float and double values on int/fp condition codes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25842
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 07:16:34 +0000 (07:16 +0000)]
example nate pointed out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 06:56:30 +0000 (06:56 +0000)]
treat conditional branches the same way as conditional moves (giving them
an operand that contains the condcode), making things significantly simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25840
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 06:49:09 +0000 (06:49 +0000)]
compactify all of the integer conditional moves into one instruction that takes
a CC as an operand. Much smaller, much happier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25839
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2006 06:24:29 +0000 (06:24 +0000)]
Add immediate forms of integer cmovs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25838
91177308-0d34-0410-b5e6-
96231b3b80d8