summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/vec_insert-9.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-28 17:28:30 +0000
committerChris Lattner <sabre@nondot.org>2010-08-28 17:28:30 +0000
commitbcb6090ad0660f018a8365248d5467047f423e39 (patch)
treeac26658d9c885ac6a7d338e481a8b2e9615e4455 /llvm/test/CodeGen/X86/vec_insert-9.ll
parent96db6e66f43fd999a58dd288c7e0bd77c9868359 (diff)
downloadbcm5719-llvm-bcb6090ad0660f018a8365248d5467047f423e39.tar.gz
bcm5719-llvm-bcb6090ad0660f018a8365248d5467047f423e39.zip
fix the BuildVector -> unpcklps logic to not do pointless shuffles
when the top elements of a vector are undefined. This happens all the time for X86-64 ABI stuff because only the low 2 elements of a 4 element vector are defined. For example, on: _Complex float f32(_Complex float A, _Complex float B) { return A+B; } We used to produce (with SSE2, SSE4.1+ uses insertps): _f32: ## @f32 movdqa %xmm0, %xmm2 addss %xmm1, %xmm2 pshufd $16, %xmm2, %xmm2 pshufd $1, %xmm1, %xmm1 pshufd $1, %xmm0, %xmm0 addss %xmm1, %xmm0 pshufd $16, %xmm0, %xmm1 movdqa %xmm2, %xmm0 unpcklps %xmm1, %xmm0 ret We now produce: _f32: ## @f32 movdqa %xmm0, %xmm2 addss %xmm1, %xmm2 pshufd $1, %xmm1, %xmm1 pshufd $1, %xmm0, %xmm3 addss %xmm1, %xmm3 movaps %xmm2, %xmm0 unpcklps %xmm3, %xmm0 ret This implements rdar://8368414 llvm-svn: 112378
Diffstat (limited to 'llvm/test/CodeGen/X86/vec_insert-9.ll')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud