1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
Commit Graph

26945 Commits

Author SHA1 Message Date
Chris Lattner
fde6859201 fix compilation failure of smg2000
llvm-svn: 30900
2006-10-12 03:55:48 +00:00
Chris Lattner
d781da5f26 If we see a load from a stack slot into a physreg, consider it as providing
the stack slot.  This fixes PR943.

llvm-svn: 30898
2006-10-12 02:34:07 +00:00
Evan Cheng
65264c811f 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.

llvm-svn: 30897
2006-10-12 02:08:53 +00:00
Nick Lewycky
686cc9cacc Replace custom dispatch code with two uses of InstVisitor. Improves
compile-time performance.

llvm-svn: 30896
2006-10-12 02:02:44 +00:00
Evan Cheng
1ff54fff5c Update tests.
llvm-svn: 30895
2006-10-12 01:42:03 +00:00
Chris Lattner
502246c4a6 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

llvm-svn: 30894
2006-10-11 22:09:58 +00:00
Chris Lattner
58e8710dbb new testcase
llvm-svn: 30893
2006-10-11 22:07:38 +00:00
Evan Cheng
95140c9c64 ComplexPatterns sse_load_f32 and sse_load_f64 returns in / out chain operands.
llvm-svn: 30892
2006-10-11 21:06:01 +00:00
Evan Cheng
ca66f49574 Add properties to ComplexPattern.
llvm-svn: 30891
2006-10-11 21:03:53 +00:00
Evan Cheng
7a185e0164 Added properties such as SDNPHasChain to ComplexPattern.
llvm-svn: 30890
2006-10-11 21:02:01 +00:00
Jim Laskey
eba756c1a7 Alias analysis of TRUNCSTORE.
llvm-svn: 30889
2006-10-11 18:55:16 +00:00
Chris Lattner
461eba5c63 regenerate
llvm-svn: 30888
2006-10-11 18:13:09 +00:00
Chris Lattner
0c0f2eacfc Add support for let expressions around an mdef. This implements a new part
of Regression/TableGen/MultiClass.td.

llvm-svn: 30887
2006-10-11 18:12:44 +00:00
Chris Lattner
4367bcab16 add test for mdef in a let
llvm-svn: 30886
2006-10-11 18:12:14 +00:00
Bill Wendling
1796691858 Clean-up of formatting and spelling.
llvm-svn: 30885
2006-10-11 18:00:22 +00:00
Jim Laskey
6efcd15c88 Typo
llvm-svn: 30884
2006-10-11 17:52:19 +00:00
Jim Laskey
4791a4ad14 Handle aliasing of loadext.
llvm-svn: 30883
2006-10-11 17:47:52 +00:00
Jim Laskey
b5a4bbd350 Explict processor.
llvm-svn: 30882
2006-10-11 17:14:14 +00:00
Andrew Lenharth
55db991b47 Reduce the amount of state in the lowering code and drop old pattern ISel functions
llvm-svn: 30881
2006-10-11 16:24:51 +00:00
Jim Laskey
fd6218f8f5 Fix regression in combiner alias analysis.
llvm-svn: 30880
2006-10-11 13:47:09 +00:00
Jim Laskey
0d8d0db0f3 Make sure combiner alias analysis does it's thing.
llvm-svn: 30879
2006-10-11 13:42:49 +00:00
Evan Cheng
9b31a4d4ed Naming consistency.
llvm-svn: 30878
2006-10-11 07:10:22 +00:00
Evan Cheng
9491e25341 Test case for the recently fixed FindModifiedNodeSlot bug.
llvm-svn: 30877
2006-10-11 07:01:37 +00:00
Bill Wendling
692ac6b337 Put code example inside of "doc_code" divisions.
llvm-svn: 30876
2006-10-11 06:30:10 +00:00
Chris Lattner
b9c1ea6dcc 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.

llvm-svn: 30875
2006-10-11 05:13:56 +00:00
Chris Lattner
427004614b new testcase, this should turn into zap
llvm-svn: 30874
2006-10-11 05:10:19 +00:00
Andrew Lenharth
4b783303e5 Jimptables working again on alpha.
As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.

llvm-svn: 30873
2006-10-11 04:29:42 +00:00
Chris Lattner
95a8905db2 Remove dead/redundant instructions. These are handled by ZAPNOTi
llvm-svn: 30872
2006-10-11 04:12:39 +00:00
Chris Lattner
822d1b259e 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.

llvm-svn: 30871
2006-10-11 04:05:55 +00:00
Chris Lattner
e7dfa73a22 Both of these functions should turn into cmpbge instructions, even though
the second has an and of 254 not 255.

llvm-svn: 30870
2006-10-11 03:59:48 +00:00
Chris Lattner
aa1741fc87 add two helper methods.
llvm-svn: 30869
2006-10-11 03:58:02 +00:00
Chris Lattner
ad597308ad Split some code out into a new method. The generated code is exactly
identical, this is just a refactoring.

llvm-svn: 30868
2006-10-11 03:35:34 +00:00
Andrew Lenharth
7a79f1df15 This entry is done. switched to the gcc way of doing things.
llvm-svn: 30867
2006-10-11 01:48:03 +00:00
Evan Cheng
d6b419ecb0 FindModifiedNodeSlot needs to add LoadSDNode ivars to create proper SelectionDAGCSEMap ID.
llvm-svn: 30866
2006-10-11 01:47:58 +00:00
Chris Lattner
05d6841bae new testcase for zap generation, from the alpha readme
llvm-svn: 30865
2006-10-11 01:47:08 +00:00
Chris Lattner
4be8276d27 This has apparently been fixed
llvm-svn: 30864
2006-10-11 01:44:46 +00:00
Chris Lattner
325671d406 Make the bugpoint reduction heuristics more effective. Patch submitted by
Domagoj Babic, thanks!

llvm-svn: 30863
2006-10-10 21:42:25 +00:00
Rafael Espindola
46e7aceb1d uint <-> double conversion
llvm-svn: 30862
2006-10-10 20:38:57 +00:00
Evan Cheng
0d8a340a8f Also update getNodeLabel for LoadSDNode.
llvm-svn: 30861
2006-10-10 20:11:26 +00:00
Evan Cheng
a12747d2b4 SDNode::dump should also print out extension type and VT.
llvm-svn: 30860
2006-10-10 20:05:10 +00:00
Rafael Espindola
0112351e9a add fp sub
llvm-svn: 30859
2006-10-10 19:35:01 +00:00
Rafael Espindola
27d68a3c22 add double <-> int conversion
llvm-svn: 30858
2006-10-10 18:55:14 +00:00
Chris Lattner
e0734f522f Fix another bug in extload promotion.
llvm-svn: 30857
2006-10-10 18:54:19 +00:00
Rafael Espindola
413aa20bc8 compare doubles
llvm-svn: 30856
2006-10-10 16:33:47 +00:00
Rafael Espindola
4ea6435132 add some tests for floating point compare
llvm-svn: 30855
2006-10-10 14:26:06 +00:00
Rafael Espindola
b0719f1374 initial support for fp compares. Unordered compares not implemented yet
llvm-svn: 30854
2006-10-10 12:56:00 +00:00
Evan Cheng
070ae65fa8 Fix a bug introduced by my LOAD/LOADX changes.
llvm-svn: 30853
2006-10-10 07:51:21 +00:00
Evan Cheng
2fc9d4f580 Add test case from PR940.
llvm-svn: 30852
2006-10-10 04:33:46 +00:00
Evan Cheng
b2998e15f2 More isel time load folding checking for nodes that produce flag values.
See comment in CanBeFoldedBy() for detailed explanation.

llvm-svn: 30851
2006-10-10 01:46:56 +00:00
Evan Cheng
8090a67f40 Comments; getChain(), getBasePtr(), etc. should return a SDOperand by value.
llvm-svn: 30850
2006-10-10 01:44:58 +00:00