Commit Graph

26951 Commits

Author SHA1 Message Date
Chris Lattner 9a1c7dd27a fix a buggy check that accidentally disabled this xform
llvm-svn: 30967
2006-10-15 22:42:15 +00:00
Chris Lattner c1fb4264f5 clarify
llvm-svn: 30966
2006-10-15 20:05:59 +00:00
Reid Spencer 775168dac1 Document the VAArg, and vector instruction opcodes.
llvm-svn: 30965
2006-10-15 00:11:05 +00:00
Anton Korobeynikov 34e051d537 Align stack size to DWORD boundary
llvm-svn: 30964
2006-10-14 20:53:35 +00:00
Rafael Espindola 2b7f635951 expand ISD::BRCOND
llvm-svn: 30963
2006-10-14 17:59:54 +00:00
Rafael Espindola 4c1baf1528 fix some fp condition codes
use non trapping comparison instructions

llvm-svn: 30962
2006-10-14 13:42:53 +00:00
Jim Laskey 3bf4f3bd60 Tidy up after truncstore changes.
llvm-svn: 30961
2006-10-14 12:14:27 +00:00
Evan Cheng 5384fc9676 One cyclic dag a day is good for ya...
llvm-svn: 30960
2006-10-14 08:35:02 +00:00
Evan Cheng 47fbeda5ce Debug tweak.
llvm-svn: 30959
2006-10-14 08:34:06 +00:00
Evan Cheng b86375cfd0 Corrected load folding check. We need to start from the root of the sub-dag
being matched and ensure there isn't a non-direct path to the load (i.e. a
path that goes out of the sub-dag.)

llvm-svn: 30958
2006-10-14 08:33:25 +00:00
Evan Cheng 95f51a0871 Start checking from the root of the matched sub-tree.
llvm-svn: 30957
2006-10-14 08:30:53 +00:00
Evan Cheng cfb9526d61 When checking if a load can be folded, we check if there is any non-direct
way to reach the load via any nodes that would be folded. Start from the
root of the matched sub-tree.

llvm-svn: 30956
2006-10-14 08:30:15 +00:00
Chris Lattner 6a1b2de8c4 Make sure that the node returned by SimplifySetCC is added to the worklist
so that it can be deleted if unused.

llvm-svn: 30955
2006-10-14 03:52:46 +00:00
Chris Lattner d0cc3bdfc3 testcase for recent dag combiner patch. Before the entry bb was:
_test:
        stwu r1, -80(r1)
        stw r1, 76(r1)
        mflr r11
        stw r11, 88(r1)
        rlwinm r2, r4, 0, 30, 31
        cmplwi cr7, r2, 2
        mfcr r2
        rlwinm r2, r2, 30, 31, 31
        cmplwi cr0, r2, 0
        bne cr0, LBB1_2 ;UnifiedReturnBlock

after it is:

_test:
        stwu r1, -80(r1)
        stw r1, 76(r1)
        mflr r11
        stw r11, 88(r1)
        rlwinm r2, r4, 0, 30, 31
        cmplwi cr0, r2, 2
        bgt cr0, LBB1_2 ;UnifiedReturnBlock

llvm-svn: 30954
2006-10-14 03:40:02 +00:00
Chris Lattner 0626bd2fbc fold setcc of a setcc.
llvm-svn: 30953
2006-10-14 01:02:29 +00:00
Chris Lattner bd9acad805 When SimplifySetCC was moved to the DAGCombiner, it was never removed from
SelectionDAG and it has since bitrotted.  Remove the copy from SelectionDAG.
Next, remove the constant folding piece of DAGCombiner::SimplifySetCC into
a new FoldSetCC method which can be used by getNode() and SimplifySetCC.

This fixes obscure bugs.

llvm-svn: 30952
2006-10-14 00:41:01 +00:00
Chris Lattner 47db29a405 disable this pass for now, it's causing issues
llvm-svn: 30951
2006-10-14 00:30:06 +00:00
Chris Lattner 3218e0eed5 falling off the end of a function is ok with an unreachable instruction.
llvm-svn: 30950
2006-10-14 00:21:48 +00:00
Chris Lattner 52e298b700 testcase for recent selectiondag patch
llvm-svn: 30949
2006-10-13 23:54:16 +00:00
Jim Laskey dcf983ce41 Reduce the workload by not adding chain users to work list.
llvm-svn: 30948
2006-10-13 23:32:28 +00:00
Chris Lattner 45ffb1eb70 Fix a bug where we incorrectly turned '(X & 0) == 0' into '(X & 0) >> -1',
which is undefined.  "0" isn't a power of 2.

llvm-svn: 30947
2006-10-13 22:46:18 +00:00
Chris Lattner a47294ed7a implement branch inspection/modification methods.
llvm-svn: 30946
2006-10-13 21:21:17 +00:00
Evan Cheng ab51cf2e78 Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
llvm-svn: 30945
2006-10-13 21:14:26 +00:00
Chris Lattner df1ca3ff63 it is easier to implement these when they are virtual
llvm-svn: 30944
2006-10-13 21:02:27 +00:00
Chris Lattner 68b41e570e allow branch reversal to fail
llvm-svn: 30943
2006-10-13 20:59:31 +00:00
Bill Wendling a45a08a706 Corrected formatting.
llvm-svn: 30942
2006-10-13 20:53:50 +00:00
Chris Lattner 55ad08a59b add the branch folding pass as a late cleanup pass for all targets. For now
it just deletes empty MBB's.  Soon it will do more :)

llvm-svn: 30941
2006-10-13 20:45:56 +00:00
Chris Lattner 9516812316 replace the existing branch inspection/modification APIs with something more
useful and general.

llvm-svn: 30940
2006-10-13 20:44:01 +00:00
Chris Lattner 3e8e57c771 disable some objectionable code, maybe we can bring this pass to life
llvm-svn: 30939
2006-10-13 20:43:10 +00:00
Chris Lattner 63007919dc remove some dead code
llvm-svn: 30938
2006-10-13 20:40:42 +00:00
Chris Lattner be131662c3 add note
llvm-svn: 30937
2006-10-13 20:20:58 +00:00
Chris Lattner cf56917053 set isBarrier correctly
llvm-svn: 30936
2006-10-13 19:10:34 +00:00
Chris Lattner 4dc4f30a48 Correctly handle instruction separators.
llvm-svn: 30935
2006-10-13 17:56:02 +00:00
Chris Lattner 95129a7f22 Expose method and ivars for measuring inline asm length properly.
llvm-svn: 30934
2006-10-13 17:50:07 +00:00
Andrew Lenharth 966645e6b4 Move some warnings to debug mode.
llvm-svn: 30933
2006-10-13 17:38:22 +00:00
Rafael Espindola 5ab3166f74 add FNEGS and FNEGD
llvm-svn: 30932
2006-10-13 17:37:35 +00:00
Chris Lattner 057083f0e7 Fix another dtor issue. The function local statics in this function were
being destroyed at inconvenient times.  Switch to using non-local ManagedStatic
objects, which actually also speeds up ConstRules::get.

llvm-svn: 30931
2006-10-13 17:22:21 +00:00
Rafael Espindola d6050c3149 add SBCS and SUBS
llvm-svn: 30930
2006-10-13 17:19:20 +00:00
Rafael Espindola 79d9807c87 implement calls to functions that return long
llvm-svn: 30929
2006-10-13 16:47:22 +00:00
Rafael Espindola 3874a168d0 implement unordered floating point compares
llvm-svn: 30928
2006-10-13 13:14:59 +00:00
Jim Laskey ccee9baebe Workaround for templates
llvm-svn: 30927
2006-10-13 13:02:19 +00:00
Jim Laskey 13d3373e72 Clean up dump.
llvm-svn: 30926
2006-10-13 13:01:34 +00:00
Chris Lattner 5af1cbc5cf avoid a ctor/dtor issue with the ProgramName global.
llvm-svn: 30925
2006-10-13 00:06:24 +00:00
Chris Lattner 78d838186c simplify trivial function
llvm-svn: 30924
2006-10-12 23:50:28 +00:00
Evan Cheng 1d04dd3aac Really remove dead nodes from isel queue.
llvm-svn: 30923
2006-10-12 23:18:52 +00:00
Chris Lattner adb19d6e8f shrink anon-ns and mark stuff static. No functionality changes
llvm-svn: 30922
2006-10-12 22:09:17 +00:00
Chris Lattner 03fda13dbb add a note
llvm-svn: 30921
2006-10-12 22:01:26 +00:00
Chris Lattner d0620d2773 Lower X%C into X/C+stuff. This allows the 'division by a constant' logic to
apply to rems as well as divs.  This fixes PR945 and speeds up ReedSolomon
from 14.57s to 10.90s (which is now faster than gcc).

It compiles CodeGen/X86/rem.ll into:

_test1:
        subl $4, %esp
        movl %esi, (%esp)
        movl $2155905153, %ecx
        movl 8(%esp), %esi
        movl %esi, %eax
        imull %ecx
        addl %esi, %edx
        movl %edx, %eax
        shrl $31, %eax
        sarl $7, %edx
        addl %eax, %edx
        imull $255, %edx, %eax
        subl %eax, %esi
        movl %esi, %eax
        movl (%esp), %esi
        addl $4, %esp
        ret
_test2:
        movl 4(%esp), %eax
        movl %eax, %ecx
        sarl $31, %ecx
        shrl $24, %ecx
        addl %eax, %ecx
        andl $4294967040, %ecx
        subl %ecx, %eax
        ret
_test3:
        subl $4, %esp
        movl %esi, (%esp)
        movl $2155905153, %ecx
        movl 8(%esp), %esi
        movl %esi, %eax
        mull %ecx
        shrl $7, %edx
        imull $255, %edx, %eax
        subl %eax, %esi
        movl %esi, %eax
        movl (%esp), %esi
        addl $4, %esp
        ret

instead of div/idiv instructions.

llvm-svn: 30920
2006-10-12 20:58:32 +00:00
Chris Lattner ce34aa8fd7 new testcase
llvm-svn: 30919
2006-10-12 20:56:15 +00:00
Evan Cheng 88bf1625fa Add another cyclic dag test case.
llvm-svn: 30918
2006-10-12 20:38:45 +00:00