summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-09 01:11:16 +0000
committerChris Lattner <sabre@nondot.org>2007-04-09 01:11:16 +0000
commit4ca9cbb170781b920b080d1f886ab01c0bec574f (patch)
treea40eaa44e001211165d7baccaf611b79b5f7f758 /llvm/lib/CodeGen
parent418bf4eb1c4970b348e55fd1e332367f47f37a1a (diff)
downloadbcm5719-llvm-4ca9cbb170781b920b080d1f886ab01c0bec574f.tar.gz
bcm5719-llvm-4ca9cbb170781b920b080d1f886ab01c0bec574f.zip
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 :) llvm-svn: 35788
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud