diff options
Diffstat (limited to 'test/CodeGen/X86/avx2-shuffle.ll')
-rw-r--r-- | test/CodeGen/X86/avx2-shuffle.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx2-shuffle.ll b/test/CodeGen/X86/avx2-shuffle.ll index 0e6dd29..185b989 100644 --- a/test/CodeGen/X86/avx2-shuffle.ll +++ b/test/CodeGen/X86/avx2-shuffle.ll @@ -60,6 +60,24 @@ define <4 x i64> @blend_test4(<4 x i64> %a, <4 x i64> %b) nounwind alwaysinline ret <4 x i64> %t } +;; 2 tests for shufflevectors that optimize to blend + immediate +; CHECK-LABEL: @blend_test5 +; CHECK: vpblendd $10, %xmm1, %xmm0, %xmm0 +; CHECK: ret +define <4 x i32> @blend_test5(<4 x i32> %a, <4 x i32> %b) { + %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 5, i32 2, i32 7> + ret <4 x i32> %1 +} + +; CHECK-LABEL: @blend_test6 +; CHECK: vpblendw $134, %ymm1, %ymm0, %ymm0 +; CHECK: ret +define <16 x i16> @blend_test6(<16 x i16> %a, <16 x i16> %b) { + %1 = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> <i32 0, i32 17, i32 18, i32 3, i32 4, i32 5, i32 6, i32 23, + i32 8, i32 25, i32 26, i32 11, i32 12, i32 13, i32 14, i32 31> + ret <16 x i16> %1 +} + ; CHECK: vpshufhw $27, %ymm define <16 x i16> @vpshufhw(<16 x i16> %src1) nounwind uwtable readnone ssp { entry: |