OSDN Git Service

android-x86/external-llvm.git
18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 years agoComplexPatterns sse_load_f32 and sse_load_f64 returns in / out chain operands.
Evan Cheng [Wed, 11 Oct 2006 21:06:01 +0000 (21:06 +0000)]
ComplexPatterns sse_load_f32 and sse_load_f64 returns in / out chain operands.

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

18 years agoAdd properties to ComplexPattern.
Evan Cheng [Wed, 11 Oct 2006 21:03:53 +0000 (21:03 +0000)]
Add properties to ComplexPattern.

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

18 years agoAdded properties such as SDNPHasChain to ComplexPattern.
Evan Cheng [Wed, 11 Oct 2006 21:02:01 +0000 (21:02 +0000)]
Added properties such as SDNPHasChain to ComplexPattern.

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

18 years agoAlias analysis of TRUNCSTORE.
Jim Laskey [Wed, 11 Oct 2006 18:55:16 +0000 (18:55 +0000)]
Alias analysis of TRUNCSTORE.

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

18 years agoregenerate
Chris Lattner [Wed, 11 Oct 2006 18:13:09 +0000 (18:13 +0000)]
regenerate

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

18 years agoAdd support for let expressions around an mdef. This implements a new part
Chris Lattner [Wed, 11 Oct 2006 18:12:44 +0000 (18:12 +0000)]
Add support for let expressions around an mdef.  This implements a new part
of Regression/TableGen/MultiClass.td.

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

18 years agoadd test for mdef in a let
Chris Lattner [Wed, 11 Oct 2006 18:12:14 +0000 (18:12 +0000)]
add test for mdef in a let

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

18 years agoClean-up of formatting and spelling.
Bill Wendling [Wed, 11 Oct 2006 18:00:22 +0000 (18:00 +0000)]
Clean-up of formatting and spelling.

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

18 years agoTypo
Jim Laskey [Wed, 11 Oct 2006 17:52:19 +0000 (17:52 +0000)]
Typo

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

18 years agoHandle aliasing of loadext.
Jim Laskey [Wed, 11 Oct 2006 17:47:52 +0000 (17:47 +0000)]
Handle aliasing of loadext.

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

18 years agoExplict processor.
Jim Laskey [Wed, 11 Oct 2006 17:14:14 +0000 (17:14 +0000)]
Explict processor.

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

18 years agoReduce the amount of state in the lowering code and drop old pattern ISel functions
Andrew Lenharth [Wed, 11 Oct 2006 16:24:51 +0000 (16:24 +0000)]
Reduce the amount of state in the lowering code and drop old pattern ISel functions

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

18 years agoFix regression in combiner alias analysis.
Jim Laskey [Wed, 11 Oct 2006 13:47:09 +0000 (13:47 +0000)]
Fix regression in combiner alias analysis.

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

18 years agoMake sure combiner alias analysis does it's thing.
Jim Laskey [Wed, 11 Oct 2006 13:42:49 +0000 (13:42 +0000)]
Make sure combiner alias analysis does it's thing.

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

18 years agoNaming consistency.
Evan Cheng [Wed, 11 Oct 2006 07:10:22 +0000 (07:10 +0000)]
Naming consistency.

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

18 years agoTest case for the recently fixed FindModifiedNodeSlot bug.
Evan Cheng [Wed, 11 Oct 2006 07:01:37 +0000 (07:01 +0000)]
Test case for the recently fixed FindModifiedNodeSlot bug.

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

18 years agoPut code example inside of "doc_code" divisions.
Bill Wendling [Wed, 11 Oct 2006 06:30:10 +0000 (06:30 +0000)]
Put code example inside of "doc_code" divisions.

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

18 years agoUse cute tblgen tricks to make zap handling more powerful. Specifically,
Chris Lattner [Wed, 11 Oct 2006 05:13:56 +0000 (05:13 +0000)]
Use cute tblgen tricks to make zap handling more powerful.  Specifically,
when the dag combiner simplifies an and mask, notice this and allow those bits
to be missing from the zap mask.

This compiles Alpha/zapnot4.ll into:

        sll $16,3,$0
        zapnot $0,3,$0
        ret $31,($26),1

instead of:

        ldah $0,1($31)
        lda $0,-8($0)
        sll $16,3,$1
        and $1,$0,$0
        ret $31,($26),1

It would be *really* nice to replace the hunk of code in the
AlphaISelDAGToDAG.cpp file that matches (and (srl (x, C), c2) into
(SRL (ZAPNOTi)) with a similar pattern, but I've spent enough time poking
at alpha.  Make andrew will do this.

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

18 years agonew testcase, this should turn into zap
Chris Lattner [Wed, 11 Oct 2006 05:10:19 +0000 (05:10 +0000)]
new testcase, this should turn into zap

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

18 years agoJimptables working again on alpha.
Andrew Lenharth [Wed, 11 Oct 2006 04:29:42 +0000 (04:29 +0000)]
Jimptables working again on alpha.

As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.

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

18 years agoRemove dead/redundant instructions. These are handled by ZAPNOTi
Chris Lattner [Wed, 11 Oct 2006 04:12:39 +0000 (04:12 +0000)]
Remove dead/redundant instructions.  These are handled by ZAPNOTi

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

18 years agoSpecial case tblgen generated code for patterns like (and X, 255) or (or X, 42).
Chris Lattner [Wed, 11 Oct 2006 04:05:55 +0000 (04:05 +0000)]
Special case tblgen generated code for patterns like (and X, 255) or (or X, 42).
The dag/inst combiners often 'simplify' the masked value based on whether
or not the bits are live or known zero/one.  This is good and dandy, but
often causes special case patterns to fail, such as alpha's CMPBGE pattern,
which looks like "(set GPRC:$RC, (setuge (and GPRC:$RA, 255), (and GPRC:$RB, 255)))".
Here the pattern for (and X, 255) should match actual dags like (and X, 254) if
the dag combiner proved that the missing bits are already zero (one for 'or').

For CodeGen/Alpha/cmpbge.ll:test2 for example, this results in:

        sll $16,1,$0
        cmpbge $0,$17,$0
        ret $31,($26),1

instead of:

        sll $16,1,$0
        and $0,254,$0
        and $17,255,$1
        cmpule $1,$0,$0
        ret $31,($26),1

... and requires no target-specific code.

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

18 years agoBoth of these functions should turn into cmpbge instructions, even though
Chris Lattner [Wed, 11 Oct 2006 03:59:48 +0000 (03:59 +0000)]
Both of these functions should turn into cmpbge instructions, even though
the second has an and of 254 not 255.

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

18 years agoadd two helper methods.
Chris Lattner [Wed, 11 Oct 2006 03:58:02 +0000 (03:58 +0000)]
add two helper methods.

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

18 years agoSplit some code out into a new method. The generated code is exactly
Chris Lattner [Wed, 11 Oct 2006 03:35:34 +0000 (03:35 +0000)]
Split some code out into a new method.  The generated code is exactly
identical, this is just a refactoring.

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

18 years agoThis entry is done. switched to the gcc way of doing things.
Andrew Lenharth [Wed, 11 Oct 2006 01:48:03 +0000 (01:48 +0000)]
This entry is done.  switched to the gcc way of doing things.

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

18 years agoFindModifiedNodeSlot needs to add LoadSDNode ivars to create proper SelectionDAGCSEMa...
Evan Cheng [Wed, 11 Oct 2006 01:47:58 +0000 (01:47 +0000)]
FindModifiedNodeSlot needs to add LoadSDNode ivars to create proper SelectionDAGCSEMap ID.

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

18 years agonew testcase for zap generation, from the alpha readme
Chris Lattner [Wed, 11 Oct 2006 01:47:08 +0000 (01:47 +0000)]
new testcase for zap generation, from the alpha readme

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

18 years agoThis has apparently been fixed
Chris Lattner [Wed, 11 Oct 2006 01:44:46 +0000 (01:44 +0000)]
This has apparently been fixed

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

18 years agoMake the bugpoint reduction heuristics more effective. Patch submitted by
Chris Lattner [Tue, 10 Oct 2006 21:42:25 +0000 (21:42 +0000)]
Make the bugpoint reduction heuristics more effective.  Patch submitted by
Domagoj Babic, thanks!

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

18 years agouint <-> double conversion
Rafael Espindola [Tue, 10 Oct 2006 20:38:57 +0000 (20:38 +0000)]
uint <-> double conversion

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

18 years agoAlso update getNodeLabel for LoadSDNode.
Evan Cheng [Tue, 10 Oct 2006 20:11:26 +0000 (20:11 +0000)]
Also update getNodeLabel for LoadSDNode.

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

18 years agoSDNode::dump should also print out extension type and VT.
Evan Cheng [Tue, 10 Oct 2006 20:05:10 +0000 (20:05 +0000)]
SDNode::dump should also print out extension type and VT.

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

18 years agoadd fp sub
Rafael Espindola [Tue, 10 Oct 2006 19:35:01 +0000 (19:35 +0000)]
add fp sub

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

18 years agoadd double <-> int conversion
Rafael Espindola [Tue, 10 Oct 2006 18:55:14 +0000 (18:55 +0000)]
add double <-> int conversion

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

18 years agoFix another bug in extload promotion.
Chris Lattner [Tue, 10 Oct 2006 18:54:19 +0000 (18:54 +0000)]
Fix another bug in extload promotion.

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

18 years agocompare doubles
Rafael Espindola [Tue, 10 Oct 2006 16:33:47 +0000 (16:33 +0000)]
compare doubles

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

18 years agoadd some tests for floating point compare
Rafael Espindola [Tue, 10 Oct 2006 14:26:06 +0000 (14:26 +0000)]
add some tests for floating point compare

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

18 years agoinitial support for fp compares. Unordered compares not implemented yet
Rafael Espindola [Tue, 10 Oct 2006 12:56:00 +0000 (12:56 +0000)]
initial support for fp compares. Unordered compares not implemented yet

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

18 years agoFix a bug introduced by my LOAD/LOADX changes.
Evan Cheng [Tue, 10 Oct 2006 07:51:21 +0000 (07:51 +0000)]
Fix a bug introduced by my LOAD/LOADX changes.

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

18 years agoAdd test case from PR940.
Evan Cheng [Tue, 10 Oct 2006 04:33:46 +0000 (04:33 +0000)]
Add test case from PR940.

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

18 years agoMore isel time load folding checking for nodes that produce flag values.
Evan Cheng [Tue, 10 Oct 2006 01:46:56 +0000 (01:46 +0000)]
More isel time load folding checking for nodes that produce flag values.
See comment in CanBeFoldedBy() for detailed explanation.

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

18 years agoComments; getChain(), getBasePtr(), etc. should return a SDOperand by value.
Evan Cheng [Tue, 10 Oct 2006 01:44:58 +0000 (01:44 +0000)]
Comments; getChain(), getBasePtr(), etc. should return a SDOperand by value.

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

18 years agoshufps with load folding is better than movaps; movsd.
Evan Cheng [Mon, 9 Oct 2006 22:42:31 +0000 (22:42 +0000)]
shufps with load folding is better than movaps; movsd.

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

18 years agoDon't go too crazy with these AddComplexity. Try matching shufps with load
Evan Cheng [Mon, 9 Oct 2006 21:42:15 +0000 (21:42 +0000)]
Don't go too crazy with these AddComplexity. Try matching shufps with load
folding first.

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

18 years agoDon't convert to MOVLP if using shufps etc. may allow load folding.
Evan Cheng [Mon, 9 Oct 2006 21:39:25 +0000 (21:39 +0000)]
Don't convert to MOVLP if using shufps etc. may allow load folding.

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

18 years agoUse FindProgramByName instead of FindExecutable.
Devang Patel [Mon, 9 Oct 2006 21:16:05 +0000 (21:16 +0000)]
Use FindProgramByName instead of FindExecutable.

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

18 years agoPredicate function on the node should be matched before its childrean' matching
Evan Cheng [Mon, 9 Oct 2006 21:02:17 +0000 (21:02 +0000)]
Predicate function on the node should be matched before its childrean' matching
code. This is especially important now matching ISD::LOAD also requires a
Predicate_Load call.

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

18 years agoReflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
Evan Cheng [Mon, 9 Oct 2006 20:57:25 +0000 (20:57 +0000)]
Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.

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

18 years agoMerging ISD::LOAD and ISD::LOADX. Added LoadSDNode to represent load nodes.
Evan Cheng [Mon, 9 Oct 2006 20:55:20 +0000 (20:55 +0000)]
Merging ISD::LOAD and ISD::LOADX. Added LoadSDNode to represent load nodes.
Chain and address ptr remains as operands. SrcValue, extending mode, extending
VT (or rather loaded VT before extension) are now instance variables of
LoadSDNode.

Introduce load / store addressing modes to represent pre- and post-indexed
load and store. Also added an additional operand offset that is only used in
post-indexed mode (i.e. base ptr += offset after load/store).

Added alignment info (not yet used) and isVolatile fields.

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

18 years agoDo error checking.
Devang Patel [Mon, 9 Oct 2006 20:20:13 +0000 (20:20 +0000)]
Do error checking.

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

18 years agoRemove a dead var noticed by Yorion
Chris Lattner [Mon, 9 Oct 2006 20:12:37 +0000 (20:12 +0000)]
Remove a dead var noticed by Yorion

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

18 years agoadd some tests for floating point arithmetic
Rafael Espindola [Mon, 9 Oct 2006 19:15:17 +0000 (19:15 +0000)]
add some tests for floating point arithmetic

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

18 years agoFix build error in gcc 3.4 and make more this general
Andrew Lenharth [Mon, 9 Oct 2006 19:05:44 +0000 (19:05 +0000)]
Fix build error in gcc 3.4 and make more this general

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

18 years agoUse GetTemporaryDirectory. Fix http://llvm.org/bugs/show_bug.cgi?id=894
Devang Patel [Mon, 9 Oct 2006 19:04:51 +0000 (19:04 +0000)]
Use GetTemporaryDirectory. Fix llvm.org/bugs/show_bug.cgi?id=894

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

18 years agoFix usage example.
Nick Lewycky [Mon, 9 Oct 2006 18:33:08 +0000 (18:33 +0000)]
Fix usage example.

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

18 years agoadd float -> double and double -> float conversion
Rafael Espindola [Mon, 9 Oct 2006 17:50:29 +0000 (17:50 +0000)]
add float -> double and double -> float conversion

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

18 years agoFix PR886:
Reid Spencer [Mon, 9 Oct 2006 17:36:59 +0000 (17:36 +0000)]
Fix PR886:
The result of yyparse() was not being checked. When YYERROR or YYABORT is
called it causes yyparse() to return 1 to indicate the error. The code was
silently ignoring this situation because it previously expected either an
exception or a null ParserResult to indicate an error. The patch corrects
this situation.

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

18 years agoxfail this until andrew has a chance to implement the alpha TM method.
Chris Lattner [Mon, 9 Oct 2006 17:34:40 +0000 (17:34 +0000)]
xfail this until andrew has a chance to implement the alpha TM method.

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

18 years agoadd a test for adds adcs
Rafael Espindola [Mon, 9 Oct 2006 17:30:15 +0000 (17:30 +0000)]
add a test for adds adcs

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

18 years agoFix a bug pointed out by Zhongxing Xu
Chris Lattner [Mon, 9 Oct 2006 17:28:13 +0000 (17:28 +0000)]
Fix a bug pointed out by Zhongxing Xu

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

18 years agoadd ADDS and ADCS
Rafael Espindola [Mon, 9 Oct 2006 17:18:28 +0000 (17:18 +0000)]
add ADDS and ADCS

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