diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-09-09 18:48:34 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-09-09 18:48:34 +0000 |
commit | ae4f7421c0a6ba7fdf5dc6ad8d4c1c61ba6d98c3 (patch) | |
tree | 23e99e9e9c21063eaec6dac4cf172bec4ddf76c8 | |
parent | c8ddbdabb697b20b948c1a56af6062f26691532a (diff) | |
download | external_llvm-ae4f7421c0a6ba7fdf5dc6ad8d4c1c61ba6d98c3.zip external_llvm-ae4f7421c0a6ba7fdf5dc6ad8d4c1c61ba6d98c3.tar.gz external_llvm-ae4f7421c0a6ba7fdf5dc6ad8d4c1c61ba6d98c3.tar.bz2 |
Add one more pattern to fallback movddup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113522 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86InstrSSE.td | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/vec_shuffle-37.ll | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index 88b6022..eed685d 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -5688,6 +5688,8 @@ def : Pat<(v2i64 (X86Movddup VR128:$src)), (MOVLHPSrr VR128:$src, VR128:$src)>; def : Pat<(v4f32 (X86Movddup VR128:$src)), (MOVLHPSrr VR128:$src, VR128:$src)>; +def : Pat<(v2f64 (X86Movddup VR128:$src)), + (UNPCKLPDrr VR128:$src, VR128:$src)>; // Shuffle with MOVLHPD def : Pat<(v2f64 (X86Movlhpd VR128:$src1, diff --git a/test/CodeGen/X86/vec_shuffle-37.ll b/test/CodeGen/X86/vec_shuffle-37.ll index 1ed858d..b090930 100644 --- a/test/CodeGen/X86/vec_shuffle-37.ll +++ b/test/CodeGen/X86/vec_shuffle-37.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s -march=x86-64 | FileCheck %s +; RUN: llc -O0 < %s -march=x86 -mcpu=core2 | FileCheck %s --check-prefix=CHECK_O0 define <4 x i32> @t00(<4 x i32>* %a0) nounwind ssp { entry: @@ -12,3 +13,12 @@ entry: ret <4 x i32> %2 } +define void @t01(double* %a0) nounwind ssp { +entry: +; CHECK_O0: movsd (%eax), %xmm0 +; CHECK_O0: unpcklpd %xmm0, %xmm0 + %tmp93 = load double* %a0, align 8 + %vecinit94 = insertelement <2 x double> undef, double %tmp93, i32 1 + store <2 x double> %vecinit94, <2 x double>* undef + ret void +} |