Commit Graph

3468 Commits

Author SHA1 Message Date
Tanya Lattner
7600587e66 Added paramters to a few functions in order to allow me to change the functions to preserve SSA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19615 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 08:51:10 +00:00
Chris Lattner
da2ce11407 * Adjust to changes in TargetLowering interfaces.
* Remove custom promotion for bool and byte select ops.  Legalize now
  promotes them for us.
* Allow folding ConstantPoolIndexes into EXTLOAD's, useful for float immediates.
* Declare which operations are not supported better.
* Add some hacky code for TRUNCSTORE to pretend that we have truncstore
  for i16 types.  This is useful for testing promotion code because I can
  just remove 16-bit registers all together and verify that programs work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19614 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 07:34:08 +00:00
Chris Lattner
ccad8439e0 cycles_t -> CycleCount_t
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19604 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 04:20:30 +00:00
Reid Spencer
bdf6a39d1c Rename BUILD_* to PROJ_*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19592 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 02:21:29 +00:00
Tanya Lattner
5fd2ef1e43 Fixed a couple of instructions that broke SSA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19587 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 02:14:17 +00:00
Chris Lattner
638559aaa3 Improve compatiblity with HPUX on Itanium, patch by Duraid Madina
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19586 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 01:31:31 +00:00
Chris Lattner
45554a61f2 Add a new target-independent code generator flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19567 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 06:00:32 +00:00
Chris Lattner
e9ef81dd2f Add support for truncstore and *extload.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19566 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 05:22:24 +00:00
Chris Lattner
7f2afac1dc Adjust to CopyFromREg changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19561 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 22:37:41 +00:00
Chris Lattner
3c70764907 Fix Regression/CodeGen/PowerPC/2005-01-14-UndefLong.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 20:22:02 +00:00
Chris Lattner
fbd4de1d9b Fix: Regression/CodeGen/PowerPC/2005-01-14-SetSelectCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19555 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 19:31:00 +00:00
Chris Lattner
18c2f13e0f Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19535 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 20:50:02 +00:00
Chris Lattner
1d50b7fa53 Codegen factor nodes more intelligently according to perceived register pressure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19532 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 19:56:00 +00:00
Chris Lattner
c35807155c Initial trivial (but stupid) codegen for this node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19529 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 18:01:36 +00:00
Chris Lattner
636e79a20f Add some really pedantic assertions to the load folding code. Fix a bunch
of cases where we accidentally emitted a load folded once and unfolded
elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19522 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 05:53:16 +00:00
Chris Lattner
a0bb692b27 We can only fold a load into an op if there is exactly one use of the value.
Checking to see if the load has two uses is not equivalent, as the chain
value may have zero uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19518 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 18:38:26 +00:00
Chris Lattner
9bbd992eb1 Try both ways to fold an add together. This allows us to generate this code
imul %EAX, %EAX, 400
        add %ECX, %EAX
        add %ESI, DWORD PTR [%ECX + 4*%EDX]
        inc %EDX
        cmp %EDX, 100

instead of this:

        imul %EAX, %EAX, 400
        add %ECX, %EAX
        mov %EAX, %EDX
        shl %EAX, 2
        add %ECX, %EAX
        add %ESI, DWORD PTR [%ECX]
        inc %EDX
        cmp %EDX, 100


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19513 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 18:08:53 +00:00
Chris Lattner
2b9378646d Fix a major miscompilation where we were overwriting the scale reg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19511 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 07:33:20 +00:00
Chris Lattner
48034fd9f1 Do not use the type of the RHS constant to determine the type of the operation.
This fails for shifts because the constant is always 8 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 05:22:07 +00:00
Chris Lattner
a23ccfb124 Do not lose the offset from teh global when peephole optimizing instructions.
This fixes FreeBench/pcompress


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19507 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 05:17:28 +00:00
Jeff Cohen
603fea9eb6 Fix C++ more compilatiom errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19504 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:29:05 +00:00
Chris Lattner
a56cea4495 Fix a compile error with VC++, which things that static const arrays need
to be dynamically initialized. :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19503 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:23:22 +00:00
Chris Lattner
7dbcb75b15 Fix a bug that caused us to crash on povray. We weren't emitting an FP_REG_KILL into a block that had a successor with a FP PHI node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19502 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:21:28 +00:00
Chris Lattner
e11a9a93a8 Print a load of a null pointer (in intel mode) like this:
mov %AX, WORD PTR [0]

instead of like this:

        mov %AX, WORD PTR []


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19501 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:07:11 +00:00
Chris Lattner
9f2cb3da48 Print a load of a null pointer like this:
movw 0, %ax

instead of like this:

        movw , %ax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19500 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:05:19 +00:00
Chris Lattner
085c9955ca Fix a crash compiling povray on UINT_TO_FP from i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19499 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:00:00 +00:00
Chris Lattner
4292830fe5 There are no [mem] op= reg instructions for FP, so remove their entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19496 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 03:16:09 +00:00
Chris Lattner
db8c368d7b Fix a bug where we didn't insert FP_REG_KILL instructions into MBB's that
contain FP PHI nodes but no other FP defining instructions.  This fixes
183.equake


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19495 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 02:57:10 +00:00
Chris Lattner
afce4306ec Fold TRUNCATE (LOAD P) into a smaller load from P.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19494 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 02:19:06 +00:00
Chris Lattner
ef6806c979 Be more careful about order of arg evalution for CopyToReg nodes. This shrinks
256.bzip2 from 7142 to 7103 lines of .s file.

Second, add initial support for folding loads into compares, though this code
is dynamically dead for now. :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19493 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 02:02:48 +00:00
Chris Lattner
7ea64f5d12 Fold some more [mem] op= val operators. This allows us to things like this
several times in 256.bzip2:

        mov %EAX, DWORD PTR [%ESP + 204]
-       mov %EAX, DWORD PTR [%EAX]
-       or %EAX, 2097152
-       mov %ECX, DWORD PTR [%ESP + 204]
-       mov DWORD PTR [%ECX], %EAX
+       or DWORD PTR [%EAX], 2097152


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19492 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 01:28:00 +00:00
Chris Lattner
dbba22fa2a Fold loads into sign/zero extends. instead of:
mov %AL, BYTE PTR [%EDX + l18_length_code]
  movzx %EAX, %AL

Emit:

  movzx %EAX, BYTE PTR [%EDX + l18_length_code]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19489 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 23:33:00 +00:00
Chris Lattner
837caa7223 Comment out debug code :)
Select [mem] += Val operations.  For constants, we used to get:

  mov %ECX, -32768
  add %ECX, DWORD PTR [l4_match_start]
  mov DWORD PTR [l4_match_start], %ECX

Now we get:

  add DWORD PTR [l4_match_start], -32768

For other values we used to get:

  mov %EBP, %EDI   ;; because the add destroys the value
  add %EBP, DWORD PTR [l4_input_len]
  mov DWORD PTR [l4_input_len], %EBP

now we get:

  add DWORD PTR [l4_input_len], %EDI

Both of these use less registers than the alternative, are faster and smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19488 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 23:21:30 +00:00
Chris Lattner
5f75d9a88c Handle the global address case here, not just the offset case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19487 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 22:58:43 +00:00
Chris Lattner
c4b6a78980 Treat int constants as not requiring a register, since they are almost always
folded into an instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19486 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 22:29:12 +00:00
Chris Lattner
a5ade060db * Factor a bunch of binary operator cases into shared code.
* Fold loads into Add, sub, and, or, xor and mul when possible.
* Codegen shl X, 1 as add X, X


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19483 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 21:19:59 +00:00
Chris Lattner
947d544e29 Fold multiplies by 3,5,9 into addressing modes when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 19:37:02 +00:00
Chris Lattner
51a263434a Instead of generating stuff like this:
mov %ECX, %EAX
        add %ECX, 32768
        mov %SI, WORD PTR [2*%ECX + l13_prev]

Generate this:

        mov %SI, WORD PTR [2*%ECX + l13_prev + 65536]

This occurs when you have a GEP instruction where an index is
"something + imm".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19472 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 06:36:20 +00:00
Chris Lattner
31805bf2b6 Implement MEMCPY natively in terms of rep movs*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19468 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 06:19:26 +00:00
Chris Lattner
989de030c4 Implement memset -> rep stos*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19467 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 06:14:36 +00:00
Chris Lattner
795069dd38 Announce that we don't support mem ops yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19466 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 05:57:36 +00:00
Chris Lattner
a95589be3f Teach the address selector to make 'reg+reg' addressing modes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19457 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 04:40:19 +00:00
Chris Lattner
d4dab929d8 Emit NOT instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19455 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 04:31:30 +00:00
Chris Lattner
6c07aee7c9 Fix a bug emitting branches that broke a lot of programs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19452 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 04:06:27 +00:00
Chris Lattner
ef7ba0756b Be more careful where we set ContainsFPCode. We were missing a set in the
int -> FP casting code.  Note that we don't have to set it for FP operations
that take FP values as operands: whatever produces the FP value will set the
flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19451 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 03:50:45 +00:00
Chris Lattner
a3aa2e2882 Fix a major bug in setcc/cmov folding, where we accidentally
inverted the sense of the comparison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19450 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 03:37:59 +00:00
Chris Lattner
1133309e57 Take register pressure into account when we have to decide whether to
evaluate the LHS or the RHS of an operation first.  This causes good things
to happen.  For example, instead of compiling a loop to this:

.LBBstrength_result7_1: # loopentry
        movl 16(%esp), %edi
        movl (%edi), %edi             ;;; LOAD
        movl (%ecx), %ebx
        movl $2, (%eax,%ebx,4)
        movl (%edx), %ebx
        movl %esi, %ebp
        addl $21, %ebp
        addl $42, %esi
        cmpl $0, %edi                 ;;; USE
        cmovne %esi, %ebp
        cmpl %ebp, %ebx
        movl %ebp, %esi
        jg .LBBstrength_result7_1

We now compile it to this:

.LBBstrength_result7_1: # loopentry
        movl %edi, %ebx
        addl $42, %ebx
        addl $21, %edi
        movl (%ecx), %ebp              ;; LOAD
        cmpl $0, %ebp                  ;; USE
        cmovne %ebx, %edi
        movl (%edx), %ebx
        movl $2, (%eax,%ebx,4)
        movl (%esi), %ebx
        cmpl %edi, %ebx
        jg .LBBstrength_result7_1

Which reduces register pressure enough (in this case) to avoid spilling in the
loop.

As another example, consider the CodeGen/X86/regpressure.ll testcase.  We
used to generate this code for both cases:

regpressure1:
        subl $32, %esp
        movl %esi, 12(%esp)
        movl %edi, 8(%esp)
        movl %ebx, 4(%esp)
        movl %ebp, (%esp)
        movl 36(%esp), %ecx
        movl (%ecx), %eax
        movl 4(%ecx), %edx
        movl %edx, 24(%esp)
        movl 8(%ecx), %edx
        movl %edx, 16(%esp)
        movl 12(%ecx), %edx
        movl 16(%ecx), %esi
        movl 20(%ecx), %edi
        movl 24(%ecx), %ebx
        movl %ebx, 28(%esp)
        movl 28(%ecx), %ebx
        movl 32(%ecx), %ebp
        movl %ebp, 20(%esp)
        movl 36(%ecx), %ecx
        imull 24(%esp), %eax
        imull 16(%esp), %eax
        imull %edx, %eax
        imull %esi, %eax
        imull %edi, %eax
        imull 28(%esp), %eax
        imull %ebx, %eax
        imull 20(%esp), %eax
        imull %ecx, %eax
        movl (%esp), %ebp
        movl 4(%esp), %ebx
        movl 8(%esp), %edi
        movl 12(%esp), %esi
        addl $32, %esp
        ret

This code is basically trying to do all of the loads first, then execute all
of the multiplies.  Because we run out of registers, lots of spill code happens.
We now generate this code for both cases:

regpressure1:
        movl 4(%esp), %ecx
        movl (%ecx), %eax
        movl 4(%ecx), %edx
        imull %edx, %eax
        movl 8(%ecx), %edx
        imull %edx, %eax
        movl 12(%ecx), %edx
        imull %edx, %eax
        movl 16(%ecx), %edx
        imull %edx, %eax
        movl 20(%ecx), %edx
        imull %edx, %eax
        movl 24(%ecx), %edx
        imull %edx, %eax
        movl 28(%ecx), %edx
        imull %edx, %eax
        movl 32(%ecx), %edx
        imull %edx, %eax
        movl 36(%ecx), %ecx
        imull %ecx, %eax
        ret

which is much nicer (when we fold loads into the muls it will be even better).
The old instruction selector used to produce the good code for regpressure1
but not for regpressure2, as it depended on the order of operations in the
LLVM code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19449 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 03:11:44 +00:00
Chris Lattner
24aad1b0c1 Fold setcc instructions into selects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19438 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 22:10:13 +00:00
Chris Lattner
57fbfb5879 Add conditional moves for the parity flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19437 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 22:09:33 +00:00
Chris Lattner
a13d3236d1 Implement 8-bit multiply for X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19435 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 20:55:48 +00:00
Chris Lattner
bd9f0eefb2 Codegen (Reg|imm)+&GV as an LEA, because we cannot put it into the immediate field
of an ADDri (due to current restrictions on MachineOperand :( ).  This allows
us to generate:

        leal Data+16000, %edx

instead of:

        movl $Data, %edx
        addl $16000, %edx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19420 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:20:29 +00:00
Chris Lattner
250208587d Fix copy and pasto's for FP -> Int. This fixes fldry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19418 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 19:49:59 +00:00
Chris Lattner
590d800a12 Initial implementation of FP->INT and INT->FP casts
Also, fix zero_extend from bool to i8, which fixes Shootout/objinst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19414 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 18:52:44 +00:00
Chris Lattner
6e7c47c12d Fix a subtle bug involving constant expr casts from int to fp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19410 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 01:49:29 +00:00
Chris Lattner
1482458b23 Implement varargs and returnaddress/frameaddress intrinsics. With this
patch, all of SingleSource/UnitTests passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 00:01:27 +00:00
Chris Lattner
b0802651bf Okay 15th time is the charm. Looking at the vector size is useless as it
gets clobbered by a previous statement.  This fixes all calls finally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19399 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:51:36 +00:00
Chris Lattner
6cc70ef0f9 Okay, my off by one was actually off by two. This fixes Generic/2003-07-07-BadLongConst.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19398 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:39:31 +00:00
Chris Lattner
ce45d65d9a Fix off by one error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19396 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:31:34 +00:00
Chris Lattner
5188ad735c Adjust to changes in LowerCallTo interface
Minor bugfixes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19376 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:28:19 +00:00
Chris Lattner
8c92628d1c Wrap long line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19367 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 06:59:50 +00:00
Chris Lattner
7ab65934a0 The X86 instruction selector already handles codegen of:
store float 123.45, float* %P

as an integer store.  This adds handling of float immediate stores as integers
for arguments passed function calls.

This is now tested by CodeGen/X86/store-fp-constant.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19364 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 05:45:24 +00:00
Chris Lattner
18ad19488d Allow the selection-dag based selector to be diabled with -disable-pattern-isel.
For now, this is the default, as the current selector is missing some big pieces.
To enable the new selector, pass -disable-pattern-isel=false to llc or lli.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19335 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:50:50 +00:00
Chris Lattner
8acb1ba04d Reimplementation of the X86 pattern isel. This is still missing many large
pieces, but can already do amazing things in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19334 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:49:41 +00:00
Chris Lattner
d844d0128a This file is now dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19333 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:49:05 +00:00
Chris Lattner
95cdb36714 Add a new prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19332 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:48:33 +00:00
Chris Lattner
6ac95f9679 Codegen -1 and -0.0 more efficiently. This implements CodeGen/X86/negatize_zero.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19313 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 21:19:16 +00:00
Jeff Cohen
d01f65aea1 Fix CBE code so that it compiles with VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19303 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 04:21:49 +00:00
Chris Lattner
5384b38ccc 1. If a double FP constant must be put into a constant pool, but it can be
precisely represented as a float, put it into the constant pool as a
   float.
2. Use the cbw/cwd/cdq instructions instead of an explicit SAR for signed
   division.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19291 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-05 16:30:14 +00:00
Chris Lattner
0539313fe5 Minor optimization to allocate R8 registers in a better order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19289 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-05 16:09:16 +00:00
Jeff Cohen
1c32f79a82 Revert elimination of global variable hack... still needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19273 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-03 16:34:19 +00:00
Chris Lattner
10197ff5cd ADC and IMUL are also commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19264 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-03 01:27:59 +00:00
Chris Lattner
35e5c7c186 This hunk:
-  unsigned TrueValue = getReg(TrueVal, BB, BB->begin());
+  unsigned TrueValue = getReg(TrueVal);

Fixes the PPC regressions from last night.

The other hunk is just a clarity improvement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19263 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 23:07:31 +00:00
Jeff Cohen
40296bdf27 Eliminate the use of the global variable hack in the X86 target that was used
to get Visual Studio to link in X86.lib to the executables that need it.  There
is another way of doing it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19252 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 04:23:12 +00:00
Chris Lattner
5aee0b97aa Disable 2->3 address promotion of add and inc instructions to LEA's. In
addition to being three address, LEA's don't set the flags.

This fixes 186.crafty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19251 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 04:18:17 +00:00
Chris Lattner
5dd350defd Add a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19249 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:38:18 +00:00
Chris Lattner
eb96ec52ff Add support for SETNPr to lower to memory form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19248 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:37:46 +00:00
Chris Lattner
bcea4d6f28 Implement the convertToThreeAddress method, add support for inverting JP/JNP
branches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19247 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:37:07 +00:00
Chris Lattner
cc65beeb39 Two changes here:
1. Add new instructions for checking parity flags: JP, JNP, SETP, SETNP.
2. Set the isCommutable and isPromotableTo3Address bits on several
   instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19246 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:35:46 +00:00
Chris Lattner
273f2280f2 Add some bits that can be set for instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19241 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:27:48 +00:00
Chris Lattner
6dec0b09d5 Fix a FIXME: Select instructions on longs were miscompiled.
While we're at it, improve codegen of select instructions.  For this
testcase:

int %test(bool %C, int %A, int %B) {
  %D = select bool %C, int %A, int %B
  ret int %D
}

We used to generate this code:

_test:
        cmpwi cr0, r3, 0
        bne .LBB_test_2 ;
.LBB_test_1:    ;
        b .LBB_test_3   ;
.LBB_test_2:    ;
        or r5, r4, r4
.LBB_test_3:    ;
        or r3, r5, r5
        blr

Now we emit:

_test:
        cmpwi cr0, r3, 0
        bne .LBB_test_2 ;
.LBB_test_1:    ;
        or r4, r5, r5
.LBB_test_2:    ;
        or r3, r4, r4
        blr

-Chris


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19214 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 16:10:12 +00:00
Chris Lattner
e7f96c515e Substantially improve the code generated by non-folded setcc instructions.
In particular, instead of compiling this:

bool %test(int %A, int %B) {
  %C = setlt int %A, %B
  ret bool %C
}

to this:

test:
        save %sp, -96, %sp
        subcc %i0, %i1, %g0
        bl .LBBtest_1   !
        nop
        ba .LBBtest_2   !
        nop
.LBBtest_1:     !
        or %g0, 1, %i0
        ba .LBBtest_3   !
        nop
.LBBtest_2:     !
        or %g0, 0, %i0
        ba .LBBtest_3   !
        nop
.LBBtest_3:     !
        restore %g0, %g0, %g0
        retl
        nop

We now compile it to this:

test:
        save %sp, -96, %sp
        subcc %i0, %i1, %g0
        or %g0, 1, %i0
        bl .LBBtest_2   !
        nop
.LBBtest_1:     !
        or %g0, %g0, %i0
.LBBtest_2:     !
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19213 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 16:06:57 +00:00
Chris Lattner
f376e5e5f6 Fix PR490
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19176 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-29 04:00:09 +00:00
Chris Lattner
6b4f501470 Remove unused enum value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19024 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 22:41:46 +00:00
Chris Lattner
84c556e92a Remove unused #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19021 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 19:07:04 +00:00
Chris Lattner
8cdbc35216 Change the sentinal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19007 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 00:46:51 +00:00
Chris Lattner
11cf7aa775 Create a stack slot for the return address lazily instead of eagerly. This
save small amounts of time for functions that don't call llvm.returnaddress
or llvm.frameaddress (which is almost all functions).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19006 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 00:07:46 +00:00
Tanya Lattner
acd6782470 Chris is a pain ;) Removing reassociate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:16:16 +00:00
Tanya Lattner
78943f7edf Removing commented out lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19004 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:13:16 +00:00
Tanya Lattner
9fde12b747 Removed LICM and GCSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19003 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:07:36 +00:00
Chris Lattner
7f2b41e316 Remove dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18994 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 19:32:38 +00:00
Chris Lattner
84b85c8262 Adjust to changes in asmwriter filenames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18987 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 17:33:24 +00:00
Chris Lattner
47f9dd14b2 Specify all of the targets built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18985 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 17:26:44 +00:00
Chris Lattner
42c7a16955 Use the rules in Makefile.rules to build SparcV9GenCodeEmitter.inc instead
of custom rules.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18984 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 16:47:56 +00:00
Chris Lattner
24d5d5d90b Fix header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18983 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 16:47:03 +00:00
Chris Lattner
be686a8897 Factor out common .td file chunks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18982 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 16:31:57 +00:00
Chris Lattner
3e3b6f7a46 Fix PR485, instead of emitting zero sized arrays, emit arrays of size 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18974 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 23:13:15 +00:00
Brian Gaeke
5761805d27 The mystery of Olden/tsp solved, and more opportunities for speedup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18932 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 09:10:10 +00:00
Brian Gaeke
6b260e2638 Get rid of shifts by zero in most cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 08:21:02 +00:00
Chris Lattner
395fd5949b When generating code for X86 targets, make sure the fp control word is set
to 64-bit precision, not 80 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18915 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 21:52:52 +00:00
Chris Lattner
e171d5c812 Add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18911 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:13:10 +00:00
Chris Lattner
c0354c904b Set the rounding mode for the X86 FPU to 64-bits instead of 80-bits. We
don't support long double anyway, and this gives us FP results closer to
other targets.

This also speeds up 179.art from 41.4s to 18.32s, by eliminating a problem
with extra precision that causes an FP == comparison to fail (leading to
extra loop iterations).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:23:11 +00:00
Brian Gaeke
a04d959f0c Add V8 SPEC status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18844 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 00:27:35 +00:00
Chris Lattner
869f45937b Fix Regression/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll, and all programs
when compiled with debug information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18835 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 20:36:19 +00:00
Chris Lattner
8363ad6bfc CSE calls to getTypeSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18833 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 20:31:00 +00:00
Chris Lattner
3ea78c4276 Use the target triple to pick this target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18830 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 17:40:28 +00:00
Brian Gaeke
367c137f6a Complete the list of MultiSource failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18826 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 08:22:11 +00:00
Brian Gaeke
326f378a8f hbd should be working now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18824 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 07:42:59 +00:00
Brian Gaeke
f731be0dd5 Finally enable the setcc-branch folding code.
Also, fix a bug where ubyte 255 would sometimes be output as -1. This
was afflicting hbd.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18823 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 07:42:58 +00:00
Brian Gaeke
81cf150b5d Add (currently disabled) code for canFoldSetCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18820 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 06:22:30 +00:00
Brian Gaeke
6a8c46cde3 Add stubs for setcc-branch folding support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18818 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 06:01:26 +00:00
Brian Gaeke
74be3a5794 Print llvm code one function at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18805 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 22:17:07 +00:00
Brian Gaeke
b3a86a6d49 JIT should print LLVM each function before selecting instructions for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18803 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 18:41:09 +00:00
Brian Gaeke
56c5d7369b Bools are *also* not ints. Sigh. Furthermore, most of the TargetMachine
ctor parameters can be defaulted.

Print the transformed llvm code input to the instruction selector
when -print-machineinstrs is on, just like V9.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18794 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 05:19:04 +00:00
Brian Gaeke
4658ba13a8 Look for many more moves to fold (previously, we only
*or g0, x      add g0, x          recognized * as a move)
 or  x, g0     add  x, g0
 or  0, x      add  0, x
 or  x, 0      add  x, 0


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18793 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 05:19:03 +00:00
Brian Gaeke
4f70b63ebc Make GEPs not suck so much:
* Don't emit the Index * ElementSize multiply if Index is a constant.
* Use a shift, not a multiply, if ElementSize is 1/2/4/8.
* If ElementSize fits in the immediate field of SMUL, then put it there.

Fix a bug where struct offsets might be truncated (ConstantSInt::get is
now used instead of ConstantInt::get).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18792 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 05:19:02 +00:00
Brian Gaeke
9d6ffb47b4 Update lists of failing benchmarks, including info on which
ones are failing in cbe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18791 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 05:19:01 +00:00
Brian Gaeke
5aefa8a6fe Move -lowerselect later in the chain; some select instructions were
slipping through into the instruction selector, which can't deal with
them yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18758 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 08:39:30 +00:00
Brian Gaeke
c2e5f3635a Add the rest of the multiply instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18757 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 08:39:29 +00:00
Brian Gaeke
1f42181f99 Support binary operations with immediates for <= cInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18756 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 08:39:28 +00:00
Brian Gaeke
2b314430f7 Update lists of failing benchmarks (except C++...something is the
matter with my sparcv8 libstdc++.a) and to-do list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18755 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 08:39:27 +00:00
Brian Gaeke
ce63005ac1 Emit correct prototype for __builtin_alloca on V8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18745 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 05:44:45 +00:00
Brian Gaeke
f4540a6b9a Add SparcV8 target back into the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18738 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 04:54:21 +00:00
Brian Gaeke
57600548c7 Adjust paths: Sparc/V8 --> SparcV8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18737 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 04:48:57 +00:00
Brian Gaeke
8fe429d0c2 Make this file self-contained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18736 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 04:46:30 +00:00
Brian Gaeke
09d8d67066 Update list of failing MultiSource benchmarks. It works out to +5 -5, but I
think some of these might be the CFE's fault; a rebuild should come soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18735 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 04:42:46 +00:00
Brian Gaeke
8ee6a2fb16 When FpMOVDs appeared in pairs, we were mistakenly skipping over the latter of
each pair. I think this fixes that.

One of these days, I swear I'm going to get the hang of C++ iterators.
Really.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18734 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 04:42:45 +00:00
Brian Gaeke
3616f91b71 We're continuing to make progress on MultiSource.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18714 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-09 18:54:31 +00:00
Brian Gaeke
20503bd958 Bytes and shorts are aligned differently from words.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18713 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-09 18:51:02 +00:00
Brian Gaeke
3bf960ccac Fix asm-printing directives (how did we not see this before...apparently,
everything was an int!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18712 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-09 18:51:01 +00:00
Chris Lattner
3150e2de93 Move lower intrinsics before FP constant emission, in case
intrinsic lowering ever introduces constants.

Rename local symbols before printing function bodies, fixing 255.vortex
with the CBE!!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18534 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-05 06:49:44 +00:00
Chris Lattner
cc16a8e73b Fix test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll and
PR472


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18459 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-03 17:19:10 +00:00
Brian Gaeke
1d65645582 This code rotted - change it to call abort() until someone wants
to rewrite this to use relocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-03 06:57:14 +00:00
Tanya Lattner
f3fa55f979 When writing kernel, save the branches til the end. They are still put in the "right place" in the schedule, but sometimes when folding to make a kernel instructions are added between branches. This is wrong. To avoid this, we handle branches special.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18450 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-03 05:25:22 +00:00
Chris Lattner
223d4c4b3a Fix a regression caused by the previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18449 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-03 05:13:15 +00:00
Chris Lattner
ad7919836f The stripping pass as we know it is about to disappear
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 21:05:01 +00:00
John Criswell
ced06b73ec Reverting revision 1.209.
Including alloca.h on Solaris brings in the prototype of strftime(), which
breaks compilation of CBE generated code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 19:02:49 +00:00
Chris Lattner
45de191b0b Spill/restore X86 floating point stack registers with 64-bits of precision
instead of 80-bits of precision.  This fixes PR467.

This change speeds up fldry on X86 with LLC from 7.32s on apoc to 4.68s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18433 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 18:17:31 +00:00
Chris Lattner
3986924e0b Consider 64-bit registers to be FP as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 17:57:21 +00:00
Tanya Lattner
ad7654f7c4 Reworked branch adding in prologue. Added check for infinite loops which are not modulo scheduled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18419 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 07:22:15 +00:00
Tanya Lattner
9855b84469 Reverting this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041122/021428.html

It broke Mutlisource/Applications/obsequi


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18407 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-01 18:27:03 +00:00
Chris Lattner
527efc6742 Initial support for packed types, contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18406 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-01 17:14:28 +00:00
Chris Lattner
40e7c35a2f Do not let GCC emit a warning for INT64_MIN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18398 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 21:33:58 +00:00
Brian Gaeke
33ce43e8a8 Sparcs behave better if we use <alloca.h> and avoid messing with __builtin_alloca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18397 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 21:27:01 +00:00
Brian Gaeke
cb7a76283b Update list of failing benchmarks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18384 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 08:15:44 +00:00
Brian Gaeke
9e0b9028c7 If we're about to emit something like:
%f0 = fmovs %f0
  %f1 = fmovs %f1

then just delete the FpMOVD pseudo-instruction instead.  Also, add
statistics and debug printouts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18383 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 08:15:15 +00:00
Chris Lattner
0284628e8e Fix several bugs in 'op x, imm' handling. Foremost is that we now emit
addi r3, r3, -1
instead of
   addi r3, r3, 1

for 'sub int X, 1'.

Secondarily, this fixes several cases where we could crash given an unsigned
constant.  And fixes a couple of minor missed optimization cases, such as
xor X, ~0U -> not X


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18379 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 07:30:20 +00:00
Chris Lattner
35f2bbe8c6 Fix CodeGen/PowerPC/2004-11-30-shr-var-crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18376 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 06:40:04 +00:00
Chris Lattner
e74ed0d53b Fix test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18374 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 06:36:11 +00:00
Chris Lattner
7747040410 Fix test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18371 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 06:29:10 +00:00
Chris Lattner
ee8c9ad8d2 Remove extraneous namespacification. In particular, don't define llvm::llvm::createInternalGlobalMapperPass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18365 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 00:22:59 +00:00