oota-llvm.git
18 years agonew testcase
Chris Lattner [Fri, 31 Mar 2006 21:53:01 +0000 (21:53 +0000)]
new testcase

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

18 years agoAdded support for SSE3 horizontal ops: haddp{s|d} and hsub{s|d}.
Evan Cheng [Fri, 31 Mar 2006 21:29:33 +0000 (21:29 +0000)]
Added support for SSE3 horizontal ops: haddp{s|d} and hsub{s|d}.

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

18 years agoAdded haddp{s|d} and hsubp{s|d} intrinsics.
Evan Cheng [Fri, 31 Mar 2006 21:28:46 +0000 (21:28 +0000)]
Added haddp{s|d} and hsubp{s|d} intrinsics.

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

18 years agofix a pasto
Chris Lattner [Fri, 31 Mar 2006 21:19:06 +0000 (21:19 +0000)]
fix a pasto

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

18 years agoAdd vperm support for all datatypes
Chris Lattner [Fri, 31 Mar 2006 20:00:35 +0000 (20:00 +0000)]
Add vperm support for all datatypes

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

18 years agoRearrange code a bit
Chris Lattner [Fri, 31 Mar 2006 19:52:36 +0000 (19:52 +0000)]
Rearrange code a bit

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

18 years agoAdd, sub and shuffle are legal for all vector types
Chris Lattner [Fri, 31 Mar 2006 19:48:58 +0000 (19:48 +0000)]
Add, sub and shuffle are legal for all vector types

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

18 years agoAdd support to use pextrw and pinsrw to extract and insert a word element
Evan Cheng [Fri, 31 Mar 2006 19:22:53 +0000 (19:22 +0000)]
Add support to use pextrw and pinsrw to extract and insert a word element
from a 128-bit vector.

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

18 years agoAdd vector_extract and vector_insert nodes.
Evan Cheng [Fri, 31 Mar 2006 19:21:16 +0000 (19:21 +0000)]
Add vector_extract and vector_insert nodes.

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

18 years agoadd a note
Chris Lattner [Fri, 31 Mar 2006 19:00:22 +0000 (19:00 +0000)]
add a note

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

18 years agoconstant fold extractelement with undef operands.
Chris Lattner [Fri, 31 Mar 2006 18:31:40 +0000 (18:31 +0000)]
constant fold extractelement with undef operands.

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

18 years agoextractelement(undef,x) -> undef
Chris Lattner [Fri, 31 Mar 2006 18:25:14 +0000 (18:25 +0000)]
extractelement(undef,x) -> undef

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

18 years agoDo not endian swap split vector loads. This fixes UnitTests/Vector/sumarray-dbl...
Chris Lattner [Fri, 31 Mar 2006 18:22:37 +0000 (18:22 +0000)]
Do not endian swap split vector loads.  This fixes UnitTests/Vector/sumarray-dbl on PPC.

Now all UnitTests/Vector/* tests pass on PPC.

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

18 years agoDo not endian swap the operands to a store if the operands came from a vector.
Chris Lattner [Fri, 31 Mar 2006 18:20:46 +0000 (18:20 +0000)]
Do not endian swap the operands to a store if the operands came from a vector.

This fixes UnitTests/Vector/simple.c with altivec.

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

18 years agoRemove dead *extloads. This allows us to codegen vector.ll:test_extract_elt
Chris Lattner [Fri, 31 Mar 2006 18:10:41 +0000 (18:10 +0000)]
Remove dead *extloads.  This allows us to codegen vector.ll:test_extract_elt
to:

test_extract_elt:
        alloc r3 = ar.pfs,0,1,0,0
        adds r8 = 12, r32
        ;;
        ldfs f8 = [r8]
        mov ar.pfs = r3
        br.ret.sptk.many rp

instead of:

test_extract_elt:
        alloc r3 = ar.pfs,0,1,0,0
        adds r8 = 28, r32
        adds r9 = 24, r32
        adds r10 = 20, r32
        adds r11 = 16, r32
        ;;
        ldfs f6 = [r8]
        ;;
        ldfs f6 = [r9]
        adds r8 = 12, r32
        adds r9 = 8, r32
        adds r14 = 4, r32
        ;;
        ldfs f6 = [r10]
        ;;
        ldfs f6 = [r11]
        ldfs f8 = [r8]
        ;;
        ldfs f6 = [r9]
        ;;
        ldfs f6 = [r14]
        ;;
        ldfs f6 = [r32]
        mov ar.pfs = r3
        br.ret.sptk.many rp

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

18 years agoDelete dead loads in the dag. This allows us to compile
Chris Lattner [Fri, 31 Mar 2006 18:06:18 +0000 (18:06 +0000)]
Delete dead loads in the dag.  This allows us to compile
vector.ll:test_extract_elt2 into:

_test_extract_elt2:
        lfd f1, 32(r3)
        blr

instead of:

_test_extract_elt2:
        lfd f0, 56(r3)
        lfd f0, 48(r3)
        lfd f0, 40(r3)
        lfd f1, 32(r3)
        lfd f0, 24(r3)
        lfd f0, 16(r3)
        lfd f0, 8(r3)
        lfd f0, 0(r3)
        blr

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

18 years agoMake this test harder, always check generic x86 and SSE-enabled x86.
Chris Lattner [Fri, 31 Mar 2006 17:59:16 +0000 (17:59 +0000)]
Make this test harder, always check generic x86 and SSE-enabled x86.

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

18 years agoImplement PromoteOp for VEXTRACT_VECTOR_ELT. Thsi fixes
Chris Lattner [Fri, 31 Mar 2006 17:55:51 +0000 (17:55 +0000)]
Implement PromoteOp for VEXTRACT_VECTOR_ELT.  Thsi fixes
Generic/vector.ll:test_extract_elt on non-sse X86 systems.

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

18 years agoScalarized vector stores need not be legal, e.g. if the vector element type
Chris Lattner [Fri, 31 Mar 2006 17:37:22 +0000 (17:37 +0000)]
Scalarized vector stores need not be legal, e.g. if the vector element type
needs to be promoted or expanded.  Relegalize the scalar store once created.
This fixes CodeGen/Generic/vector.ll:test1 on non-SSE x86 targets.

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

18 years agoFix build breakage.
Jeff Cohen [Fri, 31 Mar 2006 07:22:05 +0000 (07:22 +0000)]
Fix build breakage.

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

18 years agonote to self: *save* file, then check it in
Chris Lattner [Fri, 31 Mar 2006 06:04:53 +0000 (06:04 +0000)]
note to self: *save* file, then check it in

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

18 years agoImplement an item from the readme, folding vcmp/vcmp. instructions with
Chris Lattner [Fri, 31 Mar 2006 06:02:07 +0000 (06:02 +0000)]
Implement an item from the readme, folding vcmp/vcmp. instructions with
identical instructions into a single instruction.  For example, for:

void test(vector float *x, vector float *y, int *P) {
  int v = vec_any_out(*x, *y);
  *x = (vector float)vec_cmpb(*x, *y);
  *P = v;
}

we now generate:

_test:
        mfspr r2, 256
        oris r6, r2, 49152
        mtspr 256, r6
        lvx v0, 0, r4
        lvx v1, 0, r3
        vcmpbfp. v0, v1, v0
        mfcr r4, 2
        stvx v0, 0, r3
        rlwinm r3, r4, 27, 31, 31
        xori r3, r3, 1
        stw r3, 0(r5)
        mtspr 256, r2
        blr

instead of:

_test:
        mfspr r2, 256
        oris r6, r2, 57344
        mtspr 256, r6
        lvx v0, 0, r4
        lvx v1, 0, r3
        vcmpbfp. v2, v1, v0
        mfcr r4, 2
***     vcmpbfp v0, v1, v0
        rlwinm r4, r4, 27, 31, 31
        stvx v0, 0, r3
        xori r3, r4, 1
        stw r3, 0(r5)
        mtspr 256, r2
        blr

Testcase here: CodeGen/PowerPC/vcmp-fold.ll

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

18 years agonew testcase
Chris Lattner [Fri, 31 Mar 2006 06:01:48 +0000 (06:01 +0000)]
new testcase

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

18 years agocompactify some more instruction definitions
Chris Lattner [Fri, 31 Mar 2006 05:38:32 +0000 (05:38 +0000)]
compactify some more instruction definitions

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

18 years agoCompactify comparisons.
Chris Lattner [Fri, 31 Mar 2006 05:32:57 +0000 (05:32 +0000)]
Compactify comparisons.

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

18 years agoAllow bits init values to be used in patterns, turn them into ints.
Chris Lattner [Fri, 31 Mar 2006 05:25:56 +0000 (05:25 +0000)]
Allow bits init values to be used in patterns, turn them into ints.

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

18 years agoLower vector compares to VCMP nodes, just like we lower vector comparison
Chris Lattner [Fri, 31 Mar 2006 05:13:27 +0000 (05:13 +0000)]
Lower vector compares to VCMP nodes, just like we lower vector comparison
predicates to VCMPo nodes.

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

18 years agoThese are done
Chris Lattner [Fri, 31 Mar 2006 04:53:21 +0000 (04:53 +0000)]
These are done

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

18 years agoFinal bugfix for PR724. GCC won't inline varargs functions, so use one to
Chris Lattner [Fri, 31 Mar 2006 04:48:26 +0000 (04:48 +0000)]
Final bugfix for PR724.  GCC won't inline varargs functions, so use one to
validate the prototype of intrinsic functions.  This prevents GCC from going
crazy and inlining too much stuff, eventually running out of memory.

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

18 years agoAdd a new method to verify intrinsic function prototypes.
Chris Lattner [Fri, 31 Mar 2006 04:46:47 +0000 (04:46 +0000)]
Add a new method to verify intrinsic function prototypes.

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

18 years agoWhen emitting code for the verifier, instead of emitting each case statement
Chris Lattner [Fri, 31 Mar 2006 04:24:58 +0000 (04:24 +0000)]
When emitting code for the verifier, instead of emitting each case statement
independently, batch up checks so that identically typed intrinsics share
verifier code.  This dramatically reduces the size of the verifier function,
which should help avoid GCC running out of memory compiling Verifier.cpp.

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

18 years agoMake sure to pass enough values to phi nodes when we are dealing with
Chris Lattner [Fri, 31 Mar 2006 02:12:18 +0000 (02:12 +0000)]
Make sure to pass enough values to phi nodes when we are dealing with
decimated vectors.  This fixes UnitTests/Vector/sumarray-dbl.c

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

18 years agoSignificantly improve handling of vectors that are live across basic blocks,
Chris Lattner [Fri, 31 Mar 2006 02:06:56 +0000 (02:06 +0000)]
Significantly improve handling of vectors that are live across basic blocks,
handling cases where the vector elements need promotion, expansion, and when
the vector type itself needs to be decimated.

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

18 years agoWas returning the wrong type.
Chris Lattner [Fri, 31 Mar 2006 01:50:09 +0000 (01:50 +0000)]
Was returning the wrong type.

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

18 years agoMark INSERT_VECTOR_ELT as expand
Chris Lattner [Fri, 31 Mar 2006 01:48:55 +0000 (01:48 +0000)]
Mark INSERT_VECTOR_ELT as expand

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

18 years agoExpand all INSERT_VECTOR_ELT (obviously bad) for now.
Evan Cheng [Fri, 31 Mar 2006 01:30:39 +0000 (01:30 +0000)]
Expand all INSERT_VECTOR_ELT (obviously bad) for now.

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

18 years agoExpand INSERT_VECTOR_ELT to store vec, sp; store elt, sp+k; vec = load sp;
Evan Cheng [Fri, 31 Mar 2006 01:27:51 +0000 (01:27 +0000)]
Expand INSERT_VECTOR_ELT to store vec, sp; store elt, sp+k; vec = load sp;

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

18 years agoModify the TargetLowering::getPackedTypeBreakdown method to also return the
Chris Lattner [Fri, 31 Mar 2006 00:46:36 +0000 (00:46 +0000)]
Modify the TargetLowering::getPackedTypeBreakdown method to also return the
unpromoted element type.

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

18 years agoTypo
Evan Cheng [Fri, 31 Mar 2006 00:33:57 +0000 (00:33 +0000)]
Typo

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

18 years agoOk for vector_shuffle mask to contain undef elements.
Evan Cheng [Fri, 31 Mar 2006 00:30:29 +0000 (00:30 +0000)]
Ok for vector_shuffle mask to contain undef elements.

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

18 years agoImplement TargetLowering::getPackedTypeBreakdown
Chris Lattner [Fri, 31 Mar 2006 00:28:56 +0000 (00:28 +0000)]
Implement TargetLowering::getPackedTypeBreakdown

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

18 years agoAdd a method useful for decimating vectors.
Chris Lattner [Fri, 31 Mar 2006 00:28:23 +0000 (00:28 +0000)]
Add a method useful for decimating vectors.

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

18 years agoAdd the rest of the vmul instructions and the vmulsum* instructions.
Chris Lattner [Thu, 30 Mar 2006 23:39:06 +0000 (23:39 +0000)]
Add the rest of the vmul instructions and the vmulsum* instructions.

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

18 years agofix incorrect prototypes
Chris Lattner [Thu, 30 Mar 2006 23:32:58 +0000 (23:32 +0000)]
fix incorrect prototypes

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

18 years agoUse a new tblgen feature to significantly shrinkify instruction definitions that
Chris Lattner [Thu, 30 Mar 2006 23:21:27 +0000 (23:21 +0000)]
Use a new tblgen feature to significantly shrinkify instruction definitions that
directly correspond to intrinsics.

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

18 years agoAdd a bunch of new instructions for intrinsics.
Chris Lattner [Thu, 30 Mar 2006 23:07:36 +0000 (23:07 +0000)]
Add a bunch of new instructions for intrinsics.

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

18 years agoregenerate
Chris Lattner [Thu, 30 Mar 2006 22:51:12 +0000 (22:51 +0000)]
regenerate

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

18 years agoImplement Regression/TableGen/DagDefSubst.ll
Chris Lattner [Thu, 30 Mar 2006 22:50:40 +0000 (22:50 +0000)]
Implement Regression/TableGen/DagDefSubst.ll

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

18 years agoDag operator should be able to be template params.
Chris Lattner [Thu, 30 Mar 2006 22:49:59 +0000 (22:49 +0000)]
Dag operator should be able to be template params.

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

18 years agoFix Transforms/InstCombine/2006-03-30-ExtractElement.ll
Chris Lattner [Thu, 30 Mar 2006 22:02:40 +0000 (22:02 +0000)]
Fix Transforms/InstCombine/2006-03-30-ExtractElement.ll

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

18 years agonew testcase that crashes instcombine
Chris Lattner [Thu, 30 Mar 2006 22:01:08 +0000 (22:01 +0000)]
new testcase that crashes instcombine

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

18 years agoMake sure all possible shuffles are matched.
Evan Cheng [Thu, 30 Mar 2006 19:54:57 +0000 (19:54 +0000)]
Make sure all possible shuffles are matched.
Use pshufd, pshuhw, and pshulw to shuffle v4f32 if shufps doesn't match.
Use shufps to shuffle v4f32 if pshufd, pshuhw, and pshulw don't match.

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

18 years agoAdd vector multiply, multiply sum, pack, unpack, and lvsl/lvsr intrinsics.
Chris Lattner [Thu, 30 Mar 2006 18:52:02 +0000 (18:52 +0000)]
Add vector multiply, multiply sum, pack, unpack, and lvsl/lvsr intrinsics.

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

18 years agoMore logical ops patterns
Evan Cheng [Thu, 30 Mar 2006 07:33:32 +0000 (07:33 +0000)]
More logical ops patterns

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

18 years agoAdd support for _mm_cmp{cc}_ss and _mm_cmp{cc}_ps intrinsics
Evan Cheng [Thu, 30 Mar 2006 06:21:22 +0000 (06:21 +0000)]
Add support for _mm_cmp{cc}_ss and _mm_cmp{cc}_ps intrinsics

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

18 years agoAdd 128-bit pmovmskb intrinsic support.
Evan Cheng [Thu, 30 Mar 2006 00:33:26 +0000 (00:33 +0000)]
Add 128-bit pmovmskb intrinsic support.

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

18 years agoChange SSE pack operation definitions to fit what the intrinsics expected.
Evan Cheng [Wed, 29 Mar 2006 23:53:14 +0000 (23:53 +0000)]
Change SSE pack operation definitions to fit what the intrinsics expected.
For example, packsswb actually creates a v16i8 from a pair of v8i16. But since
the intrinsic specification forces the output type to match the operands.

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

18 years agoAdd SSE2 integer pack with saturation intrinsics.
Evan Cheng [Wed, 29 Mar 2006 23:09:19 +0000 (23:09 +0000)]
Add SSE2 integer pack with saturation intrinsics.

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

18 years ago- Added some SSE2 128-bit packed integer ops.
Evan Cheng [Wed, 29 Mar 2006 23:07:14 +0000 (23:07 +0000)]
- Added some SSE2 128-bit packed integer ops.
- Added SSE2 128-bit integer pack with signed saturation ops.
- Added pshufhw and pshuflw ops.

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

18 years agoAdd a pshufhw test case.
Evan Cheng [Wed, 29 Mar 2006 22:51:28 +0000 (22:51 +0000)]
Add a pshufhw test case.

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

18 years agoNeed to special case splat after all. Make the second operand of splat
Evan Cheng [Wed, 29 Mar 2006 19:02:40 +0000 (19:02 +0000)]
Need to special case splat after all. Make the second operand of splat
vector_shuffle undef.

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

18 years agoUse unpcklpd for v2f64 splat.
Evan Cheng [Wed, 29 Mar 2006 18:59:48 +0000 (18:59 +0000)]
Use unpcklpd for v2f64 splat.

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

18 years agoFloating point logical operation patterns should match bit_convert. Or else
Evan Cheng [Wed, 29 Mar 2006 18:47:40 +0000 (18:47 +0000)]
Floating point logical operation patterns should match bit_convert. Or else
integer vector logical operations would match andp{s|d} instead of pand.

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

18 years agoAdd more SSE intrinsics
Evan Cheng [Wed, 29 Mar 2006 06:07:16 +0000 (06:07 +0000)]
Add more SSE intrinsics

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

18 years ago- More shuffle related bug fixes.
Evan Cheng [Wed, 29 Mar 2006 03:04:49 +0000 (03:04 +0000)]
- More shuffle related bug fixes.
- Whenever possible use ops of the right packed types for vector shuffles /
  splats.

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

18 years agoAnother entry about shuffles.
Evan Cheng [Wed, 29 Mar 2006 03:03:46 +0000 (03:03 +0000)]
Another entry about shuffles.

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

18 years ago- Only use pshufd for v4i32 vector shuffles.
Evan Cheng [Wed, 29 Mar 2006 01:30:51 +0000 (01:30 +0000)]
- Only use pshufd for v4i32 vector shuffles.
- Other shuffle related fixes.

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

18 years agoadd a note
Chris Lattner [Wed, 29 Mar 2006 00:24:13 +0000 (00:24 +0000)]
add a note

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

18 years agonew testcase
Chris Lattner [Wed, 29 Mar 2006 00:12:08 +0000 (00:12 +0000)]
new testcase

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

18 years agoBug fixes: handle constantexpr insert/extract element operations
Chris Lattner [Wed, 29 Mar 2006 00:11:43 +0000 (00:11 +0000)]
Bug fixes: handle constantexpr insert/extract element operations
Handle constantpacked vectors with constantexpr elements.

This fixes CodeGen/Generic/vector-constantexpr.ll

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

18 years agoAdded aliases to scalar SSE instructions, e.g. addss, to match x86 intrinsics.
Evan Cheng [Tue, 28 Mar 2006 23:51:43 +0000 (23:51 +0000)]
Added aliases to scalar SSE instructions, e.g. addss, to match x86 intrinsics.
The source operands type are v4sf with upper bits passes through.
Added matching code for these.

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

18 years agoFixing buggy code.
Evan Cheng [Tue, 28 Mar 2006 23:41:33 +0000 (23:41 +0000)]
Fixing buggy code.

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

18 years agoDon't sort the names before outputing the intrinsic name table. It causes a
Evan Cheng [Tue, 28 Mar 2006 22:25:56 +0000 (22:25 +0000)]
Don't sort the names before outputing the intrinsic name table. It causes a
mismatch against the enum table.
This is a part of Sabre's master plan to drive me nuts with subtle bugs that
happens to only affect x86 be. :-)

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

18 years agoWhen building a VVECTOR_SHUFFLE node from extract_element operations, make
Chris Lattner [Tue, 28 Mar 2006 22:19:47 +0000 (22:19 +0000)]
When building a VVECTOR_SHUFFLE node from extract_element operations, make
sure to build it as SHUFFLE(X, undef, mask), not SHUFFLE(X, X, mask).

The later is not canonical form, and prevents the PPC splat pattern from
matching.  For a particular splat, we go from generating this:

li r10, lo16(LCPI1_0)
lis r11, ha16(LCPI1_0)
lvx v3, r11, r10
vperm v3, v2, v2, v3

to generating:

vspltw v3, v2, 3

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

18 years agoCanonicalize VECTOR_SHUFFLE(X, X, Y) -> VECTOR_SHUFFLE(X,undef,Y')
Chris Lattner [Tue, 28 Mar 2006 22:11:53 +0000 (22:11 +0000)]
Canonicalize VECTOR_SHUFFLE(X, X, Y) -> VECTOR_SHUFFLE(X,undef,Y')

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

18 years agonew testcase
Chris Lattner [Tue, 28 Mar 2006 20:32:12 +0000 (20:32 +0000)]
new testcase

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

18 years agoTurn a series of extract_element's feeding a build_vector into a
Chris Lattner [Tue, 28 Mar 2006 20:28:38 +0000 (20:28 +0000)]
Turn a series of extract_element's feeding a build_vector into a
vector_shuffle node.  For this:

void test(__m128 *res, __m128 *A, __m128 *B) {
  *res = _mm_unpacklo_ps(*A, *B);
}

we now produce this code:

_test:
        movl 8(%esp), %eax
        movaps (%eax), %xmm0
        movl 12(%esp), %eax
        unpcklps (%eax), %xmm0
        movl 4(%esp), %eax
        movaps %xmm0, (%eax)
        ret

instead of this:

_test:
        subl $76, %esp
        movl 88(%esp), %eax
        movaps (%eax), %xmm0
        movaps %xmm0, (%esp)
        movaps %xmm0, 32(%esp)
        movss 4(%esp), %xmm0
        movss 32(%esp), %xmm1
        unpcklps %xmm0, %xmm1
        movl 84(%esp), %eax
        movaps (%eax), %xmm0
        movaps %xmm0, 16(%esp)
        movaps %xmm0, 48(%esp)
        movss 20(%esp), %xmm0
        movss 48(%esp), %xmm2
        unpcklps %xmm0, %xmm2
        unpcklps %xmm1, %xmm2
        movl 80(%esp), %eax
        movaps %xmm2, (%eax)
        addl $76, %esp
        ret

GCC produces this (with -fomit-frame-pointer):

_test:
        subl    $12, %esp
        movl    20(%esp), %eax
        movaps  (%eax), %xmm0
        movl    24(%esp), %eax
        unpcklps        (%eax), %xmm0
        movl    16(%esp), %eax
        movaps  %xmm0, (%eax)
        addl    $12, %esp
        ret

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

18 years agoTeach Legalize how to pack VVECTOR_SHUFFLE nodes into VECTOR_SHUFFLE nodes.
Chris Lattner [Tue, 28 Mar 2006 20:24:43 +0000 (20:24 +0000)]
Teach Legalize how to pack VVECTOR_SHUFFLE nodes into VECTOR_SHUFFLE nodes.

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

18 years agonew node
Chris Lattner [Tue, 28 Mar 2006 19:54:42 +0000 (19:54 +0000)]
new node

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

18 years agoAdd a new node
Chris Lattner [Tue, 28 Mar 2006 19:54:11 +0000 (19:54 +0000)]
Add a new node

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

18 years agoDon't crash on X^X if X is a vector. Instead, produce a vector of zeros.
Chris Lattner [Tue, 28 Mar 2006 19:11:05 +0000 (19:11 +0000)]
Don't crash on X^X if X is a vector.  Instead, produce a vector of zeros.

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

18 years agoAdd an assertion
Chris Lattner [Tue, 28 Mar 2006 19:04:49 +0000 (19:04 +0000)]
Add an assertion

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

18 years agoadd a note
Chris Lattner [Tue, 28 Mar 2006 18:56:23 +0000 (18:56 +0000)]
add a note

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

18 years agoRefactor address attributes. Add base register to frame info.
Jim Laskey [Tue, 28 Mar 2006 14:58:32 +0000 (14:58 +0000)]
Refactor address attributes.  Add base register to frame info.

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

18 years agoExpose base register for DwarfWriter. Refactor code accordingly.
Jim Laskey [Tue, 28 Mar 2006 13:48:33 +0000 (13:48 +0000)]
Expose base register for DwarfWriter.  Refactor code accordingly.

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

18 years agoMore bulletproofing of llvm.dbg.declare.
Jim Laskey [Tue, 28 Mar 2006 13:45:20 +0000 (13:45 +0000)]
More bulletproofing of llvm.dbg.declare.

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

18 years agoAdded missing paren on behalf of Ramana Radhakrishnan.
Jim Laskey [Tue, 28 Mar 2006 10:17:11 +0000 (10:17 +0000)]
Added missing paren on behalf of Ramana Radhakrishnan.

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

18 years agoMissed X86::isUNPCKHMask
Evan Cheng [Tue, 28 Mar 2006 08:27:15 +0000 (08:27 +0000)]
Missed X86::isUNPCKHMask

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

18 years agomovlps and movlpd should be modeled as two address code.
Evan Cheng [Tue, 28 Mar 2006 07:01:28 +0000 (07:01 +0000)]
movlps and movlpd should be modeled as two address code.

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

18 years agoUpdate
Evan Cheng [Tue, 28 Mar 2006 06:55:45 +0000 (06:55 +0000)]
Update

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

18 years agoTypo
Evan Cheng [Tue, 28 Mar 2006 06:53:49 +0000 (06:53 +0000)]
Typo

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

18 years ago* Prefer using operation of matching types. e.g unpcklpd rather than movlhps.
Evan Cheng [Tue, 28 Mar 2006 06:50:32 +0000 (06:50 +0000)]
* Prefer using operation of matching types. e.g unpcklpd rather than movlhps.
* Bug fixes.

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

18 years agoUse movhpd is even better than movlhps.
Evan Cheng [Tue, 28 Mar 2006 06:40:57 +0000 (06:40 +0000)]
Use movhpd is even better than movlhps.

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

18 years agoFix a couple typos
Nate Begeman [Tue, 28 Mar 2006 04:18:18 +0000 (04:18 +0000)]
Fix a couple typos

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

18 years agoAdd a few more altivec intrinsics
Nate Begeman [Tue, 28 Mar 2006 04:15:58 +0000 (04:15 +0000)]
Add a few more altivec intrinsics

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

18 years agoKeep Visual Studio informed.
Jeff Cohen [Tue, 28 Mar 2006 04:01:27 +0000 (04:01 +0000)]
Keep Visual Studio informed.

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

18 years agoThese don't directly map to gcc intrinsics any more.
Chris Lattner [Tue, 28 Mar 2006 03:52:36 +0000 (03:52 +0000)]
These don't directly map to gcc intrinsics any more.

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

18 years agoAdded a couple of entries about movhps and movlhps.
Evan Cheng [Tue, 28 Mar 2006 02:49:12 +0000 (02:49 +0000)]
Added a couple of entries about movhps and movlhps.

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

18 years agoAll unpack cases are now being handled.
Evan Cheng [Tue, 28 Mar 2006 02:44:05 +0000 (02:44 +0000)]
All unpack cases are now being handled.

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

18 years ago- Clean up / consoladate various shuffle masks.
Evan Cheng [Tue, 28 Mar 2006 02:43:26 +0000 (02:43 +0000)]
- Clean up / consoladate various shuffle masks.
- Some misc. bug fixes.
- Use MOVHPDrm to load from m64 to upper half of a XMM register.

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