diff options
author | Craig Topper <craig.topper@gmail.com> | 2011-12-06 04:59:07 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2011-12-06 04:59:07 +0000 |
commit | 1ff73d7a67e4a5bc464523cd1dd7ed3f20baf85b (patch) | |
tree | 4fbfe9dc07424e53ca66d4a9447173af6fc7ba56 /test/CodeGen/X86 | |
parent | df33e0d05e6b7dc3d65cdb96e52fb6fb6b07f876 (diff) | |
download | llvm-1ff73d7a67e4a5bc464523cd1dd7ed3f20baf85b.tar.gz llvm-1ff73d7a67e4a5bc464523cd1dd7ed3f20baf85b.tar.bz2 llvm-1ff73d7a67e4a5bc464523cd1dd7ed3f20baf85b.tar.xz |
Merge isSHUFPMask and isCommutedSHUFPMask into single function that can do both. Do the same for the 256-bit version. Use loops to reduce size of isVSHUFPYMask. Fix test cases that were incorrectly passing due to isCommutedSHUFPMask not checking for the vector being 128-bit. This caused some 256-bit shuffles to be incorrectly commuted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r-- | test/CodeGen/X86/avx-vperm2f128.ll | 9 | ||||
-rw-r--r-- | test/CodeGen/X86/avx2-vperm2i128.ll | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/test/CodeGen/X86/avx-vperm2f128.ll b/test/CodeGen/X86/avx-vperm2f128.ll index 3550a90823..caa21e5bac 100644 --- a/test/CodeGen/X86/avx-vperm2f128.ll +++ b/test/CodeGen/X86/avx-vperm2f128.ll @@ -1,5 +1,6 @@ ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s +; CHECK: _A ; CHECK: vperm2f128 $1 define <8 x float> @A(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp { entry: @@ -7,6 +8,7 @@ entry: ret <8 x float> %shuffle } +; CHECK: _B ; CHECK: vperm2f128 $48 define <8 x float> @B(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp { entry: @@ -14,6 +16,7 @@ entry: ret <8 x float> %shuffle } +; CHECK: _C ; CHECK: vperm2f128 $0 define <8 x float> @C(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp { entry: @@ -21,6 +24,7 @@ entry: ret <8 x float> %shuffle } +; CHECK: _D ; CHECK: vperm2f128 $17 define <8 x float> @D(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp { entry: @@ -28,6 +32,7 @@ entry: ret <8 x float> %shuffle } +; CHECK: _E ; CHECK: vperm2f128 $17 define <32 x i8> @E(<32 x i8> %a, <32 x i8> %b) nounwind uwtable readnone ssp { entry: @@ -35,7 +40,8 @@ entry: ret <32 x i8> %shuffle } -; CHECK: vperm2f128 $33 +; CHECK: _E2 +; CHECK: vperm2f128 $3 define <4 x i64> @E2(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp { entry: %shuffle = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> <i32 6, i32 7, i32 0, i32 1> @@ -44,6 +50,7 @@ entry: ;;;; Cases with undef indicies mixed in the mask +; CHECK: _F ; CHECK: vperm2f128 $33 define <8 x float> @F(<8 x float> %a, <8 x float> %b) nounwind uwtable readnone ssp { entry: diff --git a/test/CodeGen/X86/avx2-vperm2i128.ll b/test/CodeGen/X86/avx2-vperm2i128.ll index 6fcd2d7c1b..1937db5d7c 100644 --- a/test/CodeGen/X86/avx2-vperm2i128.ll +++ b/test/CodeGen/X86/avx2-vperm2i128.ll @@ -9,7 +9,7 @@ entry: ret <32 x i8> %shuffle } -; CHECK: vperm2i128 $33 +; CHECK: vperm2i128 $3 define <4 x i64> @E2(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp { entry: ; add forces execution domain |