[LLVMbugs] [Bug 1286] insertelement of undef generates horrible code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Apr 8 18:12:56 PDT 2007


sabre at nondot.org changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
          Component|Backend: X86                |Scalar Optimizations
           Keywords|                            |code-quality
         Resolution|                            |FIXED
            Summary|This SSE Code is Horrid!    |insertelement of undef
                   |                            |generates horrible code
   Target Milestone|---                         |2.0

------- Additional Comments From sabre at nondot.org  2007-04-08 20:12 -------
Fixed, patch here:

Testcase here: Transforms/InstCombine/vec_insertelt.ll

We now compile this to:

        movl 4(%esp), %eax
        movdqa (%eax), %xmm0
        movl 8(%esp), %ecx
        psllw (%ecx), %xmm0
        movdqa %xmm0, (%eax)

GCC manages:

        subl    $12, %esp
        movl    16(%esp), %edx
        movl    20(%esp), %eax
        movdqa  (%eax), %xmm0
        movdqa  (%edx), %xmm1
        psllw   %xmm0, %xmm1
        movdqa  %xmm1, (%edx)
        addl    $12, %esp


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list