summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMBaseRegisterInfo.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-26 21:55:42 +0000
committerChris Lattner <sabre@nondot.org>2010-08-26 21:55:42 +0000
commite5a1426174986951a20ec6ffd119b77a24a65706 (patch)
tree99c5869da3d33eace7a8e473ac7333819a0aa805 /lib/Target/ARM/ARMBaseRegisterInfo.h
parenta6140a14444da1aa104f6ab7c40c5c920552f474 (diff)
downloadllvm-e5a1426174986951a20ec6ffd119b77a24a65706.tar.gz
llvm-e5a1426174986951a20ec6ffd119b77a24a65706.tar.bz2
llvm-e5a1426174986951a20ec6ffd119b77a24a65706.tar.xz
optimize bitcast(trunc(bitcast(x))) where the result is a float and 'x'
is a vector to be a vector element extraction. This allows clang to compile: struct S { float A, B, C, D; }; float foo(struct S A) { return A.A + A.B+A.C+A.D; } into: _foo: ## @foo ## BB#0: ## %entry movd %xmm0, %rax shrq $32, %rax movd %eax, %xmm2 addss %xmm0, %xmm2 movapd %xmm1, %xmm3 addss %xmm2, %xmm3 movd %xmm1, %rax shrq $32, %rax movd %eax, %xmm0 addss %xmm3, %xmm0 ret instead of: _foo: ## @foo ## BB#0: ## %entry movd %xmm0, %rax movd %eax, %xmm0 shrq $32, %rax movd %eax, %xmm2 addss %xmm0, %xmm2 movd %xmm1, %rax movd %eax, %xmm1 addss %xmm2, %xmm1 shrq $32, %rax movd %eax, %xmm0 addss %xmm1, %xmm0 ret ... eliminating half of the horribleness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMBaseRegisterInfo.h')
0 files changed, 0 insertions, 0 deletions