aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-28 01:50:57 +0000
committerChris Lattner <sabre@nondot.org>2010-08-28 01:50:57 +0000
commitd0214f3efe5c043b94207bdcf8b6f0bbb7a8f11b (patch)
treec97df6795788a36ecb55653444aa19c9176623d4 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent3bd97fec8f6923892c79e8073576d36d3cc67a3d (diff)
downloadllvm-d0214f3efe5c043b94207bdcf8b6f0bbb7a8f11b.zip
llvm-d0214f3efe5c043b94207bdcf8b6f0bbb7a8f11b.tar.gz
llvm-d0214f3efe5c043b94207bdcf8b6f0bbb7a8f11b.tar.bz2
handle the constant case of vector insertion. For something
like this: struct S { float A, B, C, D; }; struct S g; struct S bar() { struct S A = g; ++A.B; A.A = 42; return A; } we now generate: _bar: ## @bar ## BB#0: ## %entry movq _g@GOTPCREL(%rip), %rax movss 12(%rax), %xmm0 pshufd $16, %xmm0, %xmm0 movss 4(%rax), %xmm2 movss 8(%rax), %xmm1 pshufd $16, %xmm1, %xmm1 unpcklps %xmm0, %xmm1 addss LCPI1_0(%rip), %xmm2 pshufd $16, %xmm2, %xmm2 movss LCPI1_1(%rip), %xmm0 pshufd $16, %xmm0, %xmm0 unpcklps %xmm2, %xmm0 ret instead of: _bar: ## @bar ## BB#0: ## %entry movq _g@GOTPCREL(%rip), %rax movss 12(%rax), %xmm0 pshufd $16, %xmm0, %xmm0 movss 4(%rax), %xmm2 movss 8(%rax), %xmm1 pshufd $16, %xmm1, %xmm1 unpcklps %xmm0, %xmm1 addss LCPI1_0(%rip), %xmm2 movd %xmm2, %eax shlq $32, %rax addq $1109917696, %rax ## imm = 0x42280000 movd %rax, %xmm0 ret llvm-svn: 112345
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions