summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-07-05 09:54:53 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-07-05 09:54:53 +0000
commit97e6afec2aaaf3e7e2ddebcaf4330acc4c75d518 (patch)
treeb91bfb9a8aae7669ff24301158bc196e5b79babb /llvm/test/CodeGen
parent0bebf9594440424ee722b78ca45e97907c4c353b (diff)
downloadbcm5719-llvm-97e6afec2aaaf3e7e2ddebcaf4330acc4c75d518.tar.gz
bcm5719-llvm-97e6afec2aaaf3e7e2ddebcaf4330acc4c75d518.zip
[X86][SSE] Add extra v16i16 shl x,c -> pmullw test
We want to compare shifts with repeated vs non-repeated v8i16 shuffle masks (for PBLENDW ymm) llvm-svn: 336333
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/lower-vec-shift.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/lower-vec-shift.ll b/llvm/test/CodeGen/X86/lower-vec-shift.ll
index 13953b914d0..0b573d7a8b8 100644
--- a/llvm/test/CodeGen/X86/lower-vec-shift.ll
+++ b/llvm/test/CodeGen/X86/lower-vec-shift.ll
@@ -255,6 +255,8 @@ define <8 x i32> @test10(<8 x i32>* %a) {
ret <8 x i32> %ashr
}
+; test11 vs test12 - show difference between v16i16 that is repeated/non-repeated at v8i16 level (for PBLENDW masks).
+
define <16 x i16> @test11(<16 x i16> %a) {
; SSE-LABEL: test11:
; SSE: # %bb.0:
@@ -277,3 +279,28 @@ define <16 x i16> @test11(<16 x i16> %a) {
%lshr = shl <16 x i16> %a, <i16 1, i16 3, i16 1, i16 1, i16 1, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 1, i16 1, i16 1, i16 3, i16 1>
ret <16 x i16> %lshr
}
+
+define <16 x i16> @test12(<16 x i16> %a) {
+; SSE-LABEL: test12:
+; SSE: # %bb.0:
+; SSE-NEXT: movdqa {{.*#+}} xmm2 = [2,8,2,2,2,8,8,8]
+; SSE-NEXT: pmullw %xmm2, %xmm0
+; SSE-NEXT: pmullw %xmm2, %xmm1
+; SSE-NEXT: retq
+;
+; AVX1-LABEL: test12:
+; AVX1: # %bb.0:
+; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
+; AVX1-NEXT: vmovdqa {{.*#+}} xmm2 = [2,8,2,2,2,8,8,8]
+; AVX1-NEXT: vpmullw %xmm2, %xmm1, %xmm1
+; AVX1-NEXT: vpmullw %xmm2, %xmm0, %xmm0
+; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: test12:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpmullw {{.*}}(%rip), %ymm0, %ymm0
+; AVX2-NEXT: retq
+ %lshr = shl <16 x i16> %a, <i16 1, i16 3, i16 1, i16 1, i16 1, i16 3, i16 3, i16 3, i16 1, i16 3, i16 1, i16 1, i16 1, i16 3, i16 3, i16 3>
+ ret <16 x i16> %lshr
+}
OpenPOWER on IntegriCloud