[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
http://llvm.org/bugs/show_bug.cgi?id=1286
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:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070402/047039.html
Testcase here: Transforms/InstCombine/vec_insertelt.ll
We now compile this to:
_foo:
movl 4(%esp), %eax
movdqa (%eax), %xmm0
movl 8(%esp), %ecx
psllw (%ecx), %xmm0
movdqa %xmm0, (%eax)
ret
GCC manages:
_foo:
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
ret
-Chris
------- 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