diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-09 01:11:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-09 01:11:16 +0000 |
commit | 599ded1a7f00365cffc2d3143759a9d621550eee (patch) | |
tree | 32a5a818b00b2546960b2561546bee70a373f765 /lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 2d87734a8ffad5933edbbc15a3b643df1e8a767e (diff) |
Eliminate useless insertelement instructions. This implements
Transforms/InstCombine/vec_insertelt.ll and fixes PR1286.
We now compile the code from that bug into:
_foo:
movl 4(%esp), %eax
movdqa (%eax), %xmm0
movl 8(%esp), %ecx
psllw (%ecx), %xmm0
movdqa %xmm0, (%eax)
ret
instead of:
_foo:
subl $4, %esp
movl %ebp, (%esp)
movl %esp, %ebp
movl 12(%ebp), %eax
movdqa (%eax), %xmm0
#IMPLICIT_DEF %eax
pinsrw $2, %eax, %xmm0
xorl %ecx, %ecx
pinsrw $3, %ecx, %xmm0
pinsrw $4, %eax, %xmm0
pinsrw $5, %ecx, %xmm0
pinsrw $6, %eax, %xmm0
pinsrw $7, %ecx, %xmm0
movl 8(%ebp), %eax
movdqa (%eax), %xmm1
psllw %xmm0, %xmm1
movdqa %xmm1, (%eax)
movl %ebp, %esp
popl %ebp
ret
woo :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
0 files changed, 0 insertions, 0 deletions