diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-07-22 18:56:05 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-07-22 18:56:05 +0000 |
commit | 23e31011fb1a87715d57b0b8d18d893c9374b134 (patch) | |
tree | 861ee492337fc153121c38d69875131763f00039 /test/CodeGen/X86/vec_shuffle-38.ll | |
parent | 6e5fda213fc94e7c3440b9613602b08b8f84e52a (diff) | |
download | llvm-23e31011fb1a87715d57b0b8d18d893c9374b134.tar.gz llvm-23e31011fb1a87715d57b0b8d18d893c9374b134.tar.bz2 llvm-23e31011fb1a87715d57b0b8d18d893c9374b134.tar.xz |
Turn shuffles into unpacks for VT == MVT::v2i64 and MVT::v2f64
too. Patch by Jeff Muizelaar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_shuffle-38.ll')
-rw-r--r-- | test/CodeGen/X86/vec_shuffle-38.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_shuffle-38.ll b/test/CodeGen/X86/vec_shuffle-38.ll new file mode 100644 index 0000000000..fe83cd44ea --- /dev/null +++ b/test/CodeGen/X86/vec_shuffle-38.ll @@ -0,0 +1,26 @@ +; RUN: llc < %s -march=x86-64 | FileCheck %s + +define <2 x double> @ld(<2 x double> %p) nounwind optsize ssp { +; CHECK: unpcklpd + %shuffle = shufflevector <2 x double> %p, <2 x double> undef, <2 x i32> zeroinitializer + ret <2 x double> %shuffle +} + +define <2 x double> @hd(<2 x double> %p) nounwind optsize ssp { +; CHECK: unpckhpd + %shuffle = shufflevector <2 x double> %p, <2 x double> undef, <2 x i32> <i32 1, i32 1> + ret <2 x double> %shuffle +} + +define <2 x i64> @ldi(<2 x i64> %p) nounwind optsize ssp { +; CHECK: punpcklqdq + %shuffle = shufflevector <2 x i64> %p, <2 x i64> undef, <2 x i32> zeroinitializer + ret <2 x i64> %shuffle +} + +define <2 x i64> @hdi(<2 x i64> %p) nounwind optsize ssp { +; CHECK: punpckhqdq + %shuffle = shufflevector <2 x i64> %p, <2 x i64> undef, <2 x i32> <i32 1, i32 1> + ret <2 x i64> %shuffle +} + |