diff options
author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2012-09-06 12:42:01 +0000 |
---|---|---|
committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2012-09-06 12:42:01 +0000 |
commit | 4178946afba97a9a432a33ab1596f49a1ac090e7 (patch) | |
tree | aab1b714f0321df354847bb7780230d4cddd5fd8 /test | |
parent | e757640df0615510dbc42921cf6271aa76c405ee (diff) | |
download | llvm-4178946afba97a9a432a33ab1596f49a1ac090e7.tar.gz llvm-4178946afba97a9a432a33ab1596f49a1ac090e7.tar.bz2 llvm-4178946afba97a9a432a33ab1596f49a1ac090e7.tar.xz |
AVX2 optimization.
Added generation of VPSHUB instruction for <32 x i8> vector shuffle when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/avx2-shuffle.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx2-shuffle.ll b/test/CodeGen/X86/avx2-shuffle.ll index c5899fa274..8af9373e50 100644 --- a/test/CodeGen/X86/avx2-shuffle.ll +++ b/test/CodeGen/X86/avx2-shuffle.ll @@ -26,3 +26,14 @@ entry: %shuffle.i = shufflevector <16 x i16> %src1, <16 x i16> %src1, <16 x i32> <i32 3, i32 undef, i32 1, i32 0, i32 4, i32 5, i32 6, i32 7, i32 11, i32 10, i32 9, i32 8, i32 12, i32 13, i32 14, i32 15> ret <16 x i16> %shuffle.i } + +; CHECK: vpshufb_test +; CHECK; vpshufb {{.*\(%r.*}}, %ymm +; CHECK: ret +define <32 x i8> @vpshufb_test(<32 x i8> %a) nounwind { + %S = shufflevector <32 x i8> %a, <32 x i8> undef, <32 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15, + i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15, + i32 18, i32 19, i32 30, i32 16, i32 25, i32 23, i32 17, i32 25, + i32 20, i32 19, i32 31, i32 17, i32 23, i32 undef, i32 29, i32 18> + ret <32 x i8>%S +}
\ No newline at end of file |