summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/2012-01-18-vbitcast.ll
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2015-01-23 22:44:16 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2015-01-23 22:44:16 +0000
commit56567f9135051d63f18635132a4b45a57a19957e (patch)
treefd36ebfbe5028822101a063097857895cc473c82 /llvm/test/CodeGen/X86/2012-01-18-vbitcast.ll
parent011c7425355edc56ca13d968b0fe2cea72f3ad53 (diff)
downloadbcm5719-llvm-56567f9135051d63f18635132a4b45a57a19957e.tar.gz
bcm5719-llvm-56567f9135051d63f18635132a4b45a57a19957e.zip
[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector
Handle the poor codegen for i64/x86xmm->v2i64 (%mm -> %xmm) moves. Instead of using stack store/load pair to do the job, use scalar_to_vector directly, which in the MMX case can use movq2dq. This was the current behavior prior to improvements for vector legalization of extloads in r213897. This commit fixes the regression and as a side-effect also remove some unnecessary shuffles. In the new attached testcase, we go from: pshufw $-18, (%rdi), %mm0 movq %mm0, -8(%rsp) movq -8(%rsp), %xmm0 pshufd $-44, %xmm0, %xmm0 movd %xmm0, %eax ... To: pshufw $-18, (%rdi), %mm0 movq2dq %mm0, %xmm0 movd %xmm0, %eax ... Differential Revision: http://reviews.llvm.org/D7126 rdar://problem/19413324 llvm-svn: 226953
Diffstat (limited to 'llvm/test/CodeGen/X86/2012-01-18-vbitcast.ll')
-rw-r--r--llvm/test/CodeGen/X86/2012-01-18-vbitcast.ll11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/X86/2012-01-18-vbitcast.ll b/llvm/test/CodeGen/X86/2012-01-18-vbitcast.ll
index 9eb59e41ef7..efba66be97e 100644
--- a/llvm/test/CodeGen/X86/2012-01-18-vbitcast.ll
+++ b/llvm/test/CodeGen/X86/2012-01-18-vbitcast.ll
@@ -1,14 +1,15 @@
; RUN: llc < %s -march=x86-64 -mcpu=corei7 -mtriple=x86_64-pc-win32 | FileCheck %s
-;CHECK-LABEL: vcast:
+; CHECK-LABEL: vcast:
define <2 x i32> @vcast(<2 x float> %a, <2 x float> %b) {
-;CHECK: pmovzxdq
-;CHECK: pmovzxdq
+; CHECK-NOT: pmovzxdq
+; CHECK-NOT: pmovzxdq
+; CHECK: movdqa (%{{.*}}), %[[R0:xmm[0-9]+]]
%af = bitcast <2 x float> %a to <2 x i32>
%bf = bitcast <2 x float> %b to <2 x i32>
+; CHECK-NEXT: psubq (%{{.*}}), %[[R0]]
%x = sub <2 x i32> %af, %bf
-;CHECK: psubq
+; CHECK: ret
ret <2 x i32> %x
-;CHECK: ret
}
OpenPOWER on IntegriCloud