aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-07-27 00:56:34 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-07-27 00:56:34 +0000
commitcea34e41fa3bde8a7271c725abc6bb79c31377c9 (patch)
tree8f5f96c85a01817d810253ccd1f2c276c47bbc2b /test/CodeGen/X86
parentcd9e5aed53987b70fa19396424b913f2e9d50f60 (diff)
downloadexternal_llvm-cea34e41fa3bde8a7271c725abc6bb79c31377c9.zip
external_llvm-cea34e41fa3bde8a7271c725abc6bb79c31377c9.tar.gz
external_llvm-cea34e41fa3bde8a7271c725abc6bb79c31377c9.tar.bz2
The vpermilps and vpermilpd have different behaviour regarding the
usage of the shuffle bitmask. Both work in 128-bit lanes without crossing, but in the former the mask of the high part is the same used by the low part while in the later both lanes have independent masks. Handle this properly and and add support for vpermilpd. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r--test/CodeGen/X86/avx-vpermil.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-vpermil.ll b/test/CodeGen/X86/avx-vpermil.ll
new file mode 100644
index 0000000..d57c173
--- /dev/null
+++ b/test/CodeGen/X86/avx-vpermil.ll
@@ -0,0 +1,16 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
+
+; CHECK: vpermilps
+define <8 x float> @funcA(<8 x float> %a) nounwind uwtable readnone ssp {
+entry:
+ %shuffle = shufflevector <8 x float> %a, <8 x float> undef, <8 x i32> <i32 1, i32 2, i32 3, i32 1, i32 5, i32 6, i32 7, i32 5>
+ ret <8 x float> %shuffle
+}
+
+; CHECK: vpermilpd
+define <4 x double> @funcB(<4 x double> %a) nounwind uwtable readnone ssp {
+entry:
+ %shuffle = shufflevector <4 x double> %a, <4 x double> undef, <4 x i32> <i32 1, i32 0, i32 3, i32 3>
+ ret <4 x double> %shuffle
+}
+