forked from OSchip/llvm-project
2622 lines
143 KiB
LLVM
2622 lines
143 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512f,+avx512vl %s -o - | FileCheck %s
|
|
|
|
define <4 x float> @test_4xfloat_unpack_low_mask0(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_low_mask0(<4 x float> %vec1, <4 x float> %vec2, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $12, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm2 {%k1} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 1>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_low_mask0(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $12, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 {%k1} {z} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 1>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_low_mask1(<4 x float> %vec1, <4 x float> %vec2, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm2 {%k1} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_low_mask1(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 {%k1} {z} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_low_mask2(<4 x float> %vec1, <4 x float> %vec2, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $6, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm2 {%k1} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_low_mask2(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $6, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 {%k1} {z} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_unpack_low_mask3(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_low_mask3(<4 x float> %vec1, <4 x float> %vec2, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $3, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm2 {%k1} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 0, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_low_mask3(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $3, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 {%k1} {z} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 0, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_unpack_low_mem_mask0(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%res = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_low_mem_mask0(<4 x float> %vec1, <4 x float>* %vec2p, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $8, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm1 {%k1} = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: vmovaps %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 0, i1 1>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_low_mem_mask0(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $8, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 {%k1} {z} = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 0, i1 1>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_masked_unpack_low_mem_mask1(<4 x float> %vec1, <4 x float>* %vec2p, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $6, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm1 {%k1} = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: vmovaps %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_low_mem_mask1(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $6, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 {%k1} {z} = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_masked_unpack_low_mem_mask2(<4 x float> %vec1, <4 x float>* %vec2p, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm1 {%k1} = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: vmovaps %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_low_mem_mask2(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 {%k1} {z} = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_unpack_low_mem_mask3(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%res = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_low_mem_mask3(<4 x float> %vec1, <4 x float>* %vec2p, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $4, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm1 {%k1} = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: vmovaps %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_low_mem_mask3(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $4, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} xmm0 {%k1} {z} = xmm0[0],mem[0],xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_unpack_low_mask0(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_low_mask0(<8 x float> %vec1, <8 x float> %vec2, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $122, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_low_mask0(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $122, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 {%k1} {z} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_low_mask1(<8 x float> %vec1, <8 x float> %vec2, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-107, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_low_mask1(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-107, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 {%k1} {z} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_low_mask2(<8 x float> %vec1, <8 x float> %vec2, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-25, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_low_mask2(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-25, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 {%k1} {z} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_unpack_low_mask3(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_low_mask3(<8 x float> %vec1, <8 x float> %vec2, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-127, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_low_mask3(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-127, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 {%k1} {z} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_unpack_low_mem_mask0(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%res = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_low_mem_mask0(<8 x float> %vec1, <8 x float>* %vec2p, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $72, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm1 {%k1} = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: vmovaps %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 0, i1 1, i1 0, i1 0, i1 1, i1 0>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_low_mem_mask0(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $72, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 {%k1} {z} = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 0, i1 1, i1 0, i1 0, i1 1, i1 0>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_masked_unpack_low_mem_mask1(<8 x float> %vec1, <8 x float>* %vec2p, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-64, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm1 {%k1} = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: vmovaps %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_low_mem_mask1(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-64, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 {%k1} {z} = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_masked_unpack_low_mem_mask2(<8 x float> %vec1, <8 x float>* %vec2p, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-98, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm1 {%k1} = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: vmovaps %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_low_mem_mask2(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-98, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 {%k1} {z} = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_unpack_low_mem_mask3(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%res = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_low_mem_mask3(<8 x float> %vec1, <8 x float>* %vec2p, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $64, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm1 {%k1} = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: vmovaps %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1, i1 0>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_low_mem_mask3(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $64, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} ymm0 {%k1} {z} = ymm0[0],mem[0],ymm0[1],mem[1],ymm0[4],mem[4],ymm0[5],mem[5]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1, i1 0>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_unpack_low_mask0(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_low_mask0(<16 x float> %vec1, <16 x float> %vec2, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-5916, %ax # imm = 0xE8E4
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm2 {%k1} = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 0, i1 0, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_low_mask0(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-5916, %ax # imm = 0xE8E4
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 0, i1 0, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_low_mask1(<16 x float> %vec1, <16 x float> %vec2, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-1130, %ax # imm = 0xFB96
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm2 {%k1} = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 1, i1 0, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_low_mask1(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-1130, %ax # imm = 0xFB96
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 1, i1 0, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_low_mask2(<16 x float> %vec1, <16 x float> %vec2, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-12439, %ax # imm = 0xCF69
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm2 {%k1} = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_low_mask2(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-12439, %ax # imm = 0xCF69
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_unpack_low_mask3(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_low_mask3(<16 x float> %vec1, <16 x float> %vec2, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-6413, %ax # imm = 0xE6F3
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm2 {%k1} = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_low_mask3(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-6413, %ax # imm = 0xE6F3
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_unpack_low_mem_mask0(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%res = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_low_mem_mask0(<16 x float> %vec1, <16 x float>* %vec2p, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $20326, %ax # imm = 0x4F66
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm1 {%k1} = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 0>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_low_mem_mask0(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $20326, %ax # imm = 0x4F66
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 {%k1} {z} = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 0>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_masked_unpack_low_mem_mask1(<16 x float> %vec1, <16 x float>* %vec2p, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-17707, %ax # imm = 0xBAD5
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm1 {%k1} = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 0, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_low_mem_mask1(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-17707, %ax # imm = 0xBAD5
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 {%k1} {z} = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 0, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_masked_unpack_low_mem_mask2(<16 x float> %vec1, <16 x float>* %vec2p, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-6631, %ax # imm = 0xE619
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm1 {%k1} = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_low_mem_mask2(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-6631, %ax # imm = 0xE619
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 {%k1} {z} = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_unpack_low_mem_mask3(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%res = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_low_mem_mask3(<16 x float> %vec1, <16 x float>* %vec2p, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-20711, %ax # imm = 0xAF19
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm1 {%k1} = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 1, i1 0, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_low_mem_mask3(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-20711, %ax # imm = 0xAF19
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklps {{.*#+}} zmm0 {%k1} {z} = zmm0[0],mem[0],zmm0[1],mem[1],zmm0[4],mem[4],zmm0[5],mem[5],zmm0[8],mem[8],zmm0[9],mem[9],zmm0[12],mem[12],zmm0[13],mem[13]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 4, i32 20, i32 5, i32 21, i32 8, i32 24, i32 9, i32 25, i32 12, i32 28, i32 13, i32 29>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 1, i1 0, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_unpack_low_mask0(<2 x double> %vec1, <2 x double> %vec2) {
|
|
; CHECK-LABEL: test_2xdouble_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
ret <2 x double> %res
|
|
}
|
|
define <2 x double> @test_2xdouble_masked_unpack_low_mask0(<2 x double> %vec1, <2 x double> %vec2, <2 x double> %vec3) {
|
|
; CHECK-LABEL: test_2xdouble_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm2 {%k1} = xmm0[0],xmm1[0]
|
|
; CHECK-NEXT: vmovapd %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
%res = select <2 x i1> <i1 1, i1 0>, <2 x double> %shuf, <2 x double> %vec3
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_zero_masked_unpack_low_mask0(<2 x double> %vec1, <2 x double> %vec2) {
|
|
; CHECK-LABEL: test_2xdouble_zero_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm0 {%k1} {z} = xmm0[0],xmm1[0]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
%res = select <2 x i1> <i1 1, i1 0>, <2 x double> %shuf, <2 x double> zeroinitializer
|
|
ret <2 x double> %res
|
|
}
|
|
define <2 x double> @test_2xdouble_masked_unpack_low_mask1(<2 x double> %vec1, <2 x double> %vec2, <2 x double> %vec3) {
|
|
; CHECK-LABEL: test_2xdouble_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $2, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm2 {%k1} = xmm0[0],xmm1[0]
|
|
; CHECK-NEXT: vmovapd %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
%res = select <2 x i1> <i1 0, i1 1>, <2 x double> %shuf, <2 x double> %vec3
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_zero_masked_unpack_low_mask1(<2 x double> %vec1, <2 x double> %vec2) {
|
|
; CHECK-LABEL: test_2xdouble_zero_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $2, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm0 {%k1} {z} = xmm0[0],xmm1[0]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
%res = select <2 x i1> <i1 0, i1 1>, <2 x double> %shuf, <2 x double> zeroinitializer
|
|
ret <2 x double> %res
|
|
}
|
|
define <2 x double> @test_2xdouble_unpack_low_mem_mask0(<2 x double> %vec1, <2 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_2xdouble_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],mem[0]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%res = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
ret <2 x double> %res
|
|
}
|
|
define <2 x double> @test_2xdouble_masked_unpack_low_mem_mask0(<2 x double> %vec1, <2 x double>* %vec2p, <2 x double> %vec3) {
|
|
; CHECK-LABEL: test_2xdouble_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm1 {%k1} = xmm0[0],mem[0]
|
|
; CHECK-NEXT: vmovapd %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
%res = select <2 x i1> <i1 1, i1 0>, <2 x double> %shuf, <2 x double> %vec3
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_zero_masked_unpack_low_mem_mask0(<2 x double> %vec1, <2 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_2xdouble_zero_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm0 {%k1} {z} = xmm0[0],mem[0]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
%res = select <2 x i1> <i1 1, i1 0>, <2 x double> %shuf, <2 x double> zeroinitializer
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_masked_unpack_low_mem_mask1(<2 x double> %vec1, <2 x double>* %vec2p, <2 x double> %vec3) {
|
|
; CHECK-LABEL: test_2xdouble_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $2, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm1 {%k1} = xmm0[0],mem[0]
|
|
; CHECK-NEXT: vmovapd %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
%res = select <2 x i1> <i1 0, i1 1>, <2 x double> %shuf, <2 x double> %vec3
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_zero_masked_unpack_low_mem_mask1(<2 x double> %vec1, <2 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_2xdouble_zero_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $2, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} xmm0 {%k1} {z} = xmm0[0],mem[0]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 0, i32 2>
|
|
%res = select <2 x i1> <i1 0, i1 1>, <2 x double> %shuf, <2 x double> zeroinitializer
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_unpack_low_mask0(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_low_mask0(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $13, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: vmovapd %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_low_mask0(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $13, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 {%k1} {z} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_low_mask1(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $14, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: vmovapd %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_low_mask1(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $14, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 {%k1} {z} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_low_mask2(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $6, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: vmovapd %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 0>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_low_mask2(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $6, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 {%k1} {z} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 0>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_unpack_low_mask3(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_low_mask3(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: vmovapd %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_low_mask3(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 {%k1} {z} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_unpack_low_mem_mask0(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%res = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_low_mem_mask0(<4 x double> %vec1, <4 x double>* %vec2p, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $4, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm1 {%k1} = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: vmovapd %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 0>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_low_mem_mask0(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $4, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 {%k1} {z} = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 0>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_masked_unpack_low_mem_mask1(<4 x double> %vec1, <4 x double>* %vec2p, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $11, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm1 {%k1} = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: vmovapd %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 0, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_low_mem_mask1(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $11, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 {%k1} {z} = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 0, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_masked_unpack_low_mem_mask2(<4 x double> %vec1, <4 x double>* %vec2p, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $7, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm1 {%k1} = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: vmovapd %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 1, i1 0>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_low_mem_mask2(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $7, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 {%k1} {z} = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 1, i1 0>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_unpack_low_mem_mask3(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%res = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_low_mem_mask3(<4 x double> %vec1, <4 x double>* %vec2p, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm1 {%k1} = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: vmovapd %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 0, i1 0>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_low_mem_mask3(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} ymm0 {%k1} {z} = ymm0[0],mem[0],ymm0[2],mem[2]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 0, i1 0>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_unpack_low_mask0(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_low_mask0(<8 x double> %vec1, <8 x double> %vec2, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-73, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm2 {%k1} = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_low_mask0(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_low_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-73, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_low_mask1(<8 x double> %vec1, <8 x double> %vec2, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $102, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm2 {%k1} = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 0>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_low_mask1(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_low_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $102, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 0>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_low_mask2(<8 x double> %vec1, <8 x double> %vec2, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-46, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm2 {%k1} = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_low_mask2(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_low_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-46, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_unpack_low_mask3(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_low_mask3(<8 x double> %vec1, <8 x double> %vec2, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-86, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm2 {%k1} = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_low_mask3(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_low_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-86, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_unpack_low_mem_mask0(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%res = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_low_mem_mask0(<8 x double> %vec1, <8 x double>* %vec2p, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm1 {%k1} = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_low_mem_mask0(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_low_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_masked_unpack_low_mem_mask1(<8 x double> %vec1, <8 x double>* %vec2p, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $126, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm1 {%k1} = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 0>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_low_mem_mask1(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_low_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $126, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 0>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_masked_unpack_low_mem_mask2(<8 x double> %vec1, <8 x double>* %vec2p, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-35, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm1 {%k1} = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 1, i1 1, i1 0, i1 1, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_low_mem_mask2(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_low_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-35, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 1, i1 1, i1 0, i1 1, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_unpack_low_mem_mask3(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%res = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_low_mem_mask3(<8 x double> %vec1, <8 x double>* %vec2p, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $62, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm1 {%k1} = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_low_mem_mask3(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_low_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $62, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpcklpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],mem[0],zmm0[2],mem[2],zmm0[4],mem[4],zmm0[6],mem[6]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_unpack_high_mask0(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_high_mask0(<4 x float> %vec1, <4 x float> %vec2, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $5, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm2 {%k1} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_high_mask0(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $5, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 {%k1} {z} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_high_mask1(<4 x float> %vec1, <4 x float> %vec2, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $12, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm2 {%k1} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 1>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_high_mask1(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $12, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 {%k1} {z} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 1>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_high_mask2(<4 x float> %vec1, <4 x float> %vec2, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $3, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm2 {%k1} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 0, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_high_mask2(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $3, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 {%k1} {z} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 0, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_unpack_high_mask3(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_high_mask3(<4 x float> %vec1, <4 x float> %vec2, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $7, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm2 {%k1} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 1, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_high_mask3(<4 x float> %vec1, <4 x float> %vec2) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $7, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 {%k1} {z} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 1, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_unpack_high_mem_mask0(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%res = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_high_mem_mask0(<4 x float> %vec1, <4 x float>* %vec2p, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $4, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm1 {%k1} = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: vmovaps %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_high_mem_mask0(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $4, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 {%k1} {z} = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_masked_unpack_high_mem_mask1(<4 x float> %vec1, <4 x float>* %vec2p, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $13, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm1 {%k1} = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: vmovaps %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 1>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_high_mem_mask1(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $13, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 {%k1} {z} = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 1>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_masked_unpack_high_mem_mask2(<4 x float> %vec1, <4 x float>* %vec2p, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm1 {%k1} = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: vmovaps %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_high_mem_mask2(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 {%k1} {z} = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_unpack_high_mem_mask3(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%res = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
ret <4 x float> %res
|
|
}
|
|
define <4 x float> @test_4xfloat_masked_unpack_high_mem_mask3(<4 x float> %vec1, <4 x float>* %vec2p, <4 x float> %vec3) {
|
|
; CHECK-LABEL: test_4xfloat_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $5, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm1 {%k1} = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: vmovaps %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 0>, <4 x float> %shuf, <4 x float> %vec3
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <4 x float> @test_4xfloat_zero_masked_unpack_high_mem_mask3(<4 x float> %vec1, <4 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_4xfloat_zero_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $5, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} xmm0 {%k1} {z} = xmm0[2],mem[2],xmm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x float>, <4 x float>* %vec2p
|
|
%shuf = shufflevector <4 x float> %vec1, <4 x float> %vec2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 0>, <4 x float> %shuf, <4 x float> zeroinitializer
|
|
ret <4 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_unpack_high_mask0(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_high_mask0(<8 x float> %vec1, <8 x float> %vec2, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $21, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm2 {%k1} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_high_mask0(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $21, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 {%k1} {z} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_high_mask1(<8 x float> %vec1, <8 x float> %vec2, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $82, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm2 {%k1} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 0>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_high_mask1(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $82, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 {%k1} {z} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 0>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_high_mask2(<8 x float> %vec1, <8 x float> %vec2, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-126, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm2 {%k1} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_high_mask2(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-126, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 {%k1} {z} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_unpack_high_mask3(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_high_mask3(<8 x float> %vec1, <8 x float> %vec2, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-19, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm2 {%k1} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_high_mask3(<8 x float> %vec1, <8 x float> %vec2) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-19, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 {%k1} {z} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_unpack_high_mem_mask0(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%res = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_high_mem_mask0(<8 x float> %vec1, <8 x float>* %vec2p, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $28, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm1 {%k1} = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: vmovaps %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 1, i1 1, i1 0, i1 0, i1 0>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_high_mem_mask0(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $28, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 {%k1} {z} = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 1, i1 1, i1 0, i1 0, i1 0>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_masked_unpack_high_mem_mask1(<8 x float> %vec1, <8 x float>* %vec2p, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-115, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm1 {%k1} = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: vmovaps %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_high_mem_mask1(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-115, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 {%k1} {z} = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_masked_unpack_high_mem_mask2(<8 x float> %vec1, <8 x float>* %vec2p, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-76, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm1 {%k1} = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: vmovaps %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_high_mem_mask2(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-76, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 {%k1} {z} = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_unpack_high_mem_mask3(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%res = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
ret <8 x float> %res
|
|
}
|
|
define <8 x float> @test_8xfloat_masked_unpack_high_mem_mask3(<8 x float> %vec1, <8 x float>* %vec2p, <8 x float> %vec3) {
|
|
; CHECK-LABEL: test_8xfloat_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-116, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm1 {%k1} = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: vmovaps %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> %vec3
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <8 x float> @test_8xfloat_zero_masked_unpack_high_mem_mask3(<8 x float> %vec1, <8 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_8xfloat_zero_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-116, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} ymm0 {%k1} {z} = ymm0[2],mem[2],ymm0[3],mem[3],ymm0[6],mem[6],ymm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x float>, <8 x float>* %vec2p
|
|
%shuf = shufflevector <8 x float> %vec1, <8 x float> %vec2, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1>, <8 x float> %shuf, <8 x float> zeroinitializer
|
|
ret <8 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_unpack_high_mask0(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_high_mask0(<16 x float> %vec1, <16 x float> %vec2, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-12160, %ax # imm = 0xD080
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm2 {%k1} = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1, i1 0, i1 0, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_high_mask0(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-12160, %ax # imm = 0xD080
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 {%k1} {z} = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 1, i1 0, i1 0, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_high_mask1(<16 x float> %vec1, <16 x float> %vec2, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-30129, %ax # imm = 0x8A4F
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm2 {%k1} = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_high_mask1(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-30129, %ax # imm = 0x8A4F
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 {%k1} {z} = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_high_mask2(<16 x float> %vec1, <16 x float> %vec2, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-2371, %ax # imm = 0xF6BD
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm2 {%k1} = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_high_mask2(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-2371, %ax # imm = 0xF6BD
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 {%k1} {z} = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_unpack_high_mask3(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_high_mask3(<16 x float> %vec1, <16 x float> %vec2, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-26006, %ax # imm = 0x9A6A
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm2 {%k1} = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_high_mask3(<16 x float> %vec1, <16 x float> %vec2) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-26006, %ax # imm = 0x9A6A
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 {%k1} {z} = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_unpack_high_mem_mask0(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%res = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_high_mem_mask0(<16 x float> %vec1, <16 x float>* %vec2p, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-27027, %ax # imm = 0x966D
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm1 {%k1} = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 0, i1 1, i1 0, i1 0, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_high_mem_mask0(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-27027, %ax # imm = 0x966D
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 {%k1} {z} = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1, i1 0, i1 1, i1 0, i1 0, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_masked_unpack_high_mem_mask1(<16 x float> %vec1, <16 x float>* %vec2p, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $29162, %ax # imm = 0x71EA
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm1 {%k1} = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1, i1 1, i1 1, i1 0>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_high_mem_mask1(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $29162, %ax # imm = 0x71EA
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 {%k1} {z} = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1, i1 1, i1 1, i1 0>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_masked_unpack_high_mem_mask2(<16 x float> %vec1, <16 x float>* %vec2p, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-26458, %ax # imm = 0x98A6
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm1 {%k1} = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_high_mem_mask2(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $-26458, %ax # imm = 0x98A6
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 {%k1} {z} = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 0, i1 1, i1 1, i1 0, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1, i1 1, i1 0, i1 0, i1 1>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_unpack_high_mem_mask3(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%res = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
ret <16 x float> %res
|
|
}
|
|
define <16 x float> @test_16xfloat_masked_unpack_high_mem_mask3(<16 x float> %vec1, <16 x float>* %vec2p, <16 x float> %vec3) {
|
|
; CHECK-LABEL: test_16xfloat_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $25225, %ax # imm = 0x6289
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm1 {%k1} = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1, i1 1, i1 0>, <16 x float> %shuf, <16 x float> %vec3
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <16 x float> @test_16xfloat_zero_masked_unpack_high_mem_mask3(<16 x float> %vec1, <16 x float>* %vec2p) {
|
|
; CHECK-LABEL: test_16xfloat_zero_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movw $25225, %ax # imm = 0x6289
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhps {{.*#+}} zmm0 {%k1} {z} = zmm0[2],mem[2],zmm0[3],mem[3],zmm0[6],mem[6],zmm0[7],mem[7],zmm0[10],mem[10],zmm0[11],mem[11],zmm0[14],mem[14],zmm0[15],mem[15]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <16 x float>, <16 x float>* %vec2p
|
|
%shuf = shufflevector <16 x float> %vec1, <16 x float> %vec2, <16 x i32> <i32 2, i32 18, i32 3, i32 19, i32 6, i32 22, i32 7, i32 23, i32 10, i32 26, i32 11, i32 27, i32 14, i32 30, i32 15, i32 31>
|
|
%res = select <16 x i1> <i1 1, i1 0, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1, i1 1, i1 0>, <16 x float> %shuf, <16 x float> zeroinitializer
|
|
ret <16 x float> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_unpack_high_mask0(<2 x double> %vec1, <2 x double> %vec2) {
|
|
; CHECK-LABEL: test_2xdouble_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm0 = xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
ret <2 x double> %res
|
|
}
|
|
define <2 x double> @test_2xdouble_masked_unpack_high_mask0(<2 x double> %vec1, <2 x double> %vec2, <2 x double> %vec3) {
|
|
; CHECK-LABEL: test_2xdouble_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $2, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm2 {%k1} = xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: vmovapd %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
%res = select <2 x i1> <i1 0, i1 1>, <2 x double> %shuf, <2 x double> %vec3
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_zero_masked_unpack_high_mask0(<2 x double> %vec1, <2 x double> %vec2) {
|
|
; CHECK-LABEL: test_2xdouble_zero_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $2, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm0 {%k1} {z} = xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
%res = select <2 x i1> <i1 0, i1 1>, <2 x double> %shuf, <2 x double> zeroinitializer
|
|
ret <2 x double> %res
|
|
}
|
|
define <2 x double> @test_2xdouble_masked_unpack_high_mask1(<2 x double> %vec1, <2 x double> %vec2, <2 x double> %vec3) {
|
|
; CHECK-LABEL: test_2xdouble_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm2 {%k1} = xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: vmovapd %xmm2, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
%res = select <2 x i1> <i1 1, i1 0>, <2 x double> %shuf, <2 x double> %vec3
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_zero_masked_unpack_high_mask1(<2 x double> %vec1, <2 x double> %vec2) {
|
|
; CHECK-LABEL: test_2xdouble_zero_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm0 {%k1} {z} = xmm0[1],xmm1[1]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
%res = select <2 x i1> <i1 1, i1 0>, <2 x double> %shuf, <2 x double> zeroinitializer
|
|
ret <2 x double> %res
|
|
}
|
|
define <2 x double> @test_2xdouble_unpack_high_mem_mask0(<2 x double> %vec1, <2 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_2xdouble_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm0 = xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%res = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
ret <2 x double> %res
|
|
}
|
|
define <2 x double> @test_2xdouble_masked_unpack_high_mem_mask0(<2 x double> %vec1, <2 x double>* %vec2p, <2 x double> %vec3) {
|
|
; CHECK-LABEL: test_2xdouble_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm1 {%k1} = xmm0[1],mem[1]
|
|
; CHECK-NEXT: vmovapd %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
%res = select <2 x i1> <i1 1, i1 0>, <2 x double> %shuf, <2 x double> %vec3
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_zero_masked_unpack_high_mem_mask0(<2 x double> %vec1, <2 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_2xdouble_zero_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm0 {%k1} {z} = xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
%res = select <2 x i1> <i1 1, i1 0>, <2 x double> %shuf, <2 x double> zeroinitializer
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_masked_unpack_high_mem_mask1(<2 x double> %vec1, <2 x double>* %vec2p, <2 x double> %vec3) {
|
|
; CHECK-LABEL: test_2xdouble_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $2, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm1 {%k1} = xmm0[1],mem[1]
|
|
; CHECK-NEXT: vmovapd %xmm1, %xmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
%res = select <2 x i1> <i1 0, i1 1>, <2 x double> %shuf, <2 x double> %vec3
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <2 x double> @test_2xdouble_zero_masked_unpack_high_mem_mask1(<2 x double> %vec1, <2 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_2xdouble_zero_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $2, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} xmm0 {%k1} {z} = xmm0[1],mem[1]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <2 x double>, <2 x double>* %vec2p
|
|
%shuf = shufflevector <2 x double> %vec1, <2 x double> %vec2, <2 x i32> <i32 1, i32 3>
|
|
%res = select <2 x i1> <i1 0, i1 1>, <2 x double> %shuf, <2 x double> zeroinitializer
|
|
ret <2 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_unpack_high_mask0(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_high_mask0(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $9, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm2 {%k1} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: vmovapd %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 0, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_high_mask0(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $9, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 {%k1} {z} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 0, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_high_mask1(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $14, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm2 {%k1} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: vmovapd %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_high_mask1(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $14, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 {%k1} {z} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_high_mask2(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $6, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm2 {%k1} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: vmovapd %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 0>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_high_mask2(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $6, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 {%k1} {z} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 1, i1 0>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_unpack_high_mask3(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_high_mask3(<4 x double> %vec1, <4 x double> %vec2, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm2 {%k1} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: vmovapd %ymm2, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 0, i1 0>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_high_mask3(<4 x double> %vec1, <4 x double> %vec2) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $1, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 {%k1} {z} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 0, i1 0>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_unpack_high_mem_mask0(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%res = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_high_mem_mask0(<4 x double> %vec1, <4 x double>* %vec2p, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $11, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm1 {%k1} = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: vmovapd %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 0, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_high_mem_mask0(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $11, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 {%k1} {z} = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 1, i1 0, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_masked_unpack_high_mem_mask1(<4 x double> %vec1, <4 x double>* %vec2p, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $12, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm1 {%k1} = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: vmovapd %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_high_mem_mask1(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $12, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 {%k1} {z} = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 0, i1 1, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_masked_unpack_high_mem_mask2(<4 x double> %vec1, <4 x double>* %vec2p, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $13, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm1 {%k1} = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: vmovapd %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_high_mem_mask2(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $13, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 {%k1} {z} = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 1, i1 0, i1 1, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_unpack_high_mem_mask3(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%res = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
ret <4 x double> %res
|
|
}
|
|
define <4 x double> @test_4xdouble_masked_unpack_high_mem_mask3(<4 x double> %vec1, <4 x double>* %vec2p, <4 x double> %vec3) {
|
|
; CHECK-LABEL: test_4xdouble_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm1 {%k1} = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: vmovapd %ymm1, %ymm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x double> %shuf, <4 x double> %vec3
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <4 x double> @test_4xdouble_zero_masked_unpack_high_mem_mask3(<4 x double> %vec1, <4 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_4xdouble_zero_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $10, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} ymm0 {%k1} {z} = ymm0[1],mem[1],ymm0[3],mem[3]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <4 x double>, <4 x double>* %vec2p
|
|
%shuf = shufflevector <4 x double> %vec1, <4 x double> %vec2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
|
|
%res = select <4 x i1> <i1 0, i1 1, i1 0, i1 1>, <4 x double> %shuf, <4 x double> zeroinitializer
|
|
ret <4 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_unpack_high_mask0(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_high_mask0(<8 x double> %vec1, <8 x double> %vec2, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-27, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm2 {%k1} = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_high_mask0(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_high_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-27, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 {%k1} {z} = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 0, i1 1, i1 0, i1 0, i1 1, i1 1, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_high_mask1(<8 x double> %vec1, <8 x double> %vec2, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-21, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm2 {%k1} = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_high_mask1(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_high_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-21, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 {%k1} {z} = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 0, i1 1, i1 0, i1 1, i1 1, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_high_mask2(<8 x double> %vec1, <8 x double> %vec2, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-118, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm2 {%k1} = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_high_mask2(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_high_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-118, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 {%k1} {z} = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 0, i1 0, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_unpack_high_mask3(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: retq
|
|
%res = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_high_mask3(<8 x double> %vec1, <8 x double> %vec2, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $100, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm2 {%k1} = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 0, i1 0, i1 1, i1 1, i1 0>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_high_mask3(<8 x double> %vec1, <8 x double> %vec2) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_high_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $100, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 {%k1} {z} = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
|
|
; CHECK-NEXT: retq
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 0, i1 0, i1 1, i1 1, i1 0>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_unpack_high_mem_mask0(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%res = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_high_mem_mask0(<8 x double> %vec1, <8 x double>* %vec2p, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-76, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm1 {%k1} = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_high_mem_mask0(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_high_mem_mask0:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-76, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 {%k1} {z} = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 1, i1 0, i1 1, i1 1, i1 0, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_masked_unpack_high_mem_mask1(<8 x double> %vec1, <8 x double>* %vec2p, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $71, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm1 {%k1} = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1, i1 0>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_high_mem_mask1(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_high_mem_mask1:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $71, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 {%k1} {z} = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 1, i1 0, i1 0, i1 0, i1 1, i1 0>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_masked_unpack_high_mem_mask2(<8 x double> %vec1, <8 x double>* %vec2p, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-49, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm1 {%k1} = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_high_mem_mask2(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_high_mem_mask2:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-49, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 {%k1} {z} = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 1, i1 1, i1 1, i1 1, i1 0, i1 0, i1 1, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_unpack_high_mem_mask3(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%res = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
ret <8 x double> %res
|
|
}
|
|
define <8 x double> @test_8xdouble_masked_unpack_high_mem_mask3(<8 x double> %vec1, <8 x double>* %vec2p, <8 x double> %vec3) {
|
|
; CHECK-LABEL: test_8xdouble_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-40, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm1 {%k1} = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm0
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1>, <8 x double> %shuf, <8 x double> %vec3
|
|
ret <8 x double> %res
|
|
}
|
|
|
|
define <8 x double> @test_8xdouble_zero_masked_unpack_high_mem_mask3(<8 x double> %vec1, <8 x double>* %vec2p) {
|
|
; CHECK-LABEL: test_8xdouble_zero_masked_unpack_high_mem_mask3:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: movb $-40, %al
|
|
; CHECK-NEXT: kmovw %eax, %k1
|
|
; CHECK-NEXT: vunpckhpd {{.*#+}} zmm0 {%k1} {z} = zmm0[1],mem[1],zmm0[3],mem[3],zmm0[5],mem[5],zmm0[7],mem[7]
|
|
; CHECK-NEXT: retq
|
|
%vec2 = load <8 x double>, <8 x double>* %vec2p
|
|
%shuf = shufflevector <8 x double> %vec1, <8 x double> %vec2, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
|
|
%res = select <8 x i1> <i1 0, i1 0, i1 0, i1 1, i1 1, i1 0, i1 1, i1 1>, <8 x double> %shuf, <8 x double> zeroinitializer
|
|
ret <8 x double> %res
|
|
}
|
|
|