llvm-6502/lib/CodeGen/SelectionDAG
Chris Lattner d7648c8934 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
2006-03-28 20:28:38 +00:00
..
DAGCombiner.cpp Turn a series of extract_element's feeding a build_vector into a 2006-03-28 20:28:38 +00:00
LegalizeDAG.cpp Teach Legalize how to pack VVECTOR_SHUFFLE nodes into VECTOR_SHUFFLE nodes. 2006-03-28 20:24:43 +00:00
Makefile
ScheduleDAG.cpp fix spello 2006-03-24 07:15:07 +00:00
ScheduleDAGList.cpp Don't advance the hazard recognizer when there are no hazards and no instructions 2006-03-12 09:01:41 +00:00
ScheduleDAGSimple.cpp Move simple-selector-specific types to the simple selector. 2006-03-10 07:51:18 +00:00
SelectionDAG.cpp new node 2006-03-28 19:54:42 +00:00
SelectionDAGISel.cpp More bulletproofing of llvm.dbg.declare. 2006-03-28 13:45:20 +00:00
SelectionDAGPrinter.cpp print arbitrary constant pool entries 2006-03-05 09:38:03 +00:00
TargetLowering.cpp Typo 2006-03-23 23:24:51 +00:00