2016-07-03 21:33:28 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2014-09-30 19:41:54 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512bw -mattr=+avx512vl --show-mc-encoding| FileCheck %s
|
|
|
|
|
2015-05-04 17:14:02 +08:00
|
|
|
define <8 x i16> @test_mask_packs_epi32_rr_128(<4 x i32> %a, <4 x i32> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackssdw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6b,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
ret <8 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packs_epi32_rrk_128(<4 x i32> %a, <4 x i32> %b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x6b,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> %passThru
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packs_epi32_rrkz_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x6b,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> zeroinitializer
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packs_epi32_rm_128(<4 x i32> %a, <4 x i32>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6b,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
ret <8 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packs_epi32_rmk_128(<4 x i32> %a, <4 x i32>* %ptr_b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x6b,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> %passThru
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packs_epi32_rmkz_128(<4 x i32> %a, <4 x i32>* %ptr_b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x6b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> zeroinitializer
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packs_epi32_rmb_128(<4 x i32> %a, i32* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpackssdw (%rdi){1to4}, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x18,0x6b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i32> %vecinit.i, <4 x i32> undef, <4 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
ret <8 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packs_epi32_rmbk_128(<4 x i32> %a, i32* %ptr_b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi){1to4}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x19,0x6b,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i32> %vecinit.i, <4 x i32> undef, <4 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> %passThru
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packs_epi32_rmbkz_128(<4 x i32> %a, i32* %ptr_b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi){1to4}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x99,0x6b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i32> %vecinit.i, <4 x i32> undef, <4 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> zeroinitializer
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 14:31:54 +08:00
|
|
|
declare <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32>, <4 x i32>)
|
2015-05-04 17:14:02 +08:00
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rr_256(<8 x i32> %a, <8 x i32> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackssdw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6b,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
ret <16 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rrk_256(<8 x i32> %a, <8 x i32> %b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x6b,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> %passThru
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rrkz_256(<8 x i32> %a, <8 x i32> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x6b,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> zeroinitializer
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rm_256(<8 x i32> %a, <8 x i32>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6b,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
ret <16 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rmk_256(<8 x i32> %a, <8 x i32>* %ptr_b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x6b,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> %passThru
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rmkz_256(<8 x i32> %a, <8 x i32>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x6b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> zeroinitializer
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rmb_256(<8 x i32> %a, i32* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpackssdw (%rdi){1to8}, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x38,0x6b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <8 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <8 x i32> %vecinit.i, <8 x i32> undef, <8 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
ret <16 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rmbk_256(<8 x i32> %a, i32* %ptr_b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi){1to8}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x39,0x6b,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <8 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <8 x i32> %vecinit.i, <8 x i32> undef, <8 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> %passThru
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packs_epi32_rmbkz_256(<8 x i32> %a, i32* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi32_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackssdw (%rdi){1to8}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xb9,0x6b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <8 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <8 x i32> %vecinit.i, <8 x i32> undef, <8 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> zeroinitializer
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 14:31:54 +08:00
|
|
|
declare <16 x i16> @llvm.x86.avx2.packssdw(<8 x i32>, <8 x i32>)
|
2015-05-04 17:14:02 +08:00
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packs_epi16_rr_128(<8 x i16> %a, <8 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpacksswb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x63,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packsswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
ret <16 x i8> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packs_epi16_rrk_128(<8 x i16> %a, <8 x i16> %b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpacksswb %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x63,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packsswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i8> %1, <16 x i8> %passThru
|
|
|
|
ret <16 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packs_epi16_rrkz_128(<8 x i16> %a, <8 x i16> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpacksswb %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x63,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packsswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i8> %1, <16 x i8> zeroinitializer
|
|
|
|
ret <16 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packs_epi16_rm_128(<8 x i16> %a, <8 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpacksswb (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x63,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packsswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
ret <16 x i8> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packs_epi16_rmk_128(<8 x i16> %a, <8 x i16>* %ptr_b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpacksswb (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x63,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packsswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i8> %1, <16 x i8> %passThru
|
|
|
|
ret <16 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packs_epi16_rmkz_128(<8 x i16> %a, <8 x i16>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpacksswb (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x63,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packsswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i8> %1, <16 x i8> zeroinitializer
|
|
|
|
ret <16 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 14:31:54 +08:00
|
|
|
declare <16 x i8> @llvm.x86.sse2.packsswb.128(<8 x i16>, <8 x i16>)
|
2015-05-04 17:14:02 +08:00
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packs_epi16_rr_256(<16 x i16> %a, <16 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpacksswb %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x63,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packsswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
ret <32 x i8> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packs_epi16_rrk_256(<16 x i16> %a, <16 x i16> %b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpacksswb %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x63,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packsswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
%2 = bitcast i32 %mask to <32 x i1>
|
|
|
|
%3 = select <32 x i1> %2, <32 x i8> %1, <32 x i8> %passThru
|
|
|
|
ret <32 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packs_epi16_rrkz_256(<16 x i16> %a, <16 x i16> %b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpacksswb %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x63,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packsswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
%2 = bitcast i32 %mask to <32 x i1>
|
|
|
|
%3 = select <32 x i1> %2, <32 x i8> %1, <32 x i8> zeroinitializer
|
|
|
|
ret <32 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packs_epi16_rm_256(<16 x i16> %a, <16 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpacksswb (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x63,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packsswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
ret <32 x i8> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packs_epi16_rmk_256(<16 x i16> %a, <16 x i16>* %ptr_b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpacksswb (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x63,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packsswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
%2 = bitcast i32 %mask to <32 x i1>
|
|
|
|
%3 = select <32 x i1> %2, <32 x i8> %1, <32 x i8> %passThru
|
|
|
|
ret <32 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packs_epi16_rmkz_256(<16 x i16> %a, <16 x i16>* %ptr_b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packs_epi16_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpacksswb (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x63,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packsswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
%2 = bitcast i32 %mask to <32 x i1>
|
|
|
|
%3 = select <32 x i1> %2, <32 x i8> %1, <32 x i8> zeroinitializer
|
|
|
|
ret <32 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 14:31:54 +08:00
|
|
|
declare <32 x i8> @llvm.x86.avx2.packsswb(<16 x i16>, <16 x i16>)
|
2015-05-04 17:14:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rr_128(<4 x i32> %a, <4 x i32> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackusdw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x2b,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
ret <8 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rrk_128(<4 x i32> %a, <4 x i32> %b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x2b,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> %passThru
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rrkz_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x2b,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> zeroinitializer
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rm_128(<4 x i32> %a, <4 x i32>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x2b,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
ret <8 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rmk_128(<4 x i32> %a, <4 x i32>* %ptr_b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x2b,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> %passThru
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rmkz_128(<4 x i32> %a, <4 x i32>* %ptr_b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x2b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> zeroinitializer
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rmb_128(<4 x i32> %a, i32* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpackusdw (%rdi){1to4}, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x18,0x2b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i32> %vecinit.i, <4 x i32> undef, <4 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
ret <8 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rmbk_128(<4 x i32> %a, i32* %ptr_b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi){1to4}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x19,0x2b,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i32> %vecinit.i, <4 x i32> undef, <4 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> %passThru
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_packus_epi32_rmbkz_128(<4 x i32> %a, i32* %ptr_b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi){1to4}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x99,0x2b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i32> %vecinit.i, <4 x i32> undef, <4 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a, <4 x i32> %b)
|
|
|
|
%2 = bitcast i8 %mask to <8 x i1>
|
|
|
|
%3 = select <8 x i1> %2, <8 x i16> %1, <8 x i16> zeroinitializer
|
|
|
|
ret <8 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 14:31:54 +08:00
|
|
|
declare <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32>, <4 x i32>)
|
2015-05-04 17:14:02 +08:00
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rr_256(<8 x i32> %a, <8 x i32> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackusdw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x2b,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
ret <16 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rrk_256(<8 x i32> %a, <8 x i32> %b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x2b,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> %passThru
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rrkz_256(<8 x i32> %a, <8 x i32> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x2b,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> zeroinitializer
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rm_256(<8 x i32> %a, <8 x i32>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x2b,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
ret <16 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rmk_256(<8 x i32> %a, <8 x i32>* %ptr_b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x2b,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> %passThru
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rmkz_256(<8 x i32> %a, <8 x i32>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x2b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> zeroinitializer
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rmb_256(<8 x i32> %a, i32* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpackusdw (%rdi){1to8}, %ymm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x38,0x2b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <8 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <8 x i32> %vecinit.i, <8 x i32> undef, <8 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
ret <16 x i16> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rmbk_256(<8 x i32> %a, i32* %ptr_b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi){1to8}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x39,0x2b,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <8 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <8 x i32> %vecinit.i, <8 x i32> undef, <8 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> %passThru
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_packus_epi32_rmbkz_256(<8 x i32> %a, i32* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi32_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackusdw (%rdi){1to8}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xb9,0x2b,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%q = load i32, i32* %ptr_b
|
|
|
|
%vecinit.i = insertelement <8 x i32> undef, i32 %q, i32 0
|
|
|
|
%b = shufflevector <8 x i32> %vecinit.i, <8 x i32> undef, <8 x i32> zeroinitializer
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32> %a, <8 x i32> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i16> %1, <16 x i16> zeroinitializer
|
|
|
|
ret <16 x i16> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 14:31:54 +08:00
|
|
|
declare <16 x i16> @llvm.x86.avx2.packusdw(<8 x i32>, <8 x i32>)
|
2015-05-04 17:14:02 +08:00
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packus_epi16_rr_128(<8 x i16> %a, <8 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackuswb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x67,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
ret <16 x i8> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packus_epi16_rrk_128(<8 x i16> %a, <8 x i16> %b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackuswb %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x67,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i8> %1, <16 x i8> %passThru
|
|
|
|
ret <16 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packus_epi16_rrkz_128(<8 x i16> %a, <8 x i16> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackuswb %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x67,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i8> %1, <16 x i8> zeroinitializer
|
|
|
|
ret <16 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packus_epi16_rm_128(<8 x i16> %a, <8 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackuswb (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x67,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
ret <16 x i8> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packus_epi16_rmk_128(<8 x i16> %a, <8 x i16>* %ptr_b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackuswb (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x67,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i8> %1, <16 x i8> %passThru
|
|
|
|
ret <16 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_packus_epi16_rmkz_128(<8 x i16> %a, <8 x i16>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpackuswb (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x67,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16> %a, <8 x i16> %b)
|
|
|
|
%2 = bitcast i16 %mask to <16 x i1>
|
|
|
|
%3 = select <16 x i1> %2, <16 x i8> %1, <16 x i8> zeroinitializer
|
|
|
|
ret <16 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 14:31:54 +08:00
|
|
|
declare <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16>, <8 x i16>)
|
2015-05-04 17:14:02 +08:00
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packus_epi16_rr_256(<16 x i16> %a, <16 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackuswb %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x67,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
ret <32 x i8> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packus_epi16_rrk_256(<16 x i16> %a, <16 x i16> %b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpackuswb %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x67,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
%2 = bitcast i32 %mask to <32 x i1>
|
|
|
|
%3 = select <32 x i1> %2, <32 x i8> %1, <32 x i8> %passThru
|
|
|
|
ret <32 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packus_epi16_rrkz_256(<16 x i16> %a, <16 x i16> %b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpackuswb %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x67,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
%2 = bitcast i32 %mask to <32 x i1>
|
|
|
|
%3 = select <32 x i1> %2, <32 x i8> %1, <32 x i8> zeroinitializer
|
|
|
|
ret <32 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packus_epi16_rm_256(<16 x i16> %a, <16 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpackuswb (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x67,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
ret <32 x i8> %1
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packus_epi16_rmk_256(<16 x i16> %a, <16 x i16>* %ptr_b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpackuswb (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x67,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
%2 = bitcast i32 %mask to <32 x i1>
|
|
|
|
%3 = select <32 x i1> %2, <32 x i8> %1, <32 x i8> %passThru
|
|
|
|
ret <32 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_packus_epi16_rmkz_256(<16 x i16> %a, <16 x i16>* %ptr_b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_packus_epi16_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpackuswb (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x67,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 17:14:02 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
2017-02-16 14:31:54 +08:00
|
|
|
%1 = call <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16> %a, <16 x i16> %b)
|
|
|
|
%2 = bitcast i32 %mask to <32 x i1>
|
|
|
|
%3 = select <32 x i1> %2, <32 x i8> %1, <32 x i8> zeroinitializer
|
|
|
|
ret <32 x i8> %3
|
2015-05-04 17:14:02 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 14:31:54 +08:00
|
|
|
declare <32 x i8> @llvm.x86.avx2.packuswb(<16 x i16>, <16 x i16>)
|
2015-05-04 17:14:02 +08:00
|
|
|
|
2015-05-04 20:35:55 +08:00
|
|
|
define <8 x i16> @test_mask_adds_epi16_rr_128(<8 x i16> %a, <8 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddsw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xed,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.padds.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epi16_rrk_128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xed,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.padds.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epi16_rrkz_128(<8 x i16> %a, <8 x i16> %b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xed,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.padds.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epi16_rm_128(<8 x i16> %a, <8 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddsw (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xed,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.padds.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epi16_rmk_128(<8 x i16> %a, <8 x i16>* %ptr_b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsw (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xed,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.padds.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epi16_rmkz_128(<8 x i16> %a, <8 x i16>* %ptr_b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsw (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xed,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.padds.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.padds.w.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epi16_rr_256(<16 x i16> %a, <16 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddsw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xed,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.padds.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epi16_rrk_256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xed,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.padds.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epi16_rrkz_256(<16 x i16> %a, <16 x i16> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xed,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.padds.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epi16_rm_256(<16 x i16> %a, <16 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddsw (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xed,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.padds.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epi16_rmk_256(<16 x i16> %a, <16 x i16>* %ptr_b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsw (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xed,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.padds.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epi16_rmkz_256(<16 x i16> %a, <16 x i16>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi16_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsw (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xed,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.padds.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.padds.w.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epi16_rr_128(<8 x i16> %a, <8 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubsw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe9,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubs.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epi16_rrk_128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe9,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubs.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epi16_rrkz_128(<8 x i16> %a, <8 x i16> %b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xe9,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubs.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epi16_rm_128(<8 x i16> %a, <8 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubsw (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe9,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubs.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epi16_rmk_128(<8 x i16> %a, <8 x i16>* %ptr_b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsw (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe9,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubs.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epi16_rmkz_128(<8 x i16> %a, <8 x i16>* %ptr_b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsw (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xe9,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubs.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.psubs.w.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epi16_rr_256(<16 x i16> %a, <16 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubsw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe9,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubs.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epi16_rrk_256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe9,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubs.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epi16_rrkz_256(<16 x i16> %a, <16 x i16> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xe9,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubs.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epi16_rm_256(<16 x i16> %a, <16 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubsw (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe9,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubs.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epi16_rmk_256(<16 x i16> %a, <16 x i16>* %ptr_b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsw (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe9,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubs.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epi16_rmkz_256(<16 x i16> %a, <16 x i16>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi16_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsw (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xe9,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubs.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.psubs.w.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epu16_rr_128(<8 x i16> %a, <8 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddusw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xdd,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.paddus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epu16_rrk_128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xdd,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.paddus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epu16_rrkz_128(<8 x i16> %a, <8 x i16> %b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xdd,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.paddus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epu16_rm_128(<8 x i16> %a, <8 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddusw (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xdd,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.paddus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epu16_rmk_128(<8 x i16> %a, <8 x i16>* %ptr_b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusw (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xdd,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.paddus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_adds_epu16_rmkz_128(<8 x i16> %a, <8 x i16>* %ptr_b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusw (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xdd,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.paddus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.paddus.w.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epu16_rr_256(<16 x i16> %a, <16 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddusw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xdd,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.paddus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epu16_rrk_256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xdd,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.paddus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epu16_rrkz_256(<16 x i16> %a, <16 x i16> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xdd,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.paddus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epu16_rm_256(<16 x i16> %a, <16 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddusw (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xdd,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.paddus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epu16_rmk_256(<16 x i16> %a, <16 x i16>* %ptr_b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusw (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xdd,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.paddus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_adds_epu16_rmkz_256(<16 x i16> %a, <16 x i16>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu16_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusw (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xdd,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.paddus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.paddus.w.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epu16_rr_128(<8 x i16> %a, <8 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubusw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd9,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epu16_rrk_128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xd9,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epu16_rrkz_128(<8 x i16> %a, <8 x i16> %b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xd9,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epu16_rm_128(<8 x i16> %a, <8 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubusw (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd9,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epu16_rmk_128(<8 x i16> %a, <8 x i16>* %ptr_b, <8 x i16> %passThru, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusw (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xd9,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> %passThru, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @test_mask_subs_epu16_rmkz_128(<8 x i16> %a, <8 x i16>* %ptr_b, i8 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusw (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xd9,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <8 x i16>, <8 x i16>* %ptr_b
|
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psubus.w.128(<8 x i16> %a, <8 x i16> %b, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.psubus.w.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epu16_rr_256(<16 x i16> %a, <16 x i16> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubusw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd9,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epu16_rrk_256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xd9,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epu16_rrkz_256(<16 x i16> %a, <16 x i16> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xd9,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epu16_rm_256(<16 x i16> %a, <16 x i16>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubusw (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd9,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epu16_rmk_256(<16 x i16> %a, <16 x i16>* %ptr_b, <16 x i16> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusw (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xd9,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> %passThru, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i16> @test_mask_subs_epu16_rmkz_256(<16 x i16> %a, <16 x i16>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu16_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusw (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xd9,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i16>, <16 x i16>* %ptr_b
|
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psubus.w.256(<16 x i16> %a, <16 x i16> %b, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i16> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.psubus.w.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epi8_rr_128(<16 x i8> %a, <16 x i8> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddsb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xec,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.padds.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epi8_rrk_128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsb %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xec,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.padds.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epi8_rrkz_128(<16 x i8> %a, <16 x i8> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsb %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xec,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.padds.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epi8_rm_128(<16 x i8> %a, <16 x i8>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddsb (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xec,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.padds.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epi8_rmk_128(<16 x i8> %a, <16 x i8>* %ptr_b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsb (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xec,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.padds.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epi8_rmkz_128(<16 x i8> %a, <16 x i8>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddsb (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xec,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.padds.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.padds.b.128(<16 x i8>, <16 x i8>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epi8_rr_256(<32 x i8> %a, <32 x i8> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddsb %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xec,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.padds.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 -1)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epi8_rrk_256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpaddsb %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xec,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.padds.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epi8_rrkz_256(<32 x i8> %a, <32 x i8> %b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpaddsb %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xec,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.padds.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epi8_rm_256(<32 x i8> %a, <32 x i8>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddsb (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xec,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.padds.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 -1)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epi8_rmk_256(<32 x i8> %a, <32 x i8>* %ptr_b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddsb (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xec,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.padds.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epi8_rmkz_256(<32 x i8> %a, <32 x i8>* %ptr_b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epi8_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddsb (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xec,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.padds.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <32 x i8> @llvm.x86.avx512.mask.padds.b.256(<32 x i8>, <32 x i8>, <32 x i8>, i32)
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epi8_rr_128(<16 x i8> %a, <16 x i8> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubsb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe8,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubs.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epi8_rrk_128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsb %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe8,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubs.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epi8_rrkz_128(<16 x i8> %a, <16 x i8> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsb %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xe8,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubs.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epi8_rm_128(<16 x i8> %a, <16 x i8>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubsb (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe8,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubs.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epi8_rmk_128(<16 x i8> %a, <16 x i8>* %ptr_b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsb (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe8,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubs.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epi8_rmkz_128(<16 x i8> %a, <16 x i8>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubsb (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xe8,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubs.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.psubs.b.128(<16 x i8>, <16 x i8>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epi8_rr_256(<32 x i8> %a, <32 x i8> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubsb %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe8,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubs.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 -1)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epi8_rrk_256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsubsb %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe8,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubs.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epi8_rrkz_256(<32 x i8> %a, <32 x i8> %b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsubsb %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xe8,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubs.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epi8_rm_256(<32 x i8> %a, <32 x i8>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubsb (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe8,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubs.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 -1)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epi8_rmk_256(<32 x i8> %a, <32 x i8>* %ptr_b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubsb (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe8,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubs.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epi8_rmkz_256(<32 x i8> %a, <32 x i8>* %ptr_b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epi8_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubsb (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xe8,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubs.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <32 x i8> @llvm.x86.avx512.mask.psubs.b.256(<32 x i8>, <32 x i8>, <32 x i8>, i32)
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epu8_rr_128(<16 x i8> %a, <16 x i8> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddusb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xdc,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.paddus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epu8_rrk_128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusb %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xdc,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.paddus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epu8_rrkz_128(<16 x i8> %a, <16 x i8> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusb %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xdc,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.paddus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epu8_rm_128(<16 x i8> %a, <16 x i8>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddusb (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xdc,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.paddus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epu8_rmk_128(<16 x i8> %a, <16 x i8>* %ptr_b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusb (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xdc,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.paddus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_adds_epu8_rmkz_128(<16 x i8> %a, <16 x i8>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpaddusb (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xdc,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.paddus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.paddus.b.128(<16 x i8>, <16 x i8>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epu8_rr_256(<32 x i8> %a, <32 x i8> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddusb %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xdc,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.paddus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 -1)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epu8_rrk_256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpaddusb %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xdc,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.paddus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epu8_rrkz_256(<32 x i8> %a, <32 x i8> %b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpaddusb %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xdc,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.paddus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epu8_rm_256(<32 x i8> %a, <32 x i8>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddusb (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xdc,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.paddus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 -1)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epu8_rmk_256(<32 x i8> %a, <32 x i8>* %ptr_b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddusb (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xdc,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.paddus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_adds_epu8_rmkz_256(<32 x i8> %a, <32 x i8>* %ptr_b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_adds_epu8_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddusb (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xdc,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.paddus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <32 x i8> @llvm.x86.avx512.mask.paddus.b.256(<32 x i8>, <32 x i8>, <32 x i8>, i32)
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epu8_rr_128(<16 x i8> %a, <16 x i8> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubusb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd8,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epu8_rrk_128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusb %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xd8,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epu8_rrkz_128(<16 x i8> %a, <16 x i8> %b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusb %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xd8,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epu8_rm_128(<16 x i8> %a, <16 x i8>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubusb (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd8,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 -1)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epu8_rmk_128(<16 x i8> %a, <16 x i8>* %ptr_b, <16 x i8> %passThru, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusb (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xd8,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> %passThru, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @test_mask_subs_epu8_rmkz_128(<16 x i8> %a, <16 x i8>* %ptr_b, i16 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsubusb (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xd8,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <16 x i8>, <16 x i8>* %ptr_b
|
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.psubus.b.128(<16 x i8> %a, <16 x i8> %b, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
ret <16 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.psubus.b.128(<16 x i8>, <16 x i8>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epu8_rr_256(<32 x i8> %a, <32 x i8> %b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubusb %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd8,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 -1)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epu8_rrk_256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsubusb %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xd8,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epu8_rrkz_256(<32 x i8> %a, <32 x i8> %b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsubusb %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xd8,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epu8_rm_256(<32 x i8> %a, <32 x i8>* %ptr_b) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubusb (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd8,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 -1)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epu8_rmk_256(<32 x i8> %a, <32 x i8>* %ptr_b, <32 x i8> %passThru, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubusb (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xd8,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> %passThru, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i8> @test_mask_subs_epu8_rmkz_256(<32 x i8> %a, <32 x i8>* %ptr_b, i32 %mask) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_mask_subs_epu8_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubusb (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xd8,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-05-04 20:35:55 +08:00
|
|
|
%b = load <32 x i8>, <32 x i8>* %ptr_b
|
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.psubus.b.256(<32 x i8> %a, <32 x i8> %b, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
|
2015-06-16 16:39:27 +08:00
|
|
|
declare <32 x i8> @llvm.x86.avx512.mask.psubus.b.256(<32 x i8>, <32 x i8>, <32 x i8>, i32)
|
|
|
|
|
2015-06-22 14:45:48 +08:00
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.vpermt2var.hi.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_vpermt2var_hi_128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermt2var_hi_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpermt2w %xmm2, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x7d,0xda]
|
|
|
|
; CHECK-NEXT: vpermt2w %xmm2, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x7d,0xca]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm3, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-22 14:45:48 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.vpermt2var.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.vpermt2var.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.maskz.vpermt2var.hi.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <8 x i16>@test_int_x86_avx512_maskz_vpermt2var_hi_128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vpermt2var_hi_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpermt2w %xmm2, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x7d,0xda]
|
|
|
|
; CHECK-NEXT: vpermt2w %xmm2, %xmm0, %xmm1 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x7d,0xca]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm3, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-22 14:45:48 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.maskz.vpermt2var.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.maskz.vpermt2var.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.vpermt2var.hi.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_vpermt2var_hi_256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermt2var_hi_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpermt2w %ymm2, %ymm0, %ymm3 ## encoding: [0x62,0xf2,0xfd,0x28,0x7d,0xda]
|
|
|
|
; CHECK-NEXT: vpermt2w %ymm2, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x7d,0xca]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm3, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-22 14:45:48 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.vpermt2var.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.vpermt2var.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.maskz.vpermt2var.hi.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <16 x i16>@test_int_x86_avx512_maskz_vpermt2var_hi_256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vpermt2var_hi_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpermt2w %ymm2, %ymm0, %ymm3 ## encoding: [0x62,0xf2,0xfd,0x28,0x7d,0xda]
|
|
|
|
; CHECK-NEXT: vpermt2w %ymm2, %ymm0, %ymm1 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x7d,0xca]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm3, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-22 14:45:48 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.maskz.vpermt2var.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.maskz.vpermt2var.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.vpermi2var.hi.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_vpermi2var_hi_128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermi2var_hi_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpermi2w %xmm2, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x75,0xda]
|
|
|
|
; CHECK-NEXT: vpermi2w %xmm2, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x75,0xca]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm3, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-22 14:45:48 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.vpermi2var.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.vpermi2var.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.vpermi2var.hi.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_vpermi2var_hi_256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermi2var_hi_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpermi2w %ymm2, %ymm0, %ymm3 ## encoding: [0x62,0xf2,0xfd,0x28,0x75,0xda]
|
|
|
|
; CHECK-NEXT: vpermi2w %ymm2, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x75,0xca]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm3, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-22 14:45:48 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.vpermi2var.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.vpermi2var.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
|
|
|
|
2015-06-18 20:30:53 +08:00
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pavg.b.128(<16 x i8>, <16 x i8>, <16 x i8>, i16)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pavg_b_128(<16 x i8> %x0, <16 x i8> %x1, <16 x i8> %x2, i16 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pavg_b_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpavgb %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe0,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpavgb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe0,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfc,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-18 20:30:53 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.pavg.b.128(<16 x i8> %x0, <16 x i8> %x1, <16 x i8> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pavg.b.128(<16 x i8> %x0, <16 x i8> %x1, <16 x i8> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i8> %res, %res1
|
|
|
|
ret <16 x i8> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <32 x i8> @llvm.x86.avx512.mask.pavg.b.256(<32 x i8>, <32 x i8>, <32 x i8>, i32)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <32 x i8>@test_int_x86_avx512_mask_pavg_b_256(<32 x i8> %x0, <32 x i8> %x1, <32 x i8> %x2, i32 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pavg_b_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpavgb %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe0,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpavgb %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe0,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddb %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfc,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-18 20:30:53 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.pavg.b.256(<32 x i8> %x0, <32 x i8> %x1, <32 x i8> %x2, i32 %x3)
|
|
|
|
%res1 = call <32 x i8> @llvm.x86.avx512.mask.pavg.b.256(<32 x i8> %x0, <32 x i8> %x1, <32 x i8> %x2, i32 -1)
|
|
|
|
%res2 = add <32 x i8> %res, %res1
|
|
|
|
ret <32 x i8> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.pavg.w.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_pavg_w_128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pavg_w_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpavgw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe3,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpavgw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe3,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-18 20:30:53 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.pavg.w.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.pavg.w.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.pavg.w.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_pavg_w_256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pavg_w_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpavgw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe3,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpavgw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe3,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-18 20:30:53 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.pavg.w.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.pavg.w.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
2015-06-22 21:00:42 +08:00
|
|
|
|
2015-06-23 16:19:46 +08:00
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pabs.b.128(<16 x i8>, <16 x i8>, i16)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pabs_b_128(<16 x i8> %x0, <16 x i8> %x1, i16 %x2) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pabs_b_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpabsb %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x1c,0xc8]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpabsb %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x1c,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfc,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-23 16:19:46 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.pabs.b.128(<16 x i8> %x0, <16 x i8> %x1, i16 %x2)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pabs.b.128(<16 x i8> %x0, <16 x i8> %x1, i16 -1)
|
|
|
|
%res2 = add <16 x i8> %res, %res1
|
|
|
|
ret <16 x i8> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <32 x i8> @llvm.x86.avx512.mask.pabs.b.256(<32 x i8>, <32 x i8>, i32)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <32 x i8>@test_int_x86_avx512_mask_pabs_b_256(<32 x i8> %x0, <32 x i8> %x1, i32 %x2) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pabs_b_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpabsb %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x1c,0xc8]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpabsb %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x1c,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddb %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfc,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-23 16:19:46 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.pabs.b.256(<32 x i8> %x0, <32 x i8> %x1, i32 %x2)
|
|
|
|
%res1 = call <32 x i8> @llvm.x86.avx512.mask.pabs.b.256(<32 x i8> %x0, <32 x i8> %x1, i32 -1)
|
|
|
|
%res2 = add <32 x i8> %res, %res1
|
|
|
|
ret <32 x i8> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.pabs.w.128(<8 x i16>, <8 x i16>, i8)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_pabs_w_128(<8 x i16> %x0, <8 x i16> %x1, i8 %x2) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pabs_w_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpabsw %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x1d,0xc8]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpabsw %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x1d,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-23 16:19:46 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.pabs.w.128(<8 x i16> %x0, <8 x i16> %x1, i8 %x2)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.pabs.w.128(<8 x i16> %x0, <8 x i16> %x1, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.pabs.w.256(<16 x i16>, <16 x i16>, i16)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_pabs_w_256(<16 x i16> %x0, <16 x i16> %x1, i16 %x2) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pabs_w_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpabsw %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x1d,0xc8]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpabsw %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x1d,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-06-23 16:19:46 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.pabs.w.256(<16 x i16> %x0, <16 x i16> %x1, i16 %x2)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.pabs.w.256(<16 x i16> %x0, <16 x i16> %x1, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
|
|
|
|
2015-07-05 20:23:20 +08:00
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.pmulhu.w.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_pmulhu_w_128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmulhu_w_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmulhuw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe4,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmulhuw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe4,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-05 20:23:20 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.pmulhu.w.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.pmulhu.w.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.pmulhu.w.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_pmulhu_w_256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmulhu_w_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmulhuw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe4,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmulhuw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe4,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-05 20:23:20 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.pmulhu.w.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.pmulhu.w.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.pmulh.w.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
2016-05-13 22:47:55 +08:00
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_pmulh_w_128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmulh_w_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmulhw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe5,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmulhw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe5,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-05 20:23:20 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.pmulh.w.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.pmulh.w.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.pmulh.w.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
2016-05-13 22:47:55 +08:00
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_pmulh_w_256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmulh_w_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmulhw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe5,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmulhw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe5,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-05 20:23:20 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.pmulh.w.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.pmulh.w.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
2015-07-06 22:03:40 +08:00
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.pmul.hr.sw.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
2016-05-13 22:47:55 +08:00
|
|
|
|
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_pmulhr_sw_128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmulhr_sw_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmulhrsw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x0b,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmulhrsw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x0b,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-06 22:03:40 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.pmul.hr.sw.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.pmul.hr.sw.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.pmul.hr.sw.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
2016-05-13 22:47:55 +08:00
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_pmulhr_sw_256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmulhr_sw_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmulhrsw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x0b,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmulhrsw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x0b,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-06 22:03:40 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.pmul.hr.sw.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.pmul.hr.sw.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
2015-07-21 15:11:28 +08:00
|
|
|
|
2015-07-25 01:24:15 +08:00
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pmov.wb.128(<8 x i16>, <16 x i8>, i8)
|
|
|
|
|
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pmov_wb_128(<8 x i16> %x0, <16 x i8> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmov_wb_128:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovwb %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7e,0x89,0x30,0xc2]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmovwb %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7e,0x09,0x30,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovwb %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7e,0x08,0x30,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
%res0 = call <16 x i8> @llvm.x86.avx512.mask.pmov.wb.128(<8 x i16> %x0, <16 x i8> %x1, i8 -1)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pmov.wb.128(<8 x i16> %x0, <16 x i8> %x1, i8 %x2)
|
|
|
|
%res2 = call <16 x i8> @llvm.x86.avx512.mask.pmov.wb.128(<8 x i16> %x0, <16 x i8> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = add <16 x i8> %res0, %res1
|
|
|
|
%res4 = add <16 x i8> %res3, %res2
|
|
|
|
ret <16 x i8> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.pmov.wb.mem.128(i8* %ptr, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define void @test_int_x86_avx512_mask_pmov_wb_mem_128(i8* %ptr, <8 x i16> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmov_wb_mem_128:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovwb %xmm0, (%rdi) ## encoding: [0x62,0xf2,0x7e,0x08,0x30,0x07]
|
|
|
|
; CHECK-NEXT: vpmovwb %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf2,0x7e,0x09,0x30,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
call void @llvm.x86.avx512.mask.pmov.wb.mem.128(i8* %ptr, <8 x i16> %x1, i8 -1)
|
|
|
|
call void @llvm.x86.avx512.mask.pmov.wb.mem.128(i8* %ptr, <8 x i16> %x1, i8 %x2)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pmovs.wb.128(<8 x i16>, <16 x i8>, i8)
|
|
|
|
|
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pmovs_wb_128(<8 x i16> %x0, <16 x i8> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovs_wb_128:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7e,0x89,0x20,0xc2]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7e,0x09,0x20,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7e,0x08,0x20,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
%res0 = call <16 x i8> @llvm.x86.avx512.mask.pmovs.wb.128(<8 x i16> %x0, <16 x i8> %x1, i8 -1)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pmovs.wb.128(<8 x i16> %x0, <16 x i8> %x1, i8 %x2)
|
|
|
|
%res2 = call <16 x i8> @llvm.x86.avx512.mask.pmovs.wb.128(<8 x i16> %x0, <16 x i8> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = add <16 x i8> %res0, %res1
|
|
|
|
%res4 = add <16 x i8> %res3, %res2
|
|
|
|
ret <16 x i8> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.pmovs.wb.mem.128(i8* %ptr, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define void @test_int_x86_avx512_mask_pmovs_wb_mem_128(i8* %ptr, <8 x i16> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovs_wb_mem_128:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-12-21 18:43:36 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %xmm0, (%rdi) ## encoding: [0x62,0xf2,0x7e,0x08,0x20,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf2,0x7e,0x09,0x20,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
call void @llvm.x86.avx512.mask.pmovs.wb.mem.128(i8* %ptr, <8 x i16> %x1, i8 -1)
|
|
|
|
call void @llvm.x86.avx512.mask.pmovs.wb.mem.128(i8* %ptr, <8 x i16> %x1, i8 %x2)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pmovus.wb.128(<8 x i16>, <16 x i8>, i8)
|
|
|
|
|
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pmovus_wb_128(<8 x i16> %x0, <16 x i8> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovus_wb_128:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7e,0x89,0x10,0xc2]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7e,0x09,0x10,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7e,0x08,0x10,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
%res0 = call <16 x i8> @llvm.x86.avx512.mask.pmovus.wb.128(<8 x i16> %x0, <16 x i8> %x1, i8 -1)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pmovus.wb.128(<8 x i16> %x0, <16 x i8> %x1, i8 %x2)
|
|
|
|
%res2 = call <16 x i8> @llvm.x86.avx512.mask.pmovus.wb.128(<8 x i16> %x0, <16 x i8> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = add <16 x i8> %res0, %res1
|
|
|
|
%res4 = add <16 x i8> %res3, %res2
|
|
|
|
ret <16 x i8> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.pmovus.wb.mem.128(i8* %ptr, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define void @test_int_x86_avx512_mask_pmovus_wb_mem_128(i8* %ptr, <8 x i16> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovus_wb_mem_128:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-12-21 18:43:36 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %xmm0, (%rdi) ## encoding: [0x62,0xf2,0x7e,0x08,0x10,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf2,0x7e,0x09,0x10,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
call void @llvm.x86.avx512.mask.pmovus.wb.mem.128(i8* %ptr, <8 x i16> %x1, i8 -1)
|
|
|
|
call void @llvm.x86.avx512.mask.pmovus.wb.mem.128(i8* %ptr, <8 x i16> %x1, i8 %x2)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pmov.wb.256(<16 x i16>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pmov_wb_256(<16 x i16> %x0, <16 x i8> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmov_wb_256:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovwb %ymm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7e,0xa9,0x30,0xc2]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmovwb %ymm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7e,0x29,0x30,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovwb %ymm0, %xmm0 ## encoding: [0x62,0xf2,0x7e,0x28,0x30,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
%res0 = call <16 x i8> @llvm.x86.avx512.mask.pmov.wb.256(<16 x i16> %x0, <16 x i8> %x1, i16 -1)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pmov.wb.256(<16 x i16> %x0, <16 x i8> %x1, i16 %x2)
|
|
|
|
%res2 = call <16 x i8> @llvm.x86.avx512.mask.pmov.wb.256(<16 x i16> %x0, <16 x i8> zeroinitializer, i16 %x2)
|
|
|
|
%res3 = add <16 x i8> %res0, %res1
|
|
|
|
%res4 = add <16 x i8> %res3, %res2
|
|
|
|
ret <16 x i8> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.pmov.wb.mem.256(i8* %ptr, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define void @test_int_x86_avx512_mask_pmov_wb_mem_256(i8* %ptr, <16 x i16> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmov_wb_mem_256:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovwb %ymm0, (%rdi) ## encoding: [0x62,0xf2,0x7e,0x28,0x30,0x07]
|
|
|
|
; CHECK-NEXT: vpmovwb %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf2,0x7e,0x29,0x30,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
call void @llvm.x86.avx512.mask.pmov.wb.mem.256(i8* %ptr, <16 x i16> %x1, i16 -1)
|
|
|
|
call void @llvm.x86.avx512.mask.pmov.wb.mem.256(i8* %ptr, <16 x i16> %x1, i16 %x2)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pmovs.wb.256(<16 x i16>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pmovs_wb_256(<16 x i16> %x0, <16 x i8> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovs_wb_256:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %ymm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7e,0xa9,0x20,0xc2]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %ymm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7e,0x29,0x20,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %ymm0, %xmm0 ## encoding: [0x62,0xf2,0x7e,0x28,0x20,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
%res0 = call <16 x i8> @llvm.x86.avx512.mask.pmovs.wb.256(<16 x i16> %x0, <16 x i8> %x1, i16 -1)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pmovs.wb.256(<16 x i16> %x0, <16 x i8> %x1, i16 %x2)
|
|
|
|
%res2 = call <16 x i8> @llvm.x86.avx512.mask.pmovs.wb.256(<16 x i16> %x0, <16 x i8> zeroinitializer, i16 %x2)
|
|
|
|
%res3 = add <16 x i8> %res0, %res1
|
|
|
|
%res4 = add <16 x i8> %res3, %res2
|
|
|
|
ret <16 x i8> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.pmovs.wb.mem.256(i8* %ptr, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define void @test_int_x86_avx512_mask_pmovs_wb_mem_256(i8* %ptr, <16 x i16> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovs_wb_mem_256:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-12-21 18:43:36 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %ymm0, (%rdi) ## encoding: [0x62,0xf2,0x7e,0x28,0x20,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovswb %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf2,0x7e,0x29,0x20,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
call void @llvm.x86.avx512.mask.pmovs.wb.mem.256(i8* %ptr, <16 x i16> %x1, i16 -1)
|
|
|
|
call void @llvm.x86.avx512.mask.pmovs.wb.mem.256(i8* %ptr, <16 x i16> %x1, i16 %x2)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pmovus.wb.256(<16 x i16>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pmovus_wb_256(<16 x i16> %x0, <16 x i8> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovus_wb_256:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %ymm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7e,0xa9,0x10,0xc2]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %ymm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7e,0x29,0x10,0xc1]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %ymm0, %xmm0 ## encoding: [0x62,0xf2,0x7e,0x28,0x10,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfc,0xc2]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
%res0 = call <16 x i8> @llvm.x86.avx512.mask.pmovus.wb.256(<16 x i16> %x0, <16 x i8> %x1, i16 -1)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pmovus.wb.256(<16 x i16> %x0, <16 x i8> %x1, i16 %x2)
|
|
|
|
%res2 = call <16 x i8> @llvm.x86.avx512.mask.pmovus.wb.256(<16 x i16> %x0, <16 x i8> zeroinitializer, i16 %x2)
|
|
|
|
%res3 = add <16 x i8> %res0, %res1
|
|
|
|
%res4 = add <16 x i8> %res3, %res2
|
|
|
|
ret <16 x i8> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.pmovus.wb.mem.256(i8* %ptr, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define void @test_int_x86_avx512_mask_pmovus_wb_mem_256(i8* %ptr, <16 x i16> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovus_wb_mem_256:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-12-21 18:43:36 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %ymm0, (%rdi) ## encoding: [0x62,0xf2,0x7e,0x28,0x10,0x07]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovuswb %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf2,0x7e,0x29,0x10,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-25 01:24:15 +08:00
|
|
|
call void @llvm.x86.avx512.mask.pmovus.wb.mem.256(i8* %ptr, <16 x i16> %x1, i16 -1)
|
|
|
|
call void @llvm.x86.avx512.mask.pmovus.wb.mem.256(i8* %ptr, <16 x i16> %x1, i16 %x2)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-21 15:11:28 +08:00
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pmaddw.d.128(<8 x i16>, <8 x i16>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pmaddw_d_128(<8 x i16> %x0, <8 x i16> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaddw_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmaddwd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xf5,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmaddwd %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xf5,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-21 15:11:28 +08:00
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pmaddw.d.128(<8 x i16> %x0, <8 x i16> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pmaddw.d.128(<8 x i16> %x0, <8 x i16> %x1, <4 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <4 x i32> %res, %res1
|
|
|
|
ret <4 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pmaddw.d.256(<16 x i16>, <16 x i16>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pmaddw_d_256(<16 x i16> %x0, <16 x i16> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaddw_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmaddwd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xf5,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmaddwd %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xf5,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-21 15:11:28 +08:00
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pmaddw.d.256(<16 x i16> %x0, <16 x i16> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pmaddw.d.256(<16 x i16> %x0, <16 x i16> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i32> %res, %res1
|
|
|
|
ret <8 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.pmaddubs.w.128(<16 x i8>, <16 x i8>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_pmaddubs_w_128(<16 x i8> %x0, <16 x i8> %x1, <8 x i16> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaddubs_w_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmaddubsw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x04,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmaddubsw %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x04,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-21 15:11:28 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.pmaddubs.w.128(<16 x i8> %x0, <16 x i8> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.pmaddubs.w.128(<16 x i8> %x0, <16 x i8> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i16> %res, %res1
|
|
|
|
ret <8 x i16> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.pmaddubs.w.256(<32 x i8>, <32 x i8>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_pmaddubs_w_256(<32 x i8> %x0, <32 x i8> %x1, <16 x i16> %x2, i16 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaddubs_w_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmaddubsw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x04,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmaddubsw %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x04,0xc1]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-07-21 15:11:28 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.pmaddubs.w.256(<32 x i8> %x0, <32 x i8> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.pmaddubs.w.256(<32 x i8> %x0, <32 x i8> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res2 = add <16 x i16> %res, %res1
|
|
|
|
ret <16 x i16> %res2
|
|
|
|
}
|
2015-07-26 22:41:44 +08:00
|
|
|
|
2015-08-31 21:09:30 +08:00
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.dbpsadbw.128(<16 x i8>, <16 x i8>, i32, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_dbpsadbw_128(<16 x i8> %x0, <16 x i8> %x1, <8 x i16> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_dbpsadbw_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vdbpsadbw $2, %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf3,0x7d,0x08,0x42,0xd9,0x02]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vdbpsadbw $2, %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf3,0x7d,0x09,0x42,0xd1,0x02]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vdbpsadbw $2, %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf3,0x7d,0x89,0x42,0xc1,0x02]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm3, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe1,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-08-31 21:09:30 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.dbpsadbw.128(<16 x i8> %x0, <16 x i8> %x1, i32 2, <8 x i16> %x3, i8 %x4)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.dbpsadbw.128(<16 x i8> %x0, <16 x i8> %x1, i32 2, <8 x i16> zeroinitializer, i8 %x4)
|
|
|
|
%res2 = call <8 x i16> @llvm.x86.avx512.mask.dbpsadbw.128(<16 x i8> %x0, <16 x i8> %x1, i32 2, <8 x i16> %x3, i8 -1)
|
|
|
|
%res3 = add <8 x i16> %res, %res1
|
|
|
|
%res4 = add <8 x i16> %res2, %res3
|
|
|
|
ret <8 x i16> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.dbpsadbw.256(<32 x i8>, <32 x i8>, i32, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_dbpsadbw_256(<32 x i8> %x0, <32 x i8> %x1, <16 x i16> %x3, i16 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_dbpsadbw_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vdbpsadbw $2, %ymm1, %ymm0, %ymm3 ## encoding: [0x62,0xf3,0x7d,0x28,0x42,0xd9,0x02]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vdbpsadbw $2, %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf3,0x7d,0x29,0x42,0xd1,0x02]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vdbpsadbw $2, %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf3,0x7d,0xa9,0x42,0xc1,0x02]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-08-31 21:09:30 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.dbpsadbw.256(<32 x i8> %x0, <32 x i8> %x1, i32 2, <16 x i16> %x3, i16 %x4)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.dbpsadbw.256(<32 x i8> %x0, <32 x i8> %x1, i32 2, <16 x i16> zeroinitializer, i16 %x4)
|
|
|
|
%res2 = call <16 x i16> @llvm.x86.avx512.mask.dbpsadbw.256(<32 x i8> %x0, <32 x i8> %x1, i32 2, <16 x i16> %x3, i16 -1)
|
|
|
|
%res3 = add <16 x i16> %res, %res1
|
|
|
|
%res4 = add <16 x i16> %res3, %res2
|
|
|
|
ret <16 x i16> %res4
|
|
|
|
}
|
2015-09-02 22:21:54 +08:00
|
|
|
|
2015-12-27 21:56:16 +08:00
|
|
|
declare i16 @llvm.x86.avx512.cvtb2mask.128(<16 x i8>)
|
|
|
|
|
|
|
|
define i16@test_int_x86_avx512_cvtb2mask_128(<16 x i8> %x0) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_cvtb2mask_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovb2m %xmm0, %k0 ## encoding: [0x62,0xf2,0x7e,0x08,0x29,0xc0]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: ## kill: %AX<def> %AX<kill> %EAX<kill>
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-12-27 21:56:16 +08:00
|
|
|
%res = call i16 @llvm.x86.avx512.cvtb2mask.128(<16 x i8> %x0)
|
|
|
|
ret i16 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @llvm.x86.avx512.cvtb2mask.256(<32 x i8>)
|
|
|
|
|
|
|
|
define i32@test_int_x86_avx512_cvtb2mask_256(<32 x i8> %x0) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_cvtb2mask_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovb2m %ymm0, %k0 ## encoding: [0x62,0xf2,0x7e,0x28,0x29,0xc0]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-12-27 21:56:16 +08:00
|
|
|
%res = call i32 @llvm.x86.avx512.cvtb2mask.256(<32 x i8> %x0)
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.cvtw2mask.128(<8 x i16>)
|
|
|
|
|
|
|
|
define i8@test_int_x86_avx512_cvtw2mask_128(<8 x i16> %x0) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_cvtw2mask_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovw2m %xmm0, %k0 ## encoding: [0x62,0xf2,0xfe,0x08,0x29,0xc0]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: ## kill: %AL<def> %AL<kill> %EAX<kill>
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-12-27 21:56:16 +08:00
|
|
|
%res = call i8 @llvm.x86.avx512.cvtw2mask.128(<8 x i16> %x0)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i16 @llvm.x86.avx512.cvtw2mask.256(<16 x i16>)
|
|
|
|
|
|
|
|
define i16@test_int_x86_avx512_cvtw2mask_256(<16 x i16> %x0) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_cvtw2mask_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpmovw2m %ymm0, %k0 ## encoding: [0x62,0xf2,0xfe,0x28,0x29,0xc0]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: ## kill: %AX<def> %AX<kill> %EAX<kill>
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2015-12-27 21:56:16 +08:00
|
|
|
%res = call i16 @llvm.x86.avx512.cvtw2mask.256(<16 x i16> %x0)
|
|
|
|
ret i16 %res
|
|
|
|
}
|
|
|
|
|
2016-01-04 19:39:06 +08:00
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.psrlv16.hi(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_psrlv16_hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrlv16_hi:
|
|
|
|
; CHECK: ## BB#0:
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsrlvw %ymm1, %ymm0, %ymm3 ## encoding: [0x62,0xf2,0xfd,0x28,0x10,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsrlvw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x10,0xd1]
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsrlvw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x10,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-04 19:39:06 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psrlv16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.psrlv16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> zeroinitializer, i16 %x3)
|
|
|
|
%res2 = call <16 x i16> @llvm.x86.avx512.mask.psrlv16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res3 = add <16 x i16> %res, %res1
|
|
|
|
%res4 = add <16 x i16> %res3, %res2
|
|
|
|
ret <16 x i16> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.psrlv8.hi(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_psrlv8_hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrlv8_hi:
|
|
|
|
; CHECK: ## BB#0:
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsrlvw %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x10,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsrlvw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x10,0xd1]
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsrlvw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x10,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-04 19:39:06 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psrlv8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.psrlv8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i16> @llvm.x86.avx512.mask.psrlv8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i16> %res, %res1
|
|
|
|
%res4 = add <8 x i16> %res3, %res2
|
|
|
|
ret <8 x i16> %res4
|
|
|
|
}
|
2016-01-04 20:50:36 +08:00
|
|
|
|
2016-01-07 22:42:20 +08:00
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.psrav16.hi(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_psrav16_hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrav16_hi:
|
|
|
|
; CHECK: ## BB#0:
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsravw %ymm1, %ymm0, %ymm3 ## encoding: [0x62,0xf2,0xfd,0x28,0x11,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsravw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x11,0xd1]
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsravw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x11,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-07 22:42:20 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psrav16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.psrav16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> zeroinitializer, i16 %x3)
|
|
|
|
%res2 = call <16 x i16> @llvm.x86.avx512.mask.psrav16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res3 = add <16 x i16> %res, %res1
|
|
|
|
%res4 = add <16 x i16> %res3, %res2
|
|
|
|
ret <16 x i16> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.psrav8.hi(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_psrav8_hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrav8_hi:
|
|
|
|
; CHECK: ## BB#0:
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsravw %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x11,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsravw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x11,0xd1]
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsravw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x11,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-07 22:42:20 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psrav8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.psrav8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i16> @llvm.x86.avx512.mask.psrav8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i16> %res, %res1
|
|
|
|
%res4 = add <8 x i16> %res3, %res2
|
|
|
|
ret <8 x i16> %res4
|
2016-01-08 00:02:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.psllv16.hi(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_psllv16_hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psllv16_hi:
|
|
|
|
; CHECK: ## BB#0:
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsllvw %ymm1, %ymm0, %ymm3 ## encoding: [0x62,0xf2,0xfd,0x28,0x12,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsllvw %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x12,0xd1]
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsllvw %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x12,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-08 00:02:51 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.psllv16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.psllv16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> zeroinitializer, i16 %x3)
|
|
|
|
%res2 = call <16 x i16> @llvm.x86.avx512.mask.psllv16.hi(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res3 = add <16 x i16> %res, %res1
|
|
|
|
%res4 = add <16 x i16> %res3, %res2
|
|
|
|
ret <16 x i16> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.psllv8.hi(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_psllv8_hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psllv8_hi:
|
|
|
|
; CHECK: ## BB#0:
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsllvw %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x12,0xd9]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpsllvw %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x12,0xd1]
|
2016-11-18 13:04:44 +08:00
|
|
|
; CHECK-NEXT: vpsllvw %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x12,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-08 00:02:51 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.psllv8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.psllv8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i16> @llvm.x86.avx512.mask.psllv8.hi(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i16> %res, %res1
|
|
|
|
%res4 = add <8 x i16> %res3, %res2
|
|
|
|
ret <8 x i16> %res4
|
2016-01-13 22:25:21 +08:00
|
|
|
}
|
|
|
|
|
2016-01-17 19:33:29 +08:00
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.permvar.hi.128(<8 x i16>, <8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_permvar_hi_128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_permvar_hi_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermw %xmm0, %xmm1, %xmm3 ## encoding: [0x62,0xf2,0xf5,0x08,0x8d,0xd8]
|
2016-05-24 19:06:22 +08:00
|
|
|
; CHECK-NEXT: vpermw %xmm0, %xmm1, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xf5,0x09,0x8d,0xd0]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpermw %xmm0, %xmm1, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xf5,0x89,0x8d,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-17 19:33:29 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.permvar.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.permvar.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i16> @llvm.x86.avx512.mask.permvar.hi.128(<8 x i16> %x0, <8 x i16> %x1, <8 x i16> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i16> %res, %res1
|
|
|
|
%res4 = add <8 x i16> %res3, %res2
|
|
|
|
ret <8 x i16> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.permvar.hi.256(<16 x i16>, <16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_permvar_hi_256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_permvar_hi_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermw %ymm0, %ymm1, %ymm3 ## encoding: [0x62,0xf2,0xf5,0x28,0x8d,0xd8]
|
2016-05-24 19:06:22 +08:00
|
|
|
; CHECK-NEXT: vpermw %ymm0, %ymm1, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xf5,0x29,0x8d,0xd0]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpermw %ymm0, %ymm1, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xf5,0xa9,0x8d,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfd,0xc3]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-17 19:33:29 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.permvar.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 %x3)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.permvar.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> zeroinitializer, i16 %x3)
|
|
|
|
%res2 = call <16 x i16> @llvm.x86.avx512.mask.permvar.hi.256(<16 x i16> %x0, <16 x i16> %x1, <16 x i16> %x2, i16 -1)
|
|
|
|
%res3 = add <16 x i16> %res, %res1
|
|
|
|
%res4 = add <16 x i16> %res3, %res2
|
|
|
|
ret <16 x i16> %res4
|
|
|
|
}
|
2016-01-18 21:52:57 +08:00
|
|
|
|
2016-01-25 21:27:32 +08:00
|
|
|
declare i16 @llvm.x86.avx512.ptestm.b.128(<16 x i8>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define i16@test_int_x86_avx512_ptestm_b_128(<16 x i8> %x0, <16 x i8> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_ptestm_b_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: vptestmb %xmm1, %xmm0, %k0 ## encoding: [0x62,0xf2,0x7d,0x08,0x26,0xc1]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %ecx ## encoding: [0xc5,0xfb,0x93,0xc8]
|
|
|
|
; CHECK-NEXT: vptestmb %xmm1, %xmm0, %k0 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: addl %ecx, %eax ## encoding: [0x01,0xc8]
|
2016-07-09 08:19:07 +08:00
|
|
|
; CHECK-NEXT: ## kill: %AX<def> %AX<kill> %EAX<kill>
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i16 @llvm.x86.avx512.ptestm.b.128(<16 x i8> %x0, <16 x i8> %x1, i16 %x2)
|
|
|
|
%res1 = call i16 @llvm.x86.avx512.ptestm.b.128(<16 x i8> %x0, <16 x i8> %x1, i16-1)
|
|
|
|
%res2 = add i16 %res, %res1
|
|
|
|
ret i16 %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @llvm.x86.avx512.ptestm.b.256(<32 x i8>, <32 x i8>, i32)
|
|
|
|
|
|
|
|
define i32@test_int_x86_avx512_ptestm_b_256(<32 x i8> %x0, <32 x i8> %x1, i32 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_ptestm_b_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vptestmb %ymm1, %ymm0, %k0 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %ecx ## encoding: [0xc5,0xfb,0x93,0xc8]
|
|
|
|
; CHECK-NEXT: vptestmb %ymm1, %ymm0, %k0 ## encoding: [0x62,0xf2,0x7d,0x28,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: addl %ecx, %eax ## encoding: [0x01,0xc8]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i32 @llvm.x86.avx512.ptestm.b.256(<32 x i8> %x0, <32 x i8> %x1, i32 %x2)
|
|
|
|
%res1 = call i32 @llvm.x86.avx512.ptestm.b.256(<32 x i8> %x0, <32 x i8> %x1, i32-1)
|
|
|
|
%res2 = add i32 %res, %res1
|
|
|
|
ret i32 %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.ptestm.w.128(<8 x i16>, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define i8@test_int_x86_avx512_ptestm_w_128(<8 x i16> %x0, <8 x i16> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_ptestm_w_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: vptestmw %xmm1, %xmm0, %k0 ## encoding: [0x62,0xf2,0xfd,0x08,0x26,0xc1]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %ecx ## encoding: [0xc5,0xfb,0x93,0xc8]
|
|
|
|
; CHECK-NEXT: vptestmw %xmm1, %xmm0, %k0 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: addb %cl, %al ## encoding: [0x00,0xc8]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: ## kill: %AL<def> %AL<kill> %EAX<kill>
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.ptestm.w.128(<8 x i16> %x0, <8 x i16> %x1, i8 %x2)
|
|
|
|
%res1 = call i8 @llvm.x86.avx512.ptestm.w.128(<8 x i16> %x0, <8 x i16> %x1, i8-1)
|
|
|
|
%res2 = add i8 %res, %res1
|
|
|
|
ret i8 %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i16 @llvm.x86.avx512.ptestm.w.256(<16 x i16>, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define i16@test_int_x86_avx512_ptestm_w_256(<16 x i16> %x0, <16 x i16> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_ptestm_w_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: vptestmw %ymm1, %ymm0, %k0 ## encoding: [0x62,0xf2,0xfd,0x28,0x26,0xc1]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %ecx ## encoding: [0xc5,0xfb,0x93,0xc8]
|
|
|
|
; CHECK-NEXT: vptestmw %ymm1, %ymm0, %k0 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: addl %ecx, %eax ## encoding: [0x01,0xc8]
|
2016-07-09 08:19:07 +08:00
|
|
|
; CHECK-NEXT: ## kill: %AX<def> %AX<kill> %EAX<kill>
|
2016-01-25 21:27:32 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i16 @llvm.x86.avx512.ptestm.w.256(<16 x i16> %x0, <16 x i16> %x1, i16 %x2)
|
|
|
|
%res1 = call i16 @llvm.x86.avx512.ptestm.w.256(<16 x i16> %x0, <16 x i16> %x1, i16-1)
|
|
|
|
%res2 = add i16 %res, %res1
|
|
|
|
ret i16 %res2
|
|
|
|
}
|
2016-01-25 22:43:23 +08:00
|
|
|
|
|
|
|
declare i16 @llvm.x86.avx512.ptestnm.b.128(<16 x i8>, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define i16@test_int_x86_avx512_ptestnm_b_128(<16 x i8> %x0, <16 x i8> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_ptestnm_b_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vptestnmb %xmm1, %xmm0, %k0 ## encoding: [0x62,0xf2,0x7e,0x08,0x26,0xc1]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %ecx ## encoding: [0xc5,0xfb,0x93,0xc8]
|
|
|
|
; CHECK-NEXT: vptestnmb %xmm1, %xmm0, %k0 {%k1} ## encoding: [0x62,0xf2,0x7e,0x09,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: addl %ecx, %eax ## encoding: [0x01,0xc8]
|
2016-07-09 08:19:07 +08:00
|
|
|
; CHECK-NEXT: ## kill: %AX<def> %AX<kill> %EAX<kill>
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-25 22:43:23 +08:00
|
|
|
%res = call i16 @llvm.x86.avx512.ptestnm.b.128(<16 x i8> %x0, <16 x i8> %x1, i16 %x2)
|
|
|
|
%res1 = call i16 @llvm.x86.avx512.ptestnm.b.128(<16 x i8> %x0, <16 x i8> %x1, i16-1)
|
|
|
|
%res2 = add i16 %res, %res1
|
|
|
|
ret i16 %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @llvm.x86.avx512.ptestnm.b.256(<32 x i8>, <32 x i8>, i32)
|
|
|
|
|
|
|
|
define i32@test_int_x86_avx512_ptestnm_b_256(<32 x i8> %x0, <32 x i8> %x1, i32 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_ptestnm_b_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vptestnmb %ymm1, %ymm0, %k0 {%k1} ## encoding: [0x62,0xf2,0x7e,0x29,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %ecx ## encoding: [0xc5,0xfb,0x93,0xc8]
|
|
|
|
; CHECK-NEXT: vptestnmb %ymm1, %ymm0, %k0 ## encoding: [0x62,0xf2,0x7e,0x28,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: addl %ecx, %eax ## encoding: [0x01,0xc8]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-25 22:43:23 +08:00
|
|
|
%res = call i32 @llvm.x86.avx512.ptestnm.b.256(<32 x i8> %x0, <32 x i8> %x1, i32 %x2)
|
|
|
|
%res1 = call i32 @llvm.x86.avx512.ptestnm.b.256(<32 x i8> %x0, <32 x i8> %x1, i32-1)
|
|
|
|
%res2 = add i32 %res, %res1
|
|
|
|
ret i32 %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.ptestnm.w.128(<8 x i16>, <8 x i16>, i8 %x2)
|
|
|
|
|
|
|
|
define i8@test_int_x86_avx512_ptestnm_w_128(<8 x i16> %x0, <8 x i16> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_ptestnm_w_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vptestnmw %xmm1, %xmm0, %k0 ## encoding: [0x62,0xf2,0xfe,0x08,0x26,0xc1]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %ecx ## encoding: [0xc5,0xfb,0x93,0xc8]
|
|
|
|
; CHECK-NEXT: vptestnmw %xmm1, %xmm0, %k0 {%k1} ## encoding: [0x62,0xf2,0xfe,0x09,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: addb %cl, %al ## encoding: [0x00,0xc8]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: ## kill: %AL<def> %AL<kill> %EAX<kill>
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-25 22:43:23 +08:00
|
|
|
%res = call i8 @llvm.x86.avx512.ptestnm.w.128(<8 x i16> %x0, <8 x i16> %x1, i8 %x2)
|
|
|
|
%res1 = call i8 @llvm.x86.avx512.ptestnm.w.128(<8 x i16> %x0, <8 x i16> %x1, i8-1)
|
|
|
|
%res2 = add i8 %res, %res1
|
|
|
|
ret i8 %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i16 @llvm.x86.avx512.ptestnm.w.256(<16 x i16>, <16 x i16>, i16 %x2)
|
|
|
|
|
|
|
|
define i16@test_int_x86_avx512_ptestnm_w_256(<16 x i16> %x0, <16 x i16> %x1, i16 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_ptestnm_w_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vptestnmw %ymm1, %ymm0, %k0 ## encoding: [0x62,0xf2,0xfe,0x28,0x26,0xc1]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, %ecx ## encoding: [0xc5,0xfb,0x93,0xc8]
|
|
|
|
; CHECK-NEXT: vptestnmw %ymm1, %ymm0, %k0 {%k1} ## encoding: [0x62,0xf2,0xfe,0x29,0x26,0xc1]
|
|
|
|
; CHECK-NEXT: kmovd %k0, %eax ## encoding: [0xc5,0xfb,0x93,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: addl %ecx, %eax ## encoding: [0x01,0xc8]
|
2016-07-09 08:19:07 +08:00
|
|
|
; CHECK-NEXT: ## kill: %AX<def> %AX<kill> %EAX<kill>
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-01-25 22:43:23 +08:00
|
|
|
%res = call i16 @llvm.x86.avx512.ptestnm.w.256(<16 x i16> %x0, <16 x i16> %x1, i16 %x2)
|
|
|
|
%res1 = call i16 @llvm.x86.avx512.ptestnm.w.256(<16 x i16> %x0, <16 x i16> %x1, i16-1)
|
|
|
|
%res2 = add i16 %res, %res1
|
|
|
|
ret i16 %res2
|
|
|
|
}
|
|
|
|
|
2016-02-07 16:30:50 +08:00
|
|
|
declare <32 x i8> @llvm.x86.avx512.mask.pbroadcast.b.gpr.256(i8, <32 x i8>, i32)
|
|
|
|
|
|
|
|
define <32 x i8>@test_int_x86_avx512_mask_pbroadcast_b_gpr_256(i8 %x0, <32 x i8> %x1, i32 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pbroadcast_b_gpr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpbroadcastb %dil, %ymm0 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x7a,0xc7]
|
|
|
|
; CHECK-NEXT: vpbroadcastb %dil, %ymm1 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x7a,0xcf]
|
|
|
|
; CHECK-NEXT: vpbroadcastb %dil, %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x7a,0xd7]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddb %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfc,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddb %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfc,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-02-07 16:30:50 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx512.mask.pbroadcast.b.gpr.256(i8 %x0, <32 x i8> %x1, i32 -1)
|
|
|
|
%res1 = call <32 x i8> @llvm.x86.avx512.mask.pbroadcast.b.gpr.256(i8 %x0, <32 x i8> %x1, i32 %mask)
|
|
|
|
%res2 = call <32 x i8> @llvm.x86.avx512.mask.pbroadcast.b.gpr.256(i8 %x0, <32 x i8> zeroinitializer, i32 %mask)
|
|
|
|
%res3 = add <32 x i8> %res, %res1
|
|
|
|
%res4 = add <32 x i8> %res2, %res3
|
|
|
|
ret <32 x i8> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.x86.avx512.mask.pbroadcast.b.gpr.128(i8, <16 x i8>, i16)
|
|
|
|
|
|
|
|
define <16 x i8>@test_int_x86_avx512_mask_pbroadcast_b_gpr_128(i8 %x0, <16 x i8> %x1, i16 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pbroadcast_b_gpr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastb %dil, %xmm1 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x7a,0xcf]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastb %dil, %xmm0 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x7a,0xc7]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastb %dil, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x7a,0xd7]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddb %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfc,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddb %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfc,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-02-07 16:30:50 +08:00
|
|
|
%res = call <16 x i8> @llvm.x86.avx512.mask.pbroadcast.b.gpr.128(i8 %x0, <16 x i8> %x1, i16 -1)
|
|
|
|
%res1 = call <16 x i8> @llvm.x86.avx512.mask.pbroadcast.b.gpr.128(i8 %x0, <16 x i8> %x1, i16 %mask)
|
|
|
|
%res2 = call <16 x i8> @llvm.x86.avx512.mask.pbroadcast.b.gpr.128(i8 %x0, <16 x i8> zeroinitializer, i16 %mask)
|
|
|
|
%res3 = add <16 x i8> %res, %res1
|
|
|
|
%res4 = add <16 x i8> %res2, %res3
|
|
|
|
ret <16 x i8> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x i16> @llvm.x86.avx512.mask.pbroadcast.w.gpr.256(i16, <16 x i16>, i16)
|
|
|
|
|
|
|
|
define <16 x i16>@test_int_x86_avx512_mask_pbroadcast_w_gpr_256(i16 %x0, <16 x i16> %x1, i16 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pbroadcast_w_gpr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastw %di, %ymm1 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x7b,0xcf]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastw %di, %ymm0 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x7b,0xc7]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastw %di, %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x7b,0xd7]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-02-07 16:30:50 +08:00
|
|
|
%res = call <16 x i16> @llvm.x86.avx512.mask.pbroadcast.w.gpr.256(i16 %x0, <16 x i16> %x1, i16 -1)
|
|
|
|
%res1 = call <16 x i16> @llvm.x86.avx512.mask.pbroadcast.w.gpr.256(i16 %x0, <16 x i16> %x1, i16 %mask)
|
|
|
|
%res2 = call <16 x i16> @llvm.x86.avx512.mask.pbroadcast.w.gpr.256(i16 %x0, <16 x i16> zeroinitializer, i16 %mask)
|
|
|
|
%res3 = add <16 x i16> %res, %res1
|
|
|
|
%res4 = add <16 x i16> %res2, %res3
|
|
|
|
ret <16 x i16> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i16> @llvm.x86.avx512.mask.pbroadcast.w.gpr.128(i16, <8 x i16>, i8)
|
|
|
|
|
|
|
|
define <8 x i16>@test_int_x86_avx512_mask_pbroadcast_w_gpr_128(i16 %x0, <8 x i16> %x1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pbroadcast_w_gpr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: kmovd %esi, %k1 ## encoding: [0xc5,0xfb,0x92,0xce]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastw %di, %xmm1 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x7b,0xcf]
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastw %di, %xmm0 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x7b,0xc7]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastw %di, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x7b,0xd7]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfd,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddw %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfd,0xc0]
|
2016-05-21 13:46:58 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
2016-02-07 16:30:50 +08:00
|
|
|
%res = call <8 x i16> @llvm.x86.avx512.mask.pbroadcast.w.gpr.128(i16 %x0, <8 x i16> %x1, i8 -1)
|
|
|
|
%res1 = call <8 x i16> @llvm.x86.avx512.mask.pbroadcast.w.gpr.128(i16 %x0, <8 x i16> %x1, i8 %mask)
|
|
|
|
%res2 = call <8 x i16> @llvm.x86.avx512.mask.pbroadcast.w.gpr.128(i16 %x0, <8 x i16> zeroinitializer, i8 %mask)
|
|
|
|
%res3 = add <8 x i16> %res, %res1
|
|
|
|
%res4 = add <8 x i16> %res2, %res3
|
|
|
|
ret <8 x i16> %res4
|
|
|
|
}
|