oota-llvm.git
17 years agoadd FCPYS and FCPYD
Rafael Espindola [Tue, 17 Oct 2006 13:13:23 +0000 (13:13 +0000)]
add FCPYS and FCPYD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30995 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse S_debug for dwarf info.
Jim Laskey [Tue, 17 Oct 2006 11:30:57 +0000 (11:30 +0000)]
Use S_debug for dwarf info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30994 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProper fix.
Evan Cheng [Tue, 17 Oct 2006 00:24:49 +0000 (00:24 +0000)]
Proper fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30993 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOne more try.
Evan Cheng [Mon, 16 Oct 2006 23:44:08 +0000 (23:44 +0000)]
One more try.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30992 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUndo Chris' last patch, it caused a regression.
Reid Spencer [Mon, 16 Oct 2006 23:08:08 +0000 (23:08 +0000)]
Undo Chris' last patch, it caused a regression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30991 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUnbreak x86-64 build.
Evan Cheng [Mon, 16 Oct 2006 22:53:28 +0000 (22:53 +0000)]
Unbreak x86-64 build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30990 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBe careful when looking through a vbit_convert. Optimizing this:
Evan Cheng [Mon, 16 Oct 2006 22:49:37 +0000 (22:49 +0000)]
Be careful when looking through a vbit_convert. Optimizing this:
(vector_shuffle
  (vbitconvert (vbuildvector (copyfromreg v4f32), 1, v4f32), 4, f32),
  (undef, undef, undef, undef), (0, 0, 0, 0), 4, f32)
to the
  vbitconvert
is a very bad idea.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30989 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd fdivs e fdivd
Rafael Espindola [Mon, 16 Oct 2006 21:50:04 +0000 (21:50 +0000)]
add fdivs e fdivd

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30988 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoexpand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS
Rafael Espindola [Mon, 16 Oct 2006 21:10:32 +0000 (21:10 +0000)]
expand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30987 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdded a X86CompilationCallback variant which saves XMM argument registers for targets...
Evan Cheng [Mon, 16 Oct 2006 21:01:55 +0000 (21:01 +0000)]
Added a X86CompilationCallback variant which saves XMM argument registers for targets with SSE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30986 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProper fix for rdar://problem/4770604 Thanks to Stuart Hastings!
Evan Cheng [Mon, 16 Oct 2006 21:00:37 +0000 (21:00 +0000)]
Proper fix for rdar://problem/4770604   Thanks to Stuart Hastings!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30985 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPass AliasAnalysis thru to DAGCombiner.
Jim Laskey [Mon, 16 Oct 2006 20:52:31 +0000 (20:52 +0000)]
Pass AliasAnalysis thru to DAGCombiner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30984 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a ReplaceMBBInJumpTables method
Chris Lattner [Mon, 16 Oct 2006 20:41:42 +0000 (20:41 +0000)]
add a ReplaceMBBInJumpTables method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30983 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoGlobal name regression.
Jim Laskey [Mon, 16 Oct 2006 19:38:41 +0000 (19:38 +0000)]
Global name regression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30982 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodefine the DFPBinOp class
Rafael Espindola [Mon, 16 Oct 2006 18:39:22 +0000 (18:39 +0000)]
define the DFPBinOp class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30981 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd the FPBinOp class
Rafael Espindola [Mon, 16 Oct 2006 18:32:36 +0000 (18:32 +0000)]
add the FPBinOp class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30980 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodefine the Addr1BinOp class
Rafael Espindola [Mon, 16 Oct 2006 18:18:14 +0000 (18:18 +0000)]
define the Addr1BinOp class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30979 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodefine the IntBinOp class and use it to implement the multiply instructions
Rafael Espindola [Mon, 16 Oct 2006 17:57:20 +0000 (17:57 +0000)]
define the IntBinOp class and use it to implement the multiply instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30978 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix assembly syntax
Rafael Espindola [Mon, 16 Oct 2006 17:38:12 +0000 (17:38 +0000)]
fix assembly syntax

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30977 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement LDRB, LDRSB, LDRH and LDRSH
Rafael Espindola [Mon, 16 Oct 2006 17:17:22 +0000 (17:17 +0000)]
implement LDRB, LDRSB, LDRH and LDRSH

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30976 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement smull and umull
Rafael Espindola [Mon, 16 Oct 2006 16:33:29 +0000 (16:33 +0000)]
implement smull and umull

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30975 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAvoid getting into an infinite loop when -disable-x86-shuffle-opti is specified.
Evan Cheng [Mon, 16 Oct 2006 06:36:00 +0000 (06:36 +0000)]
Avoid getting into an infinite loop when -disable-x86-shuffle-opti is specified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30974 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSelectScalarSSELoad should call CanBeFoldedBy as well.
Evan Cheng [Mon, 16 Oct 2006 06:34:55 +0000 (06:34 +0000)]
SelectScalarSSELoad should call CanBeFoldedBy as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30973 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPassing isel root and use operands to ComplexPattern functions, these should do the...
Evan Cheng [Mon, 16 Oct 2006 06:33:44 +0000 (06:33 +0000)]
Passing isel root and use operands to ComplexPattern functions, these should do the usual load folding checks as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30972 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoregenerate
Chris Lattner [Sun, 15 Oct 2006 23:27:25 +0000 (23:27 +0000)]
regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30971 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoProduce a useful error message for Regression/Verifier/2006-10-15-AddrLabel.ll
Chris Lattner [Sun, 15 Oct 2006 23:26:46 +0000 (23:26 +0000)]
Produce a useful error message for Regression/Verifier/2006-10-15-AddrLabel.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30970 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotestcase that causes the asmparser to assert
Chris Lattner [Sun, 15 Oct 2006 23:26:28 +0000 (23:26 +0000)]
testcase that causes the asmparser to assert

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30969 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agolabel* is not a valid type, add an assertion.
Chris Lattner [Sun, 15 Oct 2006 23:21:12 +0000 (23:21 +0000)]
label* is not a valid type, add an assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30968 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix a buggy check that accidentally disabled this xform
Chris Lattner [Sun, 15 Oct 2006 22:42:15 +0000 (22:42 +0000)]
fix a buggy check that accidentally disabled this xform

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30967 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoclarify
Chris Lattner [Sun, 15 Oct 2006 20:05:59 +0000 (20:05 +0000)]
clarify

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30966 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDocument the VAArg, and vector instruction opcodes.
Reid Spencer [Sun, 15 Oct 2006 00:11:05 +0000 (00:11 +0000)]
Document the VAArg, and vector instruction opcodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30965 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAlign stack size to DWORD boundary
Anton Korobeynikov [Sat, 14 Oct 2006 20:53:35 +0000 (20:53 +0000)]
Align stack size to DWORD boundary

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30964 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoexpand ISD::BRCOND
Rafael Espindola [Sat, 14 Oct 2006 17:59:54 +0000 (17:59 +0000)]
expand ISD::BRCOND

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30963 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix some fp condition codes
Rafael Espindola [Sat, 14 Oct 2006 13:42:53 +0000 (13:42 +0000)]
fix some fp condition codes
use non trapping comparison instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30962 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTidy up after truncstore changes.
Jim Laskey [Sat, 14 Oct 2006 12:14:27 +0000 (12:14 +0000)]
Tidy up after truncstore changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30961 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOne cyclic dag a day is good for ya...
Evan Cheng [Sat, 14 Oct 2006 08:35:02 +0000 (08:35 +0000)]
One cyclic dag a day is good for ya...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30960 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDebug tweak.
Evan Cheng [Sat, 14 Oct 2006 08:34:06 +0000 (08:34 +0000)]
Debug tweak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30959 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCorrected load folding check. We need to start from the root of the sub-dag
Evan Cheng [Sat, 14 Oct 2006 08:33:25 +0000 (08:33 +0000)]
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.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30958 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoStart checking from the root of the matched sub-tree.
Evan Cheng [Sat, 14 Oct 2006 08:30:53 +0000 (08:30 +0000)]
Start checking from the root of the matched sub-tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30957 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoWhen checking if a load can be folded, we check if there is any non-direct
Evan Cheng [Sat, 14 Oct 2006 08:30:15 +0000 (08:30 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30956 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake sure that the node returned by SimplifySetCC is added to the worklist
Chris Lattner [Sat, 14 Oct 2006 03:52:46 +0000 (03:52 +0000)]
Make sure that the node returned by SimplifySetCC is added to the worklist
so that it can be deleted if unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30955 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotestcase for recent dag combiner patch. Before the entry bb was:
Chris Lattner [Sat, 14 Oct 2006 03:40:02 +0000 (03:40 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30954 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofold setcc of a setcc.
Chris Lattner [Sat, 14 Oct 2006 01:02:29 +0000 (01:02 +0000)]
fold setcc of a setcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30953 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoWhen SimplifySetCC was moved to the DAGCombiner, it was never removed from
Chris Lattner [Sat, 14 Oct 2006 00:41:01 +0000 (00:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30952 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodisable this pass for now, it's causing issues
Chris Lattner [Sat, 14 Oct 2006 00:30:06 +0000 (00:30 +0000)]
disable this pass for now, it's causing issues

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30951 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofalling off the end of a function is ok with an unreachable instruction.
Chris Lattner [Sat, 14 Oct 2006 00:21:48 +0000 (00:21 +0000)]
falling off the end of a function is ok with an unreachable instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30950 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agotestcase for recent selectiondag patch
Chris Lattner [Fri, 13 Oct 2006 23:54:16 +0000 (23:54 +0000)]
testcase for recent selectiondag patch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30949 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReduce the workload by not adding chain users to work list.
Jim Laskey [Fri, 13 Oct 2006 23:32:28 +0000 (23:32 +0000)]
Reduce the workload by not adding chain users to work list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30948 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug where we incorrectly turned '(X & 0) == 0' into '(X & 0) >> -1',
Chris Lattner [Fri, 13 Oct 2006 22:46:18 +0000 (22:46 +0000)]
Fix a bug where we incorrectly turned '(X & 0) == 0' into '(X & 0) >> -1',
which is undefined.  "0" isn't a power of 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30947 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement branch inspection/modification methods.
Chris Lattner [Fri, 13 Oct 2006 21:21:17 +0000 (21:21 +0000)]
implement branch inspection/modification methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30946 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMerge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
Evan Cheng [Fri, 13 Oct 2006 21:14:26 +0000 (21:14 +0000)]
Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30945 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoit is easier to implement these when they are virtual
Chris Lattner [Fri, 13 Oct 2006 21:02:27 +0000 (21:02 +0000)]
it is easier to implement these when they are virtual

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30944 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoallow branch reversal to fail
Chris Lattner [Fri, 13 Oct 2006 20:59:31 +0000 (20:59 +0000)]
allow branch reversal to fail

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30943 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCorrected formatting.
Bill Wendling [Fri, 13 Oct 2006 20:53:50 +0000 (20:53 +0000)]
Corrected formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30942 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd the branch folding pass as a late cleanup pass for all targets. For now
Chris Lattner [Fri, 13 Oct 2006 20:45:56 +0000 (20:45 +0000)]
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 :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30941 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoreplace the existing branch inspection/modification APIs with something more
Chris Lattner [Fri, 13 Oct 2006 20:44:01 +0000 (20:44 +0000)]
replace the existing branch inspection/modification APIs with something more
useful and general.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30940 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agodisable some objectionable code, maybe we can bring this pass to life
Chris Lattner [Fri, 13 Oct 2006 20:43:10 +0000 (20:43 +0000)]
disable some objectionable code, maybe we can bring this pass to life

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30939 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove some dead code
Chris Lattner [Fri, 13 Oct 2006 20:40:42 +0000 (20:40 +0000)]
remove some dead code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30938 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd note
Chris Lattner [Fri, 13 Oct 2006 20:20:58 +0000 (20:20 +0000)]
add note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30937 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoset isBarrier correctly
Chris Lattner [Fri, 13 Oct 2006 19:10:34 +0000 (19:10 +0000)]
set isBarrier correctly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30936 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCorrectly handle instruction separators.
Chris Lattner [Fri, 13 Oct 2006 17:56:02 +0000 (17:56 +0000)]
Correctly handle instruction separators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30935 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoExpose method and ivars for measuring inline asm length properly.
Chris Lattner [Fri, 13 Oct 2006 17:50:07 +0000 (17:50 +0000)]
Expose method and ivars for measuring inline asm length properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30934 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMove some warnings to debug mode.
Andrew Lenharth [Fri, 13 Oct 2006 17:38:22 +0000 (17:38 +0000)]
Move some warnings to debug mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30933 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd FNEGS and FNEGD
Rafael Espindola [Fri, 13 Oct 2006 17:37:35 +0000 (17:37 +0000)]
add FNEGS and FNEGD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30932 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix another dtor issue. The function local statics in this function were
Chris Lattner [Fri, 13 Oct 2006 17:22:21 +0000 (17:22 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30931 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd SBCS and SUBS
Rafael Espindola [Fri, 13 Oct 2006 17:19:20 +0000 (17:19 +0000)]
add SBCS and SUBS

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30930 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement calls to functions that return long
Rafael Espindola [Fri, 13 Oct 2006 16:47:22 +0000 (16:47 +0000)]
implement calls to functions that return long

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30929 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement unordered floating point compares
Rafael Espindola [Fri, 13 Oct 2006 13:14:59 +0000 (13:14 +0000)]
implement unordered floating point compares

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30928 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoWorkaround for templates
Jim Laskey [Fri, 13 Oct 2006 13:02:19 +0000 (13:02 +0000)]
Workaround for templates

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30927 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoClean up dump.
Jim Laskey [Fri, 13 Oct 2006 13:01:34 +0000 (13:01 +0000)]
Clean up dump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30926 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoavoid a ctor/dtor issue with the ProgramName global.
Chris Lattner [Fri, 13 Oct 2006 00:06:24 +0000 (00:06 +0000)]
avoid a ctor/dtor issue with the ProgramName global.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30925 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agosimplify trivial function
Chris Lattner [Thu, 12 Oct 2006 23:50:28 +0000 (23:50 +0000)]
simplify trivial function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30924 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReally remove dead nodes from isel queue.
Evan Cheng [Thu, 12 Oct 2006 23:18:52 +0000 (23:18 +0000)]
Really remove dead nodes from isel queue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30923 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoshrink anon-ns and mark stuff static. No functionality changes
Chris Lattner [Thu, 12 Oct 2006 22:09:17 +0000 (22:09 +0000)]
shrink anon-ns and mark stuff static.  No functionality changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30922 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a note
Chris Lattner [Thu, 12 Oct 2006 22:01:26 +0000 (22:01 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30921 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoLower X%C into X/C+stuff. This allows the 'division by a constant' logic to
Chris Lattner [Thu, 12 Oct 2006 20:58:32 +0000 (20:58 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30920 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Thu, 12 Oct 2006 20:56:15 +0000 (20:56 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30919 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd another cyclic dag test case.
Evan Cheng [Thu, 12 Oct 2006 20:38:45 +0000 (20:38 +0000)]
Add another cyclic dag test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30918 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUse RemoveDeadNode to kill dead node.
Evan Cheng [Thu, 12 Oct 2006 20:35:19 +0000 (20:35 +0000)]
Use RemoveDeadNode to kill dead node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30917 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd RemoveDeadNode to remove a dead node and its (potentially) dead operands.
Evan Cheng [Thu, 12 Oct 2006 20:34:05 +0000 (20:34 +0000)]
Add RemoveDeadNode to remove a dead node and its (potentially) dead operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30916 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a minor dag combine noticed when looking at PR945
Chris Lattner [Thu, 12 Oct 2006 20:23:19 +0000 (20:23 +0000)]
add a minor dag combine noticed when looking at PR945

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30915 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDoh. This wasn't causing problems by luck.
Evan Cheng [Thu, 12 Oct 2006 19:13:59 +0000 (19:13 +0000)]
Doh. This wasn't causing problems by luck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30914 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSome X86ISD::CMP were created with wrong ValueType's.
Evan Cheng [Thu, 12 Oct 2006 19:12:56 +0000 (19:12 +0000)]
Some X86ISD::CMP were created with wrong ValueType's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30913 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix massive resource leaks in the bytecode reader. Reading a bytecode file
Chris Lattner [Thu, 12 Oct 2006 18:32:30 +0000 (18:32 +0000)]
Fix massive resource leaks in the bytecode reader.  Reading a bytecode file
with ParseBytecodeFile used to leak both a ModuleProvider (and related
bytecode parser stuff attached to it) AND a file descriptor, which was
never closed.  This prevented gccld/llvm-ld/llvm-link from linking together
apps with more that ~252 .bc files on darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30912 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomark call adjustments as modifying the SP
Chris Lattner [Thu, 12 Oct 2006 18:00:26 +0000 (18:00 +0000)]
mark call adjustments as modifying the SP

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30911 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadjcallstack up/down clobbers the sp
Chris Lattner [Thu, 12 Oct 2006 18:00:14 +0000 (18:00 +0000)]
adjcallstack up/down clobbers the sp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30910 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadjcallstackup/down clobbers the stack pointer
Chris Lattner [Thu, 12 Oct 2006 17:57:58 +0000 (17:57 +0000)]
adjcallstackup/down clobbers the stack pointer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30909 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agomark adjcallstack up/down as clobbering and using the SP
Chris Lattner [Thu, 12 Oct 2006 17:56:34 +0000 (17:56 +0000)]
mark adjcallstack up/down as clobbering and using the SP

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30908 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMove the Imp tblgen class from the X86 backend to common code.
Chris Lattner [Thu, 12 Oct 2006 17:49:27 +0000 (17:49 +0000)]
Move the Imp tblgen class from the X86 backend to common code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30907 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agorestore my previous patch, now that the X86 backend bug has been fixed:
Chris Lattner [Thu, 12 Oct 2006 17:45:38 +0000 (17:45 +0000)]
restore my previous patch, now that the X86 backend bug has been fixed:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061009/038518.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30906 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMark ADJCALLSTACKUP/DOWN as clobbering ESP so that virtregmap will notice
Chris Lattner [Thu, 12 Oct 2006 17:42:56 +0000 (17:42 +0000)]
Mark ADJCALLSTACKUP/DOWN as clobbering ESP so that virtregmap will notice
that it can't assume ESP is unmodified across the instrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30905 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoD'oh - need to use the rigth kind of store.
Jim Laskey [Thu, 12 Oct 2006 15:22:24 +0000 (15:22 +0000)]
D'oh - need to use the rigth kind of store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30903 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBacking out Chris' last commit. It's breaking llvm-gcc bootstrapping.
Evan Cheng [Thu, 12 Oct 2006 08:00:47 +0000 (08:00 +0000)]
Backing out Chris' last commit. It's breaking llvm-gcc bootstrapping.

It's turning:
        movl -24(%ebp), %esp
        subl $16, %esp
        movl -24(%ebp), %ecx
into
        movl -24(%ebp), %esp
        subl $16, %esp
        movl %esp, (%esp)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30902 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix compilation failure of smg2000
Chris Lattner [Thu, 12 Oct 2006 03:55:48 +0000 (03:55 +0000)]
fix compilation failure of smg2000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30900 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoIf we see a load from a stack slot into a physreg, consider it as providing
Chris Lattner [Thu, 12 Oct 2006 02:34:07 +0000 (02:34 +0000)]
If we see a load from a stack slot into a physreg, consider it as providing
the stack slot.  This fixes PR943.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30898 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPrior load folding check on chain operand was too strict. It requires the
Evan Cheng [Thu, 12 Oct 2006 02:08:53 +0000 (02:08 +0000)]
Prior load folding check on chain operand was too strict. It requires the
chain operand to point to the load being folded. Now we relax this, traversing
up the chain, if it doesn't reach the load, then it's ok. We will create a
TokenFactor (of all the chain operands and the load's chain) to capture all
the control flow dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30897 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReplace custom dispatch code with two uses of InstVisitor. Improves
Nick Lewycky [Thu, 12 Oct 2006 02:02:44 +0000 (02:02 +0000)]
Replace custom dispatch code with two uses of InstVisitor. Improves
compile-time performance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30896 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUpdate tests.
Evan Cheng [Thu, 12 Oct 2006 01:42:03 +0000 (01:42 +0000)]
Update tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30895 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFold "zero extending vector loads" now that evan added the chain manip stuff.
Chris Lattner [Wed, 11 Oct 2006 22:09:58 +0000 (22:09 +0000)]
Fold "zero extending vector loads" now that evan added the chain manip stuff.
This compiles both tests in X86/vec_ss_load_fold.ll into:

_test1:
        movss 4(%esp), %xmm0
        subss LCPI1_0, %xmm0
        mulss LCPI1_1, %xmm0
        minss LCPI1_2, %xmm0
        xorps %xmm1, %xmm1
        maxss %xmm1, %xmm0
        cvttss2si %xmm0, %eax
        andl $65535, %eax
        ret

instead of:

_test1:
        movss LCPI1_0, %xmm0
        movss 4(%esp), %xmm1
        subss %xmm0, %xmm1
        movss LCPI1_1, %xmm0
        mulss %xmm0, %xmm1
        movss LCPI1_2, %xmm0
        minss %xmm0, %xmm1
        xorps %xmm0, %xmm0
        maxss %xmm0, %xmm1
        cvttss2si %xmm1, %eax
        andl $65535, %eax
        ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30894 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agonew testcase
Chris Lattner [Wed, 11 Oct 2006 22:07:38 +0000 (22:07 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30893 91177308-0d34-0410-b5e6-96231b3b80d8