2016-07-02 22:42:35 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2016-05-31 09:50:02 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512vl --show-mc-encoding| FileCheck %s
|
|
|
|
|
2016-07-05 21:58:47 +08:00
|
|
|
declare <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_pbroadcastd_256(<4 x i32> %x0, <8 x i32> %x1, i8 %mask, i32 * %y_ptr) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpbroadcastd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x58,0xc8]
|
|
|
|
; CHECK-NEXT: vpbroadcastd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd (%rsi){1to8}, %ymm1, %ymm1 ## encoding: [0x62,0xf1,0x75,0x38,0xfe,0x0e]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc1]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%y_32 = load i32, i32 * %y_ptr
|
|
|
|
%y = insertelement <4 x i32> undef, i32 %y_32, i32 0
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %y, <8 x i32> %x1, i8 -1)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %x0, <8 x i32> %x1, i8 %mask)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %x0, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res2, %res3
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_pbroadcastd_128(<4 x i32> %x0, <4 x i32> %x1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastd %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x58,0xd0]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpbroadcastd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x58,0xc8]
|
|
|
|
; CHECK-NEXT: vpbroadcastd %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x58,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm1, %xmm2, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc9]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc1]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> %x1, i8 -1)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> %x1, i8 %mask)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res2, %res3
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_pbroadcastq_256(<2 x i64> %x0, <4 x i64> %x1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastq %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x59,0xd0]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpbroadcastq %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x59,0xc8]
|
|
|
|
; CHECK-NEXT: vpbroadcastq %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x59,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm1, %ymm2, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc9]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc1]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> %x1,i8 -1)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> %x1,i8 %mask)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> zeroinitializer,i8 %mask)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res2, %res3
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_pbroadcastq_128(<2 x i64> %x0, <2 x i64> %x1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpbroadcastq %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x59,0xd0]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpbroadcastq %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x59,0xc8]
|
|
|
|
; CHECK-NEXT: vpbroadcastq %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x59,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm1, %xmm2, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc9]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc1]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> %x1,i8 -1)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> %x1,i8 %mask)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> zeroinitializer,i8 %mask)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res2, %res3
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double>, <4 x double>, i8) nounwind readonly
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_vbroadcast_sd_pd_256(<2 x double> %a0, <4 x double> %a1, i8 %mask ) {
|
|
|
|
; CHECK-LABEL: test_x86_vbroadcast_sd_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vbroadcastsd %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x19,0xd0]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vbroadcastsd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x19,0xc8]
|
|
|
|
; CHECK-NEXT: vbroadcastsd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x19,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm1, %ymm2, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x58,0xc9]
|
|
|
|
; CHECK-NEXT: vaddpd %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x58,0xc1]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> %a1, i8 %mask)
|
|
|
|
%res2 = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> zeroinitializer, i8 %mask)
|
|
|
|
%res3 = fadd <4 x double> %res, %res1
|
|
|
|
%res4 = fadd <4 x double> %res2, %res3
|
|
|
|
ret <4 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float>, <8 x float>, i8) nounwind readonly
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_vbroadcast_ss_ps_256(<4 x float> %a0, <8 x float> %a1, i8 %mask ) {
|
|
|
|
; CHECK-LABEL: test_x86_vbroadcast_ss_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vbroadcastss %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x18,0xd0]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vbroadcastss %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x18,0xc8]
|
|
|
|
; CHECK-NEXT: vbroadcastss %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x18,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm1, %ymm2, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xec,0x58,0xc9]
|
|
|
|
; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x58,0xc1]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> %a1, i8 %mask)
|
|
|
|
%res2 = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> zeroinitializer, i8 %mask)
|
|
|
|
%res3 = fadd <8 x float> %res, %res1
|
|
|
|
%res4 = fadd <8 x float> %res2, %res3
|
|
|
|
ret <8 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float>, <4 x float>, i8) nounwind readonly
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_vbroadcast_ss_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask ) {
|
|
|
|
; CHECK-LABEL: test_x86_vbroadcast_ss_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vbroadcastss %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x18,0xd0]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vbroadcastss %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x18,0xc8]
|
|
|
|
; CHECK-NEXT: vbroadcastss %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x18,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm1, %xmm2, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xe8,0x58,0xc9]
|
|
|
|
; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x58,0xc1]
|
2016-07-05 21:58:47 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> %a1, i8 %mask)
|
|
|
|
%res2 = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> zeroinitializer, i8 %mask)
|
|
|
|
%res3 = fadd <4 x float> %res, %res1
|
|
|
|
%res4 = fadd <4 x float> %res2, %res3
|
|
|
|
ret <4 x float> %res4
|
|
|
|
}
|
|
|
|
|
2016-07-02 22:42:35 +08:00
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.movsldup.128(<4 x float>, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float>@test_int_x86_avx512_mask_movsldup_128(<4 x float> %x0, <4 x float> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_movsldup_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovsldup %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc5,0xfa,0x12,0xd0]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[0,0,2,2]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmovsldup %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0x12,0xc8]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[0,0,2,2]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: vmovsldup %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7e,0x89,0x12,0xc0]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[0,0,2,2]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm2, %xmm1, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf0,0x58,0xca]
|
|
|
|
; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x58,0xc1]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.movsldup.128(<4 x float> %x0, <4 x float> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.movsldup.128(<4 x float> %x0, <4 x float> %x1, i8 -1)
|
|
|
|
%res2 = call <4 x float> @llvm.x86.avx512.mask.movsldup.128(<4 x float> %x0, <4 x float> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = fadd <4 x float> %res, %res1
|
|
|
|
%res4 = fadd <4 x float> %res2, %res3
|
|
|
|
ret <4 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.movsldup.256(<8 x float>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float>@test_int_x86_avx512_mask_movsldup_256(<8 x float> %x0, <8 x float> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_movsldup_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovsldup %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc5,0xfe,0x12,0xd0]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[0,0,2,2,4,4,6,6]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmovsldup %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0x12,0xc8]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = ymm0[0,0,2,2,4,4,6,6]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: vmovsldup %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7e,0xa9,0x12,0xc0]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = ymm0[0,0,2,2,4,4,6,6]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm2, %ymm1, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf4,0x58,0xca]
|
|
|
|
; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x58,0xc1]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.movsldup.256(<8 x float> %x0, <8 x float> %x1, i8 %x2)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.movsldup.256(<8 x float> %x0, <8 x float> %x1, i8 -1)
|
|
|
|
%res2 = call <8 x float> @llvm.x86.avx512.mask.movsldup.256(<8 x float> %x0, <8 x float> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = fadd <8 x float> %res, %res1
|
|
|
|
%res4 = fadd <8 x float> %res2, %res3
|
|
|
|
ret <8 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.movshdup.128(<4 x float>, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float>@test_int_x86_avx512_mask_movshdup_128(<4 x float> %x0, <4 x float> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_movshdup_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovshdup %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc5,0xfa,0x16,0xd0]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[1,1,3,3]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmovshdup %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0x16,0xc8]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[1,1,3,3]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: vmovshdup %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7e,0x89,0x16,0xc0]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[1,1,3,3]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm2, %xmm1, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf0,0x58,0xca]
|
|
|
|
; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x58,0xc1]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.movshdup.128(<4 x float> %x0, <4 x float> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.movshdup.128(<4 x float> %x0, <4 x float> %x1, i8 -1)
|
|
|
|
%res2 = call <4 x float> @llvm.x86.avx512.mask.movshdup.128(<4 x float> %x0, <4 x float> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = fadd <4 x float> %res, %res1
|
|
|
|
%res4 = fadd <4 x float> %res2, %res3
|
|
|
|
ret <4 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.movshdup.256(<8 x float>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float>@test_int_x86_avx512_mask_movshdup_256(<8 x float> %x0, <8 x float> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_movshdup_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovshdup %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc5,0xfe,0x16,0xd0]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[1,1,3,3,5,5,7,7]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmovshdup %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0x16,0xc8]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = ymm0[1,1,3,3,5,5,7,7]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: vmovshdup %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7e,0xa9,0x16,0xc0]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = ymm0[1,1,3,3,5,5,7,7]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm2, %ymm1, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf4,0x58,0xca]
|
|
|
|
; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x58,0xc1]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.movshdup.256(<8 x float> %x0, <8 x float> %x1, i8 %x2)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.movshdup.256(<8 x float> %x0, <8 x float> %x1, i8 -1)
|
|
|
|
%res2 = call <8 x float> @llvm.x86.avx512.mask.movshdup.256(<8 x float> %x0, <8 x float> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = fadd <8 x float> %res, %res1
|
|
|
|
%res4 = fadd <8 x float> %res2, %res3
|
|
|
|
ret <8 x float> %res4
|
|
|
|
}
|
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.movddup.128(<2 x double>, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double>@test_int_x86_avx512_mask_movddup_128(<2 x double> %x0, <2 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_movddup_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovddup %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc5,0xfb,0x12,0xd0]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[0,0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmovddup %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0xff,0x09,0x12,0xc8]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[0,0]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: vmovddup %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xff,0x89,0x12,0xc0]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[0,0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm2, %xmm1, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0x58,0xca]
|
|
|
|
; CHECK-NEXT: vaddpd %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x58,0xc1]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.movddup.128(<2 x double> %x0, <2 x double> %x1, i8 %x2)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.movddup.128(<2 x double> %x0, <2 x double> %x1, i8 -1)
|
|
|
|
%res2 = call <2 x double> @llvm.x86.avx512.mask.movddup.128(<2 x double> %x0, <2 x double> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = fadd <2 x double> %res, %res1
|
|
|
|
%res4 = fadd <2 x double> %res2, %res3
|
|
|
|
ret <2 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.movddup.256(<4 x double>, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_movddup_256(<4 x double> %x0, <4 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_movddup_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovddup %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc5,0xff,0x12,0xd0]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[0,0,2,2]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmovddup %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0xff,0x29,0x12,0xc8]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = ymm0[0,0,2,2]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: vmovddup %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xff,0xa9,0x12,0xc0]
|
2016-07-03 21:08:29 +08:00
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = ymm0[0,0,2,2]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm2, %ymm1, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0x58,0xca]
|
|
|
|
; CHECK-NEXT: vaddpd %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x58,0xc1]
|
2016-07-02 22:42:35 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.movddup.256(<4 x double> %x0, <4 x double> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.movddup.256(<4 x double> %x0, <4 x double> %x1, i8 -1)
|
|
|
|
%res2 = call <4 x double> @llvm.x86.avx512.mask.movddup.256(<4 x double> %x0, <4 x double> zeroinitializer, i8 %x2)
|
|
|
|
%res3 = fadd <4 x double> %res, %res1
|
|
|
|
%res4 = fadd <4 x double> %res2, %res3
|
|
|
|
ret <4 x double> %res4
|
|
|
|
}
|
|
|
|
|
2016-07-04 20:40:54 +08:00
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.vpermil.pd.256(<4 x double>, i32, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_vpermil_pd_256(<4 x double> %x0, <4 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermil_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermilpd $6, %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe3,0x7d,0x05,0xd0,0x06]
|
2016-07-04 20:40:54 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[0,1,3,2]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermilpd $6, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf3,0xfd,0x29,0x05,0xc8,0x06]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = ymm0[0,1,3,2]
|
|
|
|
; CHECK-NEXT: vpermilpd $6, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf3,0xfd,0xa9,0x05,0xc0,0x06]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = ymm0[0,1,3,2]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddpd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x58,0xc0]
|
2016-07-04 20:40:54 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.vpermil.pd.256(<4 x double> %x0, i32 22, <4 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.vpermil.pd.256(<4 x double> %x0, i32 22, <4 x double> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x double> @llvm.x86.avx512.mask.vpermil.pd.256(<4 x double> %x0, i32 22, <4 x double> %x2, i8 -1)
|
|
|
|
%res3 = fadd <4 x double> %res, %res1
|
|
|
|
%res4 = fadd <4 x double> %res2, %res3
|
|
|
|
ret <4 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.vpermil.pd.128(<2 x double>, i32, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double>@test_int_x86_avx512_mask_vpermil_pd_128(<2 x double> %x0, <2 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermil_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermilpd $1, %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe3,0x79,0x05,0xd0,0x01]
|
2016-07-04 20:40:54 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[1,0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermilpd $1, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf3,0xfd,0x09,0x05,0xc8,0x01]
|
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[1,0]
|
|
|
|
; CHECK-NEXT: vpermilpd $1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf3,0xfd,0x89,0x05,0xc0,0x01]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[1,0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddpd %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x58,0xc2]
|
2016-07-04 20:40:54 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.vpermil.pd.128(<2 x double> %x0, i32 1, <2 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.vpermil.pd.128(<2 x double> %x0, i32 1, <2 x double> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <2 x double> @llvm.x86.avx512.mask.vpermil.pd.128(<2 x double> %x0, i32 1, <2 x double> %x2, i8 -1)
|
|
|
|
%res3 = fadd <2 x double> %res, %res1
|
|
|
|
%res4 = fadd <2 x double> %res3, %res2
|
|
|
|
ret <2 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.vpermil.ps.256(<8 x float>, i32, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float>@test_int_x86_avx512_mask_vpermil_ps_256(<8 x float> %x0, <8 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermil_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermilps $22, %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe3,0x7d,0x04,0xd0,0x16]
|
2016-07-04 20:40:54 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[2,1,1,0,6,5,5,4]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermilps $22, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf3,0x7d,0x29,0x04,0xc8,0x16]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = ymm0[2,1,1,0,6,5,5,4]
|
|
|
|
; CHECK-NEXT: vpermilps $22, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf3,0x7d,0xa9,0x04,0xc0,0x16]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = ymm0[2,1,1,0,6,5,5,4]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf4,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddps %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x58,0xc2]
|
2016-07-04 20:40:54 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.vpermil.ps.256(<8 x float> %x0, i32 22, <8 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.vpermil.ps.256(<8 x float> %x0, i32 22, <8 x float> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x float> @llvm.x86.avx512.mask.vpermil.ps.256(<8 x float> %x0, i32 22, <8 x float> %x2, i8 -1)
|
|
|
|
%res3 = fadd <8 x float> %res, %res1
|
|
|
|
%res4 = fadd <8 x float> %res3, %res2
|
|
|
|
ret <8 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.vpermil.ps.128(<4 x float>, i32, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float>@test_int_x86_avx512_mask_vpermil_ps_128(<4 x float> %x0, <4 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermil_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermilps $22, %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe3,0x79,0x04,0xd0,0x16]
|
2016-07-04 20:40:54 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[2,1,1,0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermilps $22, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf3,0x7d,0x09,0x04,0xc8,0x16]
|
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[2,1,1,0]
|
|
|
|
; CHECK-NEXT: vpermilps $22, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf3,0x7d,0x89,0x04,0xc0,0x16]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[2,1,1,0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf0,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddps %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe8,0x58,0xc0]
|
2016-07-04 20:40:54 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.vpermil.ps.128(<4 x float> %x0, i32 22, <4 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.vpermil.ps.128(<4 x float> %x0, i32 22, <4 x float> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x float> @llvm.x86.avx512.mask.vpermil.ps.128(<4 x float> %x0, i32 22, <4 x float> %x2, i8 -1)
|
|
|
|
%res3 = fadd <4 x float> %res, %res1
|
|
|
|
%res4 = fadd <4 x float> %res2, %res3
|
|
|
|
ret <4 x float> %res4
|
|
|
|
}
|
|
|
|
|
2016-07-04 22:19:05 +08:00
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.perm.df.256(<4 x double>, i32, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_perm_df_256(<4 x double> %x0, i32 %x1, <4 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_perm_df_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermpd $3, %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe3,0xfd,0x01,0xd0,0x03]
|
2016-07-04 22:19:05 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[3,0,0,0]
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpermpd $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf3,0xfd,0x29,0x01,0xc8,0x03]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = ymm0[3,0,0,0]
|
|
|
|
; CHECK-NEXT: vpermpd $3, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf3,0xfd,0xa9,0x01,0xc0,0x03]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = ymm0[3,0,0,0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddpd %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x58,0xc2]
|
2016-07-04 22:19:05 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.perm.df.256(<4 x double> %x0, i32 3, <4 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.perm.df.256(<4 x double> %x0, i32 3, <4 x double> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x double> @llvm.x86.avx512.mask.perm.df.256(<4 x double> %x0, i32 3, <4 x double> %x2, i8 -1)
|
|
|
|
%res3 = fadd <4 x double> %res, %res1
|
|
|
|
%res4 = fadd <4 x double> %res3, %res2
|
|
|
|
ret <4 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.perm.di.256(<4 x i64>, i32, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_perm_di_256(<4 x i64> %x0, i32 %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_perm_di_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermq $3, %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe3,0xfd,0x00,0xd0,0x03]
|
2016-07-04 22:19:05 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[3,0,0,0]
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpermq $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf3,0xfd,0x29,0x00,0xc8,0x03]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = ymm0[3,0,0,0]
|
|
|
|
; CHECK-NEXT: vpermq $3, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf3,0xfd,0xa9,0x00,0xc0,0x03]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = ymm0[3,0,0,0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc2]
|
2016-07-04 22:19:05 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.perm.di.256(<4 x i64> %x0, i32 3, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.perm.di.256(<4 x i64> %x0, i32 3, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.perm.di.256(<4 x i64> %x0, i32 3, <4 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
2016-05-31 09:50:02 +08:00
|
|
|
declare void @llvm.x86.avx512.mask.store.pd.128(i8*, <2 x double>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_store_pd_128(i8* %ptr1, i8* %ptr2, <2 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_store_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovapd %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x29,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovapd %xmm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x29,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.store.pd.128(i8* %ptr1, <2 x double> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.store.pd.128(i8* %ptr2, <2 x double> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.store.pd.256(i8*, <4 x double>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_store_pd_256(i8* %ptr1, i8* %ptr2, <4 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_store_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovapd %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x29,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovapd %ymm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x29,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.store.pd.256(i8* %ptr1, <4 x double> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.store.pd.256(i8* %ptr2, <4 x double> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.storeu.pd.128(i8*, <2 x double>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_storeu_pd_128(i8* %ptr1, i8* %ptr2, <2 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_storeu_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovupd %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x11,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovupd %xmm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x11,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.pd.128(i8* %ptr1, <2 x double> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.pd.128(i8* %ptr2, <2 x double> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.storeu.pd.256(i8*, <4 x double>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_storeu_pd_256(i8* %ptr1, i8* %ptr2, <4 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_storeu_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovupd %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x11,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovupd %ymm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x11,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.pd.256(i8* %ptr1, <4 x double> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.pd.256(i8* %ptr2, <4 x double> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.store.ps.128(i8*, <4 x float>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_store_ps_128(i8* %ptr1, i8* %ptr2, <4 x float> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_store_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovaps %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x29,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %xmm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x29,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.store.ps.128(i8* %ptr1, <4 x float> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.store.ps.128(i8* %ptr2, <4 x float> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.store.ps.256(i8*, <8 x float>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_store_ps_256(i8* %ptr1, i8* %ptr2, <8 x float> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_store_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovaps %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x29,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %ymm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x29,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.store.ps.256(i8* %ptr1, <8 x float> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.store.ps.256(i8* %ptr2, <8 x float> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.storeu.ps.128(i8*, <4 x float>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_storeu_ps_128(i8* %ptr1, i8* %ptr2, <4 x float> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_storeu_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovups %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x11,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovups %xmm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x11,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.ps.128(i8* %ptr1, <4 x float> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.ps.128(i8* %ptr2, <4 x float> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.storeu.ps.256(i8*, <8 x float>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_storeu_ps_256(i8* %ptr1, i8* %ptr2, <8 x float> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_storeu_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovups %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x11,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovups %ymm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x11,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.ps.256(i8* %ptr1, <8 x float> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.ps.256(i8* %ptr2, <8 x float> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.storeu.q.128(i8*, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_storeu_q_128(i8* %ptr1, i8* %ptr2, <2 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_storeu_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqu64 %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0xfe,0x09,0x7f,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqu %xmm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfa,0x7f,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.q.128(i8* %ptr1, <2 x i64> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.q.128(i8* %ptr2, <2 x i64> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.storeu.q.256(i8*, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_storeu_q_256(i8* %ptr1, i8* %ptr2, <4 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_storeu_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqu64 %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0xfe,0x29,0x7f,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqu %ymm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfe,0x7f,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.q.256(i8* %ptr1, <4 x i64> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.q.256(i8* %ptr2, <4 x i64> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.storeu.d.128(i8*, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_storeu_d_128(i8* %ptr1, i8* %ptr2, <4 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_storeu_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqu32 %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0x7f,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqu %xmm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfa,0x7f,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.d.128(i8* %ptr1, <4 x i32> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.d.128(i8* %ptr2, <4 x i32> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.storeu.d.256(i8*, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_storeu_d_256(i8* %ptr1, i8* %ptr2, <8 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_storeu_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqu32 %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0x7f,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqu %ymm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfe,0x7f,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.d.256(i8* %ptr1, <8 x i32> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.storeu.d.256(i8* %ptr2, <8 x i32> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.store.q.128(i8*, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_store_q_128(i8* %ptr1, i8* %ptr2, <2 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_store_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqa64 %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x7f,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x7f,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.store.q.128(i8* %ptr1, <2 x i64> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.store.q.128(i8* %ptr2, <2 x i64> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.store.q.256(i8*, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_store_q_256(i8* %ptr1, i8* %ptr2, <4 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_store_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqa64 %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x7f,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x7f,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.store.q.256(i8* %ptr1, <4 x i64> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.store.q.256(i8* %ptr2, <4 x i64> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.store.d.128(i8*, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_store_d_128(i8* %ptr1, i8* %ptr2, <4 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_store_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqa32 %xmm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x7f,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x7f,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.store.d.128(i8* %ptr1, <4 x i32> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.store.d.128(i8* %ptr2, <4 x i32> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.x86.avx512.mask.store.d.256(i8*, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define void@test_int_x86_avx512_mask_store_d_256(i8* %ptr1, i8* %ptr2, <8 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_store_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqa32 %ymm0, (%rdi) {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x7f,0x07]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm0, (%rsi) ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x7f,0x06]
|
2016-05-31 09:50:02 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
call void @llvm.x86.avx512.mask.store.d.256(i8* %ptr1, <8 x i32> %x1, i8 %x2)
|
|
|
|
call void @llvm.x86.avx512.mask.store.d.256(i8* %ptr2, <8 x i32> %x1, i8 -1)
|
|
|
|
ret void
|
|
|
|
}
|
2016-06-02 12:19:36 +08:00
|
|
|
|
|
|
|
define <8 x float> @test_mask_load_aligned_ps_256(<8 x float> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_aligned_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps (%rdi), %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovaps (%rdi), %ymm0 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x28,0x07]
|
|
|
|
; CHECK-NEXT: vmovaps (%rdi), %ymm1 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0xa9,0x28,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf4,0x58,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.load.ps.256(i8* %ptr, <8 x float> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.load.ps.256(i8* %ptr, <8 x float> %res, i8 %mask)
|
|
|
|
%res2 = call <8 x float> @llvm.x86.avx512.mask.load.ps.256(i8* %ptr, <8 x float> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = fadd <8 x float> %res2, %res1
|
|
|
|
ret <8 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.load.ps.256(i8*, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float> @test_mask_load_unaligned_ps_256(<8 x float> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_unaligned_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovups (%rdi), %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x10,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovups (%rdi), %ymm0 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x10,0x07]
|
|
|
|
; CHECK-NEXT: vmovups (%rdi), %ymm1 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0xa9,0x10,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf4,0x58,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.loadu.ps.256(i8* %ptr, <8 x float> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.loadu.ps.256(i8* %ptr, <8 x float> %res, i8 %mask)
|
|
|
|
%res2 = call <8 x float> @llvm.x86.avx512.mask.loadu.ps.256(i8* %ptr, <8 x float> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = fadd <8 x float> %res2, %res1
|
|
|
|
ret <8 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.loadu.ps.256(i8*, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x double> @test_mask_load_aligned_pd_256(<4 x double> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_aligned_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovapd (%rdi), %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x28,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovapd (%rdi), %ymm0 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x28,0x07]
|
|
|
|
; CHECK-NEXT: vmovapd (%rdi), %ymm1 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0x28,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0x58,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.load.pd.256(i8* %ptr, <4 x double> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.load.pd.256(i8* %ptr, <4 x double> %res, i8 %mask)
|
|
|
|
%res2 = call <4 x double> @llvm.x86.avx512.mask.load.pd.256(i8* %ptr, <4 x double> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = fadd <4 x double> %res2, %res1
|
|
|
|
ret <4 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.load.pd.256(i8*, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double> @test_mask_load_unaligned_pd_256(<4 x double> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_unaligned_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovupd (%rdi), %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x10,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovupd (%rdi), %ymm0 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x10,0x07]
|
|
|
|
; CHECK-NEXT: vmovupd (%rdi), %ymm1 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0x10,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0x58,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.loadu.pd.256(i8* %ptr, <4 x double> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.loadu.pd.256(i8* %ptr, <4 x double> %res, i8 %mask)
|
|
|
|
%res2 = call <4 x double> @llvm.x86.avx512.mask.loadu.pd.256(i8* %ptr, <4 x double> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = fadd <4 x double> %res2, %res1
|
|
|
|
ret <4 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.loadu.pd.256(i8*, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x float> @test_mask_load_aligned_ps_128(<4 x float> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_aligned_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x28,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovaps (%rdi), %xmm0 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x28,0x07]
|
|
|
|
; CHECK-NEXT: vmovaps (%rdi), %xmm1 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0x89,0x28,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf0,0x58,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.load.ps.128(i8* %ptr, <4 x float> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.load.ps.128(i8* %ptr, <4 x float> %res, i8 %mask)
|
|
|
|
%res2 = call <4 x float> @llvm.x86.avx512.mask.load.ps.128(i8* %ptr, <4 x float> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = fadd <4 x float> %res2, %res1
|
|
|
|
ret <4 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.load.ps.128(i8*, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float> @test_mask_load_unaligned_ps_128(<4 x float> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_unaligned_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovups (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x10,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovups (%rdi), %xmm0 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x10,0x07]
|
|
|
|
; CHECK-NEXT: vmovups (%rdi), %xmm1 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0x89,0x10,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf0,0x58,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.loadu.ps.128(i8* %ptr, <4 x float> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.loadu.ps.128(i8* %ptr, <4 x float> %res, i8 %mask)
|
|
|
|
%res2 = call <4 x float> @llvm.x86.avx512.mask.loadu.ps.128(i8* %ptr, <4 x float> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = fadd <4 x float> %res2, %res1
|
|
|
|
ret <4 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.loadu.ps.128(i8*, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <2 x double> @test_mask_load_aligned_pd_128(<2 x double> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_aligned_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovapd (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x28,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovapd (%rdi), %xmm0 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x28,0x07]
|
|
|
|
; CHECK-NEXT: vmovapd (%rdi), %xmm1 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0x28,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0x58,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.load.pd.128(i8* %ptr, <2 x double> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.load.pd.128(i8* %ptr, <2 x double> %res, i8 %mask)
|
|
|
|
%res2 = call <2 x double> @llvm.x86.avx512.mask.load.pd.128(i8* %ptr, <2 x double> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = fadd <2 x double> %res2, %res1
|
|
|
|
ret <2 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.load.pd.128(i8*, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double> @test_mask_load_unaligned_pd_128(<2 x double> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_unaligned_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovupd (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x10,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovupd (%rdi), %xmm0 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x10,0x07]
|
|
|
|
; CHECK-NEXT: vmovupd (%rdi), %xmm1 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0x10,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0x58,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.loadu.pd.128(i8* %ptr, <2 x double> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.loadu.pd.128(i8* %ptr, <2 x double> %res, i8 %mask)
|
|
|
|
%res2 = call <2 x double> @llvm.x86.avx512.mask.loadu.pd.128(i8* %ptr, <2 x double> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = fadd <2 x double> %res2, %res1
|
|
|
|
ret <2 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.loadu.pd.128(i8*, <2 x double>, i8)
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.loadu.d.128(i8*, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_load_unaligned_d_128(i8* %ptr, i8* %ptr2, <4 x i32> %data, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_unaligned_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqu (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfa,0x6f,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqu32 (%rsi), %xmm0 {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0x6f,0x06]
|
|
|
|
; CHECK-NEXT: vmovdqu32 (%rdi), %xmm1 {%k1} {z} ## encoding: [0x62,0xf1,0x7e,0x89,0x6f,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.loadu.d.128(i8* %ptr, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.loadu.d.128(i8* %ptr2, <4 x i32> %res, i8 %mask)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.loadu.d.128(i8* %ptr, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = add <4 x i32> %res2, %res1
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.loadu.d.256(i8*, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_load_unaligned_d_256(i8* %ptr, i8* %ptr2, <8 x i32> %data, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_unaligned_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqu (%rdi), %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfe,0x6f,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqu32 (%rsi), %ymm0 {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0x6f,0x06]
|
|
|
|
; CHECK-NEXT: vmovdqu32 (%rdi), %ymm1 {%k1} {z} ## encoding: [0x62,0xf1,0x7e,0xa9,0x6f,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.loadu.d.256(i8* %ptr, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.loadu.d.256(i8* %ptr2, <8 x i32> %res, i8 %mask)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.loadu.d.256(i8* %ptr, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = add <8 x i32> %res2, %res1
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.loadu.q.128(i8*, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_load_unaligned_q_128(i8* %ptr, i8* %ptr2, <2 x i64> %data, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_unaligned_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqu (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfa,0x6f,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqu64 (%rsi), %xmm0 {%k1} ## encoding: [0x62,0xf1,0xfe,0x09,0x6f,0x06]
|
|
|
|
; CHECK-NEXT: vmovdqu64 (%rdi), %xmm1 {%k1} {z} ## encoding: [0x62,0xf1,0xfe,0x89,0x6f,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.loadu.q.128(i8* %ptr, <2 x i64> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.loadu.q.128(i8* %ptr2, <2 x i64> %res, i8 %mask)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.loadu.q.128(i8* %ptr, <2 x i64> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = add <2 x i64> %res2, %res1
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.loadu.q.256(i8*, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_load_unaligned_q_256(i8* %ptr, i8* %ptr2, <4 x i64> %data, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_unaligned_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqu (%rdi), %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfe,0x6f,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %edx, %k1 ## encoding: [0xc5,0xf8,0x92,0xca]
|
|
|
|
; CHECK-NEXT: vmovdqu64 (%rsi), %ymm0 {%k1} ## encoding: [0x62,0xf1,0xfe,0x29,0x6f,0x06]
|
|
|
|
; CHECK-NEXT: vmovdqu64 (%rdi), %ymm1 {%k1} {z} ## encoding: [0x62,0xf1,0xfe,0xa9,0x6f,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.loadu.q.256(i8* %ptr, <4 x i64> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.loadu.q.256(i8* %ptr2, <4 x i64> %res, i8 %mask)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.loadu.q.256(i8* %ptr, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = add <4 x i64> %res2, %res1
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.load.d.128(i8*, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_load_aligned_d_128(<4 x i32> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_aligned_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovdqa32 (%rdi), %xmm0 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x6f,0x07]
|
|
|
|
; CHECK-NEXT: vmovdqa32 (%rdi), %xmm1 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x6f,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.load.d.128(i8* %ptr, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.load.d.128(i8* %ptr, <4 x i32> %res, i8 %mask)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.load.d.128(i8* %ptr, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = add <4 x i32> %res2, %res1
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.load.d.256(i8*, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_load_aligned_d_256(<8 x i32> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_aligned_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa (%rdi), %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovdqa32 (%rdi), %ymm0 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x6f,0x07]
|
|
|
|
; CHECK-NEXT: vmovdqa32 (%rdi), %ymm1 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x6f,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.load.d.256(i8* %ptr, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.load.d.256(i8* %ptr, <8 x i32> %res, i8 %mask)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.load.d.256(i8* %ptr, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = add <8 x i32> %res2, %res1
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.load.q.128(i8*, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_load_aligned_q_128(<2 x i64> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_aligned_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa (%rdi), %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovdqa64 (%rdi), %xmm0 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x6f,0x07]
|
|
|
|
; CHECK-NEXT: vmovdqa64 (%rdi), %xmm1 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0x6f,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.load.q.128(i8* %ptr, <2 x i64> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.load.q.128(i8* %ptr, <2 x i64> %res, i8 %mask)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.load.q.128(i8* %ptr, <2 x i64> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = add <2 x i64> %res2, %res1
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.load.q.256(i8*, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_load_aligned_q_256(<4 x i64> %data, i8* %ptr, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_load_aligned_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa (%rdi), %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0x07]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vmovdqa64 (%rdi), %ymm0 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x6f,0x07]
|
|
|
|
; CHECK-NEXT: vmovdqa64 (%rdi), %ymm1 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0x6f,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
2016-06-02 12:19:36 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.load.q.256(i8* %ptr, <4 x i64> zeroinitializer, i8 -1)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.load.q.256(i8* %ptr, <4 x i64> %res, i8 %mask)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.load.q.256(i8* %ptr, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
%res4 = add <4 x i64> %res2, %res1
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
2016-06-13 10:36:48 +08:00
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pshuf.d.128(<4 x i32>, i32, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pshuf_d_128(<4 x i32> %x0, i32 %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pshuf_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpshufd $3, %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x70,0xd0,0x03]
|
2016-06-13 10:36:48 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[3,0,0,0]
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpshufd $3, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x70,0xc8,0x03]
|
2016-07-03 23:00:51 +08:00
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[3,0,0,0]
|
2016-06-13 10:36:48 +08:00
|
|
|
; CHECK-NEXT: vpshufd $3, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x70,0xc0,0x03]
|
2016-07-03 23:00:51 +08:00
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[3,0,0,0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc2]
|
2016-06-13 10:36:48 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pshuf.d.128(<4 x i32> %x0, i32 3, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pshuf.d.128(<4 x i32> %x0, i32 3, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.pshuf.d.128(<4 x i32> %x0, i32 3, <4 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pshuf.d.256(<8 x i32>, i32, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pshuf_d_256(<8 x i32> %x0, i32 %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pshuf_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpshufd $3, %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x70,0xd0,0x03]
|
2016-06-13 10:36:48 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[3,0,0,0,7,4,4,4]
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpshufd $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x70,0xc8,0x03]
|
2016-07-03 23:00:51 +08:00
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = ymm0[3,0,0,0,7,4,4,4]
|
2016-06-13 10:36:48 +08:00
|
|
|
; CHECK-NEXT: vpshufd $3, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x70,0xc0,0x03]
|
2016-07-03 23:00:51 +08:00
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = ymm0[3,0,0,0,7,4,4,4]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc2]
|
2016-06-13 10:36:48 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pshuf.d.256(<8 x i32> %x0, i32 3, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pshuf.d.256(<8 x i32> %x0, i32 3, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.pshuf.d.256(<8 x i32> %x0, i32 3, <8 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
2016-06-21 11:53:24 +08:00
|
|
|
|
|
|
|
define i8 @test_pcmpeq_d_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpeq_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpcmpeqd %ymm1, %ymm0, %k0 ## encoding: [0x62,0xf1,0x7d,0x28,0x76,0xc1]
|
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.d.256(<8 x i32> %a, <8 x i32> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpeq_d_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpeq_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpcmpeqd %ymm1, %ymm0, %k0 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x76,0xc1]
|
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.d.256(<8 x i32> %a, <8 x i32> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpeq.d.256(<8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpeq_q_256(<4 x i64> %a, <4 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpeq_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpcmpeqq %ymm1, %ymm0, %k0 ## encoding: [0x62,0xf2,0xfd,0x28,0x29,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.q.256(<4 x i64> %a, <4 x i64> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpeq_q_256(<4 x i64> %a, <4 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpeq_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpcmpeqq %ymm1, %ymm0, %k0 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x29,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.q.256(<4 x i64> %a, <4 x i64> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpeq.q.256(<4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpgt_d_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpgt_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpcmpgtd %ymm1, %ymm0, %k0 ## encoding: [0x62,0xf1,0x7d,0x28,0x66,0xc1]
|
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.d.256(<8 x i32> %a, <8 x i32> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpgt_d_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpgt_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpcmpgtd %ymm1, %ymm0, %k0 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x66,0xc1]
|
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.d.256(<8 x i32> %a, <8 x i32> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpgt.d.256(<8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpgt_q_256(<4 x i64> %a, <4 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpgt_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpcmpgtq %ymm1, %ymm0, %k0 ## encoding: [0x62,0xf2,0xfd,0x28,0x37,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.q.256(<4 x i64> %a, <4 x i64> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpgt_q_256(<4 x i64> %a, <4 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpgt_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpcmpgtq %ymm1, %ymm0, %k0 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x37,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.q.256(<4 x i64> %a, <4 x i64> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpgt.q.256(<4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpeq_d_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpeq_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpcmpeqd %xmm1, %xmm0, %k0 ## encoding: [0x62,0xf1,0x7d,0x08,0x76,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.d.128(<4 x i32> %a, <4 x i32> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpeq_d_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpeq_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpcmpeqd %xmm1, %xmm0, %k0 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x76,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.d.128(<4 x i32> %a, <4 x i32> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpeq.d.128(<4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpeq_q_128(<2 x i64> %a, <2 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpeq_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpcmpeqq %xmm1, %xmm0, %k0 ## encoding: [0x62,0xf2,0xfd,0x08,0x29,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $14, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0e]
|
|
|
|
; CHECK-NEXT: kshiftrw $14, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]
|
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.q.128(<2 x i64> %a, <2 x i64> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpeq_q_128(<2 x i64> %a, <2 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpeq_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpcmpeqq %xmm1, %xmm0, %k0 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x29,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $14, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0e]
|
|
|
|
; CHECK-NEXT: kshiftrw $14, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]
|
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpeq.q.128(<2 x i64> %a, <2 x i64> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpeq.q.128(<2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpgt_d_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpgt_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpcmpgtd %xmm1, %xmm0, %k0 ## encoding: [0x62,0xf1,0x7d,0x08,0x66,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.d.128(<4 x i32> %a, <4 x i32> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpgt_d_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpgt_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpcmpgtd %xmm1, %xmm0, %k0 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x66,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.d.128(<4 x i32> %a, <4 x i32> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpgt.d.128(<4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define i8 @test_pcmpgt_q_128(<2 x i64> %a, <2 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_pcmpgt_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpcmpgtq %xmm1, %xmm0, %k0 ## encoding: [0x62,0xf2,0xfd,0x08,0x37,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $14, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0e]
|
|
|
|
; CHECK-NEXT: kshiftrw $14, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]
|
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.q.128(<2 x i64> %a, <2 x i64> %b, i8 -1)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i8 @test_mask_pcmpgt_q_128(<2 x i64> %a, <2 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_pcmpgt_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpcmpgtq %xmm1, %xmm0, %k0 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x37,0xc1]
|
2016-07-07 14:11:07 +08:00
|
|
|
; CHECK-NEXT: kshiftlw $14, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0e]
|
|
|
|
; CHECK-NEXT: kshiftrw $14, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0e]
|
|
|
|
; CHECK-NEXT: kshiftlw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x32,0xc0,0x0c]
|
|
|
|
; CHECK-NEXT: kshiftrw $12, %k0, %k0 ## encoding: [0xc4,0xe3,0xf9,0x30,0xc0,0x0c]
|
2016-06-21 11:53:24 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, %eax ## encoding: [0xc5,0xf8,0x93,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call i8 @llvm.x86.avx512.mask.pcmpgt.q.128(<2 x i64> %a, <2 x i64> %b, i8 %mask)
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8 @llvm.x86.avx512.mask.pcmpgt.q.128(<2 x i64>, <2 x i64>, i8)
|
2016-06-23 15:37:33 +08:00
|
|
|
|
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.unpckh.pd.128(<2 x double>, <2 x double>, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double>@test_int_x86_avx512_mask_unpckh_pd_128(<2 x double> %x0, <2 x double> %x1, <2 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_unpckh_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vunpckhpd %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x15,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[1],xmm1[1]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vunpckhpd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x15,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm0[1],xmm1[1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0x58,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.unpckh.pd.128(<2 x double> %x0, <2 x double> %x1, <2 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.unpckh.pd.128(<2 x double> %x0, <2 x double> %x1, <2 x double> %x2, i8 -1)
|
|
|
|
%res2 = fadd <2 x double> %res, %res1
|
|
|
|
ret <2 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.unpckh.pd.256(<4 x double>, <4 x double>, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_unpckh_pd_256(<4 x double> %x0, <4 x double> %x1, <4 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_unpckh_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vunpckhpd %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x15,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vunpckhpd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x15,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x58,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.unpckh.pd.256(<4 x double> %x0, <4 x double> %x1, <4 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.unpckh.pd.256(<4 x double> %x0, <4 x double> %x1, <4 x double> %x2, i8 -1)
|
|
|
|
%res2 = fadd <4 x double> %res, %res1
|
|
|
|
ret <4 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.unpckh.ps.128(<4 x float>, <4 x float>, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float>@test_int_x86_avx512_mask_unpckh_ps_128(<4 x float> %x0, <4 x float> %x1, <4 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_unpckh_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vunpckhps %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x15,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vunpckhps %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x15,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe8,0x58,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.unpckh.ps.128(<4 x float> %x0, <4 x float> %x1, <4 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.unpckh.ps.128(<4 x float> %x0, <4 x float> %x1, <4 x float> %x2, i8 -1)
|
|
|
|
%res2 = fadd <4 x float> %res, %res1
|
|
|
|
ret <4 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.unpckh.ps.256(<8 x float>, <8 x float>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float>@test_int_x86_avx512_mask_unpckh_ps_256(<8 x float> %x0, <8 x float> %x1, <8 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_unpckh_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vunpckhps %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x15,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vunpckhps %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x15,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xec,0x58,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.unpckh.ps.256(<8 x float> %x0, <8 x float> %x1, <8 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.unpckh.ps.256(<8 x float> %x0, <8 x float> %x1, <8 x float> %x2, i8 -1)
|
|
|
|
%res2 = fadd <8 x float> %res, %res1
|
|
|
|
ret <8 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.unpckl.pd.128(<2 x double>, <2 x double>, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double>@test_int_x86_avx512_mask_unpckl_pd_128(<2 x double> %x0, <2 x double> %x1, <2 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_unpckl_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vunpcklpd %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x14,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[0],xmm1[0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vunpcklpd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x14,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm0[0],xmm1[0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0x58,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.unpckl.pd.128(<2 x double> %x0, <2 x double> %x1, <2 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.unpckl.pd.128(<2 x double> %x0, <2 x double> %x1, <2 x double> %x2, i8 -1)
|
|
|
|
%res2 = fadd <2 x double> %res, %res1
|
|
|
|
ret <2 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.unpckl.pd.256(<4 x double>, <4 x double>, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_unpckl_pd_256(<4 x double> %x0, <4 x double> %x1, <4 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_unpckl_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vunpcklpd %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x14,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vunpcklpd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x14,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x58,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.unpckl.pd.256(<4 x double> %x0, <4 x double> %x1, <4 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.unpckl.pd.256(<4 x double> %x0, <4 x double> %x1, <4 x double> %x2, i8 -1)
|
|
|
|
%res2 = fadd <4 x double> %res, %res1
|
|
|
|
ret <4 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.unpckl.ps.128(<4 x float>, <4 x float>, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float>@test_int_x86_avx512_mask_unpckl_ps_128(<4 x float> %x0, <4 x float> %x1, <4 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_unpckl_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vunpcklps %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x14,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vunpcklps %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x14,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe8,0x58,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.unpckl.ps.128(<4 x float> %x0, <4 x float> %x1, <4 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.unpckl.ps.128(<4 x float> %x0, <4 x float> %x1, <4 x float> %x2, i8 -1)
|
|
|
|
%res2 = fadd <4 x float> %res, %res1
|
|
|
|
ret <4 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.unpckl.ps.256(<8 x float>, <8 x float>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float>@test_int_x86_avx512_mask_unpckl_ps_256(<8 x float> %x0, <8 x float> %x1, <8 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_unpckl_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vunpcklps %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x14,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vunpcklps %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x14,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xec,0x58,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.unpckl.ps.256(<8 x float> %x0, <8 x float> %x1, <8 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.unpckl.ps.256(<8 x float> %x0, <8 x float> %x1, <8 x float> %x2, i8 -1)
|
|
|
|
%res2 = fadd <8 x float> %res, %res1
|
|
|
|
ret <8 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.punpckhd.q.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_punpckhd_q_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_punpckhd_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpunpckhdq %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6a,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpunpckhdq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x6a,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.punpckhd.q.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.punpckhd.q.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <4 x i32> %res, %res1
|
|
|
|
ret <4 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.punpckld.q.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_punpckld_q_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_punpckld_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpunpckldq %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x62,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpunpckldq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0x62,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.punpckld.q.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.punpckld.q.128(<4 x i32> %x0, <4 x i32> %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.punpckhd.q.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_punpckhd_q_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_punpckhd_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpunpckhdq %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6a,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpunpckhdq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x6a,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.punpckhd.q.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.punpckhd.q.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i32> %res, %res1
|
|
|
|
ret <8 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.punpckld.q.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_punpckld_q_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_punpckld_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpunpckldq %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x62,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpunpckldq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0x62,0xd1]
|
2016-07-03 22:26:21 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.punpckld.q.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.punpckld.q.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i32> %res, %res1
|
|
|
|
ret <8 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.punpckhqd.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_punpckhqd_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_punpckhqd_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpunpckhqdq %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6d,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[1],xmm1[1]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpunpckhqdq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x6d,0xd1]
|
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[1],xmm1[1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.punpckhqd.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.punpckhqd.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res2 = add <2 x i64> %res, %res1
|
|
|
|
ret <2 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.punpcklqd.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_punpcklqd_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_punpcklqd_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpunpcklqdq %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6c,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[0],xmm1[0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpunpcklqdq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0x6c,0xd1]
|
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[0],xmm1[0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.punpcklqd.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.punpcklqd.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res2 = add <2 x i64> %res, %res1
|
|
|
|
ret <2 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.punpcklqd.q.256(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_punpcklqd_q_256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_punpcklqd_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpunpcklqdq %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6c,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpunpcklqdq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x6c,0xd1]
|
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.punpcklqd.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.punpcklqd.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 -1)
|
|
|
|
%res2 = add <4 x i64> %res, %res1
|
|
|
|
ret <4 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.punpckhqd.q.256(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_punpckhqd_q_256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_punpckhqd_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpunpckhqdq %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6d,0xd9]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpunpckhqdq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0x6d,0xd1]
|
|
|
|
; CHECK-NEXT: ## ymm2 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc3]
|
2016-06-23 15:37:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.punpckhqd.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.punpckhqd.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 -1)
|
|
|
|
%res2 = add <4 x i64> %res, %res1
|
|
|
|
ret <4 x i64> %res2
|
|
|
|
}
|
2016-07-12 13:27:53 +08:00
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rr_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpand %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xdb,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rrk_128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xdb,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rrkz_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xdb,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rm_128(<4 x i32> %a, <4 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpand (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xdb,0x07]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rmk_128(<4 x i32> %a, <4 x i32>* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandd (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xdb,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rmkz_128(<4 x i32> %a, <4 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandd (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xdb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rmb_128(<4 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandd (%rdi){1to4}, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x18,0xdb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rmbk_128(<4 x i32> %a, i32* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandd (%rdi){1to4}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x19,0xdb,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_and_epi32_rmbkz_128(<4 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandd (%rdi){1to4}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x99,0xdb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pand.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rr_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpand %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xdb,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rrk_256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xdb,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rrkz_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandd %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xdb,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rm_256(<8 x i32> %a, <8 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpand (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xdb,0x07]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rmk_256(<8 x i32> %a, <8 x i32>* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandd (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xdb,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rmkz_256(<8 x i32> %a, <8 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandd (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xdb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rmb_256(<8 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandd (%rdi){1to8}, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x38,0xdb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rmbk_256(<8 x i32> %a, i32* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandd (%rdi){1to8}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x39,0xdb,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_and_epi32_rmbkz_256(<8 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_and_epi32_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandd (%rdi){1to8}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xb9,0xdb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pand.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rr_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpor %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xeb,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rrk_128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpord %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xeb,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rrkz_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpord %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xeb,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rm_128(<4 x i32> %a, <4 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpor (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xeb,0x07]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rmk_128(<4 x i32> %a, <4 x i32>* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpord (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xeb,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rmkz_128(<4 x i32> %a, <4 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpord (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xeb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rmb_128(<4 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpord (%rdi){1to4}, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x18,0xeb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rmbk_128(<4 x i32> %a, i32* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpord (%rdi){1to4}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x19,0xeb,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_or_epi32_rmbkz_128(<4 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpord (%rdi){1to4}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x99,0xeb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.por.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rr_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpor %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xeb,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rrk_256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpord %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xeb,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rrkz_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpord %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xeb,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rm_256(<8 x i32> %a, <8 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpor (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xeb,0x07]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rmk_256(<8 x i32> %a, <8 x i32>* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpord (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xeb,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rmkz_256(<8 x i32> %a, <8 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpord (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xeb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rmb_256(<8 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpord (%rdi){1to8}, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x38,0xeb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rmbk_256(<8 x i32> %a, i32* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpord (%rdi){1to8}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x39,0xeb,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_or_epi32_rmbkz_256(<8 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_or_epi32_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpord (%rdi){1to8}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xb9,0xeb,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.por.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rr_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpxor %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xef,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rrk_128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpxord %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xef,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rrkz_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpxord %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xef,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rm_128(<4 x i32> %a, <4 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpxor (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xef,0x07]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rmk_128(<4 x i32> %a, <4 x i32>* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpxord (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xef,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rmkz_128(<4 x i32> %a, <4 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpxord (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xef,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rmb_128(<4 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpxord (%rdi){1to4}, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x18,0xef,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rmbk_128(<4 x i32> %a, i32* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpxord (%rdi){1to4}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x19,0xef,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_xor_epi32_rmbkz_128(<4 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpxord (%rdi){1to4}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x99,0xef,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pxor.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rr_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpxor %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xef,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rrk_256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpxord %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xef,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rrkz_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpxord %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xef,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rm_256(<8 x i32> %a, <8 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpxor (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xef,0x07]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rmk_256(<8 x i32> %a, <8 x i32>* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpxord (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xef,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rmkz_256(<8 x i32> %a, <8 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpxord (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xef,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rmb_256(<8 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpxord (%rdi){1to8}, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x38,0xef,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rmbk_256(<8 x i32> %a, i32* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpxord (%rdi){1to8}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x39,0xef,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_xor_epi32_rmbkz_256(<8 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_xor_epi32_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpxord (%rdi){1to8}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xb9,0xef,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pxor.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rr_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandnd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xdf,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rrk_128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandnd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xdf,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rrkz_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandnd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xdf,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rm_128(<4 x i32> %a, <4 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi), %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rmk_128(<4 x i32> %a, <4 x i32>* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xdf,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rmkz_128(<4 x i32> %a, <4 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rmb_128(<4 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi){1to4}, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x18,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rmbk_128(<4 x i32> %a, i32* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi){1to4}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x19,0xdf,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_andnot_epi32_rmbkz_128(<4 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi){1to4}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x99,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pandn.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rr_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandnd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xdf,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rrk_256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandnd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xdf,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rrkz_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandnd %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xdf,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rm_256(<8 x i32> %a, <8 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi), %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rmk_256(<8 x i32> %a, <8 x i32>* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xdf,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rmkz_256(<8 x i32> %a, <8 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rmb_256(<8 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi){1to8}, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x38,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rmbk_256(<8 x i32> %a, i32* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi){1to8}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x39,0xdf,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_andnot_epi32_rmbkz_256(<8 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi32_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnd (%rdi){1to8}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xb9,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pandn.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rr_128(<2 x i64> %a, <2 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-08-01 01:15:07 +08:00
|
|
|
; CHECK-NEXT: vpandnq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xdf,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> zeroinitializer, i8 -1)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rrk_128(<2 x i64> %a, <2 x i64> %b, <2 x i64> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandnq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0xdf,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> %passThru, i8 %mask)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rrkz_128(<2 x i64> %a, <2 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandnq %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0xdf,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> zeroinitializer, i8 %mask)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rm_128(<2 x i64> %a, <2 x i64>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-08-01 01:15:07 +08:00
|
|
|
; CHECK-NEXT: vpandnq (%rdi), %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xdf,0x07]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <2 x i64>, <2 x i64>* %ptr_b
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> zeroinitializer, i8 -1)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rmk_128(<2 x i64> %a, <2 x i64>* %ptr_b, <2 x i64> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0xdf,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <2 x i64>, <2 x i64>* %ptr_b
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> %passThru, i8 %mask)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rmkz_128(<2 x i64> %a, <2 x i64>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <2 x i64>, <2 x i64>* %ptr_b
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> zeroinitializer, i8 %mask)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rmb_128(<2 x i64> %a, i64* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi){1to2}, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x18,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%q = load i64, i64* %ptr_b
|
|
|
|
%vecinit.i = insertelement <2 x i64> undef, i64 %q, i32 0
|
|
|
|
%b = shufflevector <2 x i64> %vecinit.i, <2 x i64> undef, <2 x i32> zeroinitializer
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> zeroinitializer, i8 -1)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rmbk_128(<2 x i64> %a, i64* %ptr_b, <2 x i64> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi){1to2}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0xfd,0x19,0xdf,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%q = load i64, i64* %ptr_b
|
|
|
|
%vecinit.i = insertelement <2 x i64> undef, i64 %q, i32 0
|
|
|
|
%b = shufflevector <2 x i64> %vecinit.i, <2 x i64> undef, <2 x i32> zeroinitializer
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> %passThru, i8 %mask)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @test_mask_andnot_epi64_rmbkz_128(<2 x i64> %a, i64* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi){1to2}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x99,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%q = load i64, i64* %ptr_b
|
|
|
|
%vecinit.i = insertelement <2 x i64> undef, i64 %q, i32 0
|
|
|
|
%b = shufflevector <2 x i64> %vecinit.i, <2 x i64> undef, <2 x i32> zeroinitializer
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64> %a, <2 x i64> %b, <2 x i64> zeroinitializer, i8 %mask)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pandn.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rr_256(<4 x i64> %a, <4 x i64> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-08-01 01:15:07 +08:00
|
|
|
; CHECK-NEXT: vpandnq %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0xdf,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rrk_256(<4 x i64> %a, <4 x i64> %b, <4 x i64> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandnq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0xdf,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> %passThru, i8 %mask)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rrkz_256(<4 x i64> %a, <4 x i64> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpandnq %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0xdf,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rm_256(<4 x i64> %a, <4 x i64>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-08-01 01:15:07 +08:00
|
|
|
; CHECK-NEXT: vpandnq (%rdi), %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0xdf,0x07]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i64>, <4 x i64>* %ptr_b
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rmk_256(<4 x i64> %a, <4 x i64>* %ptr_b, <4 x i64> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0xdf,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i64>, <4 x i64>* %ptr_b
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> %passThru, i8 %mask)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rmkz_256(<4 x i64> %a, <4 x i64>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i64>, <4 x i64>* %ptr_b
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rmb_256(<4 x i64> %a, i64* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi){1to4}, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x38,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%q = load i64, i64* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i64> undef, i64 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i64> %vecinit.i, <4 x i64> undef, <4 x i32> zeroinitializer
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rmbk_256(<4 x i64> %a, i64* %ptr_b, <4 x i64> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi){1to4}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0xfd,0x39,0xdf,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-07-12 13:27:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%q = load i64, i64* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i64> undef, i64 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i64> %vecinit.i, <4 x i64> undef, <4 x i32> zeroinitializer
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> %passThru, i8 %mask)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @test_mask_andnot_epi64_rmbkz_256(<4 x i64> %a, i64* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_andnot_epi64_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpandnq (%rdi){1to4}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xb9,0xdf,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%q = load i64, i64* %ptr_b
|
|
|
|
%vecinit.i = insertelement <4 x i64> undef, i64 %q, i32 0
|
|
|
|
%b = shufflevector <4 x i64> %vecinit.i, <4 x i64> undef, <4 x i32> zeroinitializer
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64> %a, <4 x i64> %b, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pandn.q.256(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
2016-09-04 10:09:53 +08:00
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rr_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rrk_128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xfe,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rrkz_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xfe,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rm_128(<4 x i32> %a, <4 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0x07]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rmk_128(<4 x i32> %a, <4 x i32>* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xfe,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rmkz_128(<4 x i32> %a, <4 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xfe,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rmb_128(<4 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi){1to4}, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x18,0xfe,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rmbk_128(<4 x i32> %a, i32* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi){1to4}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x19,0xfe,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_add_epi32_rmbkz_128(<4 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi){1to4}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x99,0xfe,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.padd.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rr_128(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rr_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubd %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfa,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rrk_128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rrk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsubd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xfa,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc2]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rrkz_128(<4 x i32> %a, <4 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rrkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsubd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xfa,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rm_128(<4 x i32> %a, <4 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rm_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubd (%rdi), %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfa,0x07]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rmk_128(<4 x i32> %a, <4 x i32>* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi), %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xfa,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rmkz_128(<4 x i32> %a, <4 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi), %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xfa,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <4 x i32>, <4 x i32>* %ptr_b
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rmb_128(<4 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmb_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi){1to4}, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x18,0xfa,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rmbk_128(<4 x i32> %a, i32* %ptr_b, <4 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmbk_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi){1to4}, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x19,0xfa,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x6f,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> %passThru, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @test_mask_sub_epi32_rmbkz_128(<4 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmbkz_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi){1to4}, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x99,0xfa,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32> %a, <4 x i32> %b, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psub.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rr_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubd %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfa,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rrk_256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsubd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xfa,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rrkz_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsubd %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xfa,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rm_256(<8 x i32> %a, <8 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsubd (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfa,0x07]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rmk_256(<8 x i32> %a, <8 x i32>* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xfa,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rmkz_256(<8 x i32> %a, <8 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xfa,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rmb_256(<8 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi){1to8}, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x38,0xfa,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rmbk_256(<8 x i32> %a, i32* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi){1to8}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x39,0xfa,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_sub_epi32_rmbkz_256(<8 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_sub_epi32_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsubd (%rdi){1to8}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xb9,0xfa,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psub.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rr_256(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rr_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rrk_256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rrk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xfe,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc2]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rrkz_256(<8 x i32> %a, <8 x i32> %b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rrkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xfe,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rm_256(<8 x i32> %a, <8 x i32>* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rm_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd (%rdi), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0x07]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rmk_256(<8 x i32> %a, <8 x i32>* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi), %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xfe,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rmkz_256(<8 x i32> %a, <8 x i32>* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi), %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xfe,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%b = load <8 x i32>, <8 x i32>* %ptr_b
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rmb_256(<8 x i32> %a, i32* %ptr_b) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmb_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi){1to8}, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x38,0xfe,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rmbk_256(<8 x i32> %a, i32* %ptr_b, <8 x i32> %passThru, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmbk_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi){1to8}, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7d,0x39,0xfe,0x0f]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0x6f,0xc1]
|
2016-09-04 10:09:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> %passThru, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32> @test_mask_add_epi32_rmbkz_256(<8 x i32> %a, i32* %ptr_b, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_add_epi32_rmbkz_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpaddd (%rdi){1to8}, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xb9,0xfe,0x07]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%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
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32> %a, <8 x i32> %b, <8 x i32> zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.padd.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
2016-09-05 02:13:33 +08:00
|
|
|
define <8 x float> @test_mm512_maskz_add_ps_256(<8 x float> %a0, <8 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_maskz_add_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0xa9,0x58,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.add.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float>zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_mask_add_ps_256(<8 x float> %a0, <8 x float> %a1, <8 x float> %src, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mask_add_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x58,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.add.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float> %src, i8 %mask)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_add_ps_256(<8 x float> %a0, <8 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_add_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x58,0xc1]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.add.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float>zeroinitializer, i8 -1)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.add.ps.256(<8 x float>, <8 x float>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_maskz_add_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_maskz_add_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0x89,0x58,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.add.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float>zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_mask_add_ps_128(<4 x float> %a0, <4 x float> %a1, <4 x float> %src, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mask_add_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x58,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x28,0xc2]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.add.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float> %src, i8 %mask)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_add_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_add_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x58,0xc1]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.add.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float>zeroinitializer, i8 -1)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.add.ps.128(<4 x float>, <4 x float>, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_maskz_sub_ps_256(<8 x float> %a0, <8 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_maskz_sub_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vsubps %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0xa9,0x5c,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.sub.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float>zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_mask_sub_ps_256(<8 x float> %a0, <8 x float> %a1, <8 x float> %src, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mask_sub_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vsubps %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x5c,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.sub.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float> %src, i8 %mask)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_sub_ps_256(<8 x float> %a0, <8 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_sub_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vsubps %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x5c,0xc1]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.sub.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float>zeroinitializer, i8 -1)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.sub.ps.256(<8 x float>, <8 x float>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_maskz_sub_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_maskz_sub_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vsubps %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0x89,0x5c,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.sub.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float>zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_mask_sub_ps_128(<4 x float> %a0, <4 x float> %a1, <4 x float> %src, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mask_sub_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vsubps %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x5c,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x28,0xc2]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.sub.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float> %src, i8 %mask)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_sub_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_sub_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vsubps %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x5c,0xc1]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.sub.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float>zeroinitializer, i8 -1)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.sub.ps.128(<4 x float>, <4 x float>, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_maskz_mul_ps_256(<8 x float> %a0, <8 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_maskz_mul_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmulps %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0xa9,0x59,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.mul.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float>zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_mask_mul_ps_256(<8 x float> %a0, <8 x float> %a1, <8 x float> %src, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mask_mul_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmulps %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x59,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.mul.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float> %src, i8 %mask)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_mul_ps_256(<8 x float> %a0, <8 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mul_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmulps %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x59,0xc1]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.mul.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float>zeroinitializer, i8 -1)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.mul.ps.256(<8 x float>, <8 x float>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_maskz_mul_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_maskz_mul_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmulps %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0x89,0x59,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.mul.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float>zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_mask_mul_ps_128(<4 x float> %a0, <4 x float> %a1, <4 x float> %src, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mask_mul_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vmulps %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x59,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x28,0xc2]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.mul.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float> %src, i8 %mask)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_mul_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mul_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmulps %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x59,0xc1]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.mul.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float>zeroinitializer, i8 -1)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.mul.ps.128(<4 x float>, <4 x float>, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_maskz_div_ps_256(<8 x float> %a0, <8 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_maskz_div_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vdivps %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0xa9,0x5e,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.div.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float>zeroinitializer, i8 %mask)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_mask_div_ps_256(<8 x float> %a0, <8 x float> %a1, <8 x float> %src, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mask_div_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vdivps %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0x5e,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x28,0xc2]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.div.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float> %src, i8 %mask)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_mm512_div_ps_256(<8 x float> %a0, <8 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_div_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vdivps %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x5e,0xc1]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.div.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float>zeroinitializer, i8 -1)
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.div.ps.256(<8 x float>, <8 x float>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_maskz_div_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_maskz_div_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vdivps %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0x89,0x5e,0xc1]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.div.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float>zeroinitializer, i8 %mask)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_mask_div_ps_128(<4 x float> %a0, <4 x float> %a1, <4 x float> %src, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_mask_div_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vdivps %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0x5e,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovaps %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x28,0xc2]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.div.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float> %src, i8 %mask)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_mm512_div_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_mm512_div_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vdivps %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0x5e,0xc1]
|
2016-09-05 02:13:33 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.div.ps.128(<4 x float> %a0, <4 x float> %a1, <4 x float>zeroinitializer, i8 -1)
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.div.ps.128(<4 x float>, <4 x float>, <4 x float>, i8)
|
|
|
|
|
2016-09-13 15:40:53 +08:00
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.shuf.pd.128(<2 x double>, <2 x double>, i32, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double>@test_int_x86_avx512_mask_shuf_pd_128(<2 x double> %x0, <2 x double> %x1, <2 x double> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_shuf_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vshufpd $1, %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xc6,0xd9,0x01]
|
2016-09-13 15:40:53 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[1],xmm1[0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vshufpd $1, %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0xc6,0xd1,0x01]
|
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm0[1],xmm1[0]
|
|
|
|
; CHECK-NEXT: vshufpd $1, %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0xc6,0xc1,0x01]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[1],xmm1[0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm3, %xmm2, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0x58,0xcb]
|
|
|
|
; CHECK-NEXT: vaddpd %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x58,0xc1]
|
2016-09-13 15:40:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.shuf.pd.128(<2 x double> %x0, <2 x double> %x1, i32 1, <2 x double> %x3, i8 %x4)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.shuf.pd.128(<2 x double> %x0, <2 x double> %x1, i32 1, <2 x double> %x3, i8 -1)
|
|
|
|
%res2 = call <2 x double> @llvm.x86.avx512.mask.shuf.pd.128(<2 x double> %x0, <2 x double> %x1, i32 1, <2 x double> zeroinitializer, i8 %x4)
|
|
|
|
%res3 = fadd <2 x double> %res, %res1
|
|
|
|
%res4 = fadd <2 x double> %res2, %res3
|
|
|
|
ret <2 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.shuf.pd.256(<4 x double>, <4 x double>, i32, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_shuf_pd_256(<4 x double> %x0, <4 x double> %x1, <4 x double> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_shuf_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vshufpd $6, %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xc6,0xd9,0x06]
|
2016-09-13 15:40:53 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[0],ymm1[1],ymm0[3],ymm1[2]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vshufpd $6, %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0xc6,0xd1,0x06]
|
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm0[0],ymm1[1],ymm0[3],ymm1[2]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x58,0xc3]
|
2016-09-13 15:40:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.shuf.pd.256(<4 x double> %x0, <4 x double> %x1, i32 6, <4 x double> %x3, i8 %x4)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.shuf.pd.256(<4 x double> %x0, <4 x double> %x1, i32 6, <4 x double> %x3, i8 -1)
|
|
|
|
%res2 = fadd <4 x double> %res, %res1
|
|
|
|
ret <4 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.shuf.ps.128(<4 x float>, <4 x float>, i32, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float>@test_int_x86_avx512_mask_shuf_ps_128(<4 x float> %x0, <4 x float> %x1, <4 x float> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_shuf_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vshufps $22, %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf8,0xc6,0xd9,0x16]
|
2016-09-13 15:40:53 +08:00
|
|
|
; CHECK-NEXT: ## xmm3 = xmm0[2,1],xmm1[1,0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vshufps $22, %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x09,0xc6,0xd1,0x16]
|
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm0[2,1],xmm1[1,0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe8,0x58,0xc3]
|
2016-09-13 15:40:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.shuf.ps.128(<4 x float> %x0, <4 x float> %x1, i32 22, <4 x float> %x3, i8 %x4)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.shuf.ps.128(<4 x float> %x0, <4 x float> %x1, i32 22, <4 x float> %x3, i8 -1)
|
|
|
|
%res2 = fadd <4 x float> %res, %res1
|
|
|
|
ret <4 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.shuf.ps.256(<8 x float>, <8 x float>, i32, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float>@test_int_x86_avx512_mask_shuf_ps_256(<8 x float> %x0, <8 x float> %x1, <8 x float> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_shuf_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vshufps $22, %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0xc6,0xd9,0x16]
|
2016-09-13 15:40:53 +08:00
|
|
|
; CHECK-NEXT: ## ymm3 = ymm0[2,1],ymm1[1,0],ymm0[6,5],ymm1[5,4]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vshufps $22, %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7c,0x29,0xc6,0xd1,0x16]
|
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm0[2,1],ymm1[1,0],ymm0[6,5],ymm1[5,4]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xec,0x58,0xc3]
|
2016-09-13 15:40:53 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.shuf.ps.256(<8 x float> %x0, <8 x float> %x1, i32 22, <8 x float> %x3, i8 %x4)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.shuf.ps.256(<8 x float> %x0, <8 x float> %x1, i32 22, <8 x float> %x3, i8 -1)
|
|
|
|
%res2 = fadd <8 x float> %res, %res1
|
|
|
|
ret <8 x float> %res2
|
|
|
|
}
|
|
|
|
|
2016-10-24 12:04:16 +08:00
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pmaxs.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pmaxs_d_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaxs_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmaxsd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x3d,0xd1]
|
|
|
|
; CHECK-NEXT: vpmaxsd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x3d,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pmaxs.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2 ,i8 %mask)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pmaxs.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res2 = add <4 x i32> %res, %res1
|
|
|
|
ret <4 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pmaxs.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pmaxs_d_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaxs_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmaxsd %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x3d,0xd9]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmaxsd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x3d,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc3]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pmaxs.d.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pmaxs.d.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i32> %res, %res1
|
|
|
|
ret <8 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pmaxs.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pmaxs_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaxs_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpmaxsq %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x3d,0xd9]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmaxsq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x3d,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc3]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pmaxs.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pmaxs.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res2 = add <2 x i64> %res, %res1
|
|
|
|
ret <2 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pmaxs.q.256(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pmaxs_q_256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaxs_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmaxsq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x3d,0xd1]
|
|
|
|
; CHECK-NEXT: vpmaxsq %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x3d,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pmaxs.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %mask)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pmaxs.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
%res2 = add <4 x i64> %res, %res1
|
|
|
|
ret <4 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pmaxu.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pmaxu_d_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2,i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaxu_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmaxud %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x3f,0xd1]
|
|
|
|
; CHECK-NEXT: vpmaxud %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x3f,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pmaxu.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %mask)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pmaxu.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res2 = add <4 x i32> %res, %res1
|
|
|
|
ret <4 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pmaxu.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pmaxu_d_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaxu_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmaxud %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x3f,0xd9]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmaxud %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x3f,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc3]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pmaxu.d.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pmaxu.d.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i32> %res, %res1
|
|
|
|
ret <8 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pmaxu.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pmaxu_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaxu_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpmaxuq %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x3f,0xd9]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmaxuq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x3f,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc3]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pmaxu.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pmaxu.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res2 = add <2 x i64> %res, %res1
|
|
|
|
ret <2 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pmaxu.q.256(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pmaxu_q_256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmaxu_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmaxuq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x3f,0xd1]
|
|
|
|
; CHECK-NEXT: vpmaxuq %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x3f,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pmaxu.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %mask)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pmaxu.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
%res2 = add <4 x i64> %res, %res1
|
|
|
|
ret <4 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pmins.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pmins_d_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmins_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpminsd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x39,0xd1]
|
|
|
|
; CHECK-NEXT: vpminsd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x39,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pmins.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %mask)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pmins.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res2 = add <4 x i32> %res, %res1
|
|
|
|
ret <4 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pmins.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pmins_d_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmins_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpminsd %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x39,0xd9]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpminsd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x39,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc3]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pmins.d.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pmins.d.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i32> %res, %res1
|
|
|
|
ret <8 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pmins.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pmins_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmins_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpminsq %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x39,0xd9]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpminsq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x39,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc3]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pmins.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pmins.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res2 = add <2 x i64> %res, %res1
|
|
|
|
ret <2 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pmins.q.256(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pmins_q_256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmins_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpminsq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x39,0xd1]
|
|
|
|
; CHECK-NEXT: vpminsq %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x39,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pmins.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %mask)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pmins.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
%res2 = add <4 x i64> %res, %res1
|
|
|
|
ret <4 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pminu.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pminu_d_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pminu_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpminud %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x3b,0xd1]
|
|
|
|
; CHECK-NEXT: vpminud %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x3b,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pminu.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %mask)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pminu.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %mask)
|
|
|
|
%res2 = add <4 x i32> %res, %res1
|
|
|
|
ret <4 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pminu.d.256(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pminu_d_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pminu_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpminud %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x3b,0xd9]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpminud %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x3b,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc3]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pminu.d.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pminu.d.256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = add <8 x i32> %res, %res1
|
|
|
|
ret <8 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pminu.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pminu_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pminu_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpminuq %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x3b,0xd9]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpminuq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x3b,0xd1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc3]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pminu.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pminu.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res2 = add <2 x i64> %res, %res1
|
|
|
|
ret <2 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pminu.q.256(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pminu_q_256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %mask) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pminu_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpminuq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x3b,0xd1]
|
|
|
|
; CHECK-NEXT: vpminuq %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x3b,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
2016-10-24 12:04:16 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pminu.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %mask)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pminu.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> zeroinitializer, i8 %mask)
|
|
|
|
%res2 = add <4 x i64> %res, %res1
|
|
|
|
ret <4 x i64> %res2
|
|
|
|
}
|
|
|
|
|
2016-11-07 00:29:08 +08:00
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.psrl.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_psrl_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrl_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrlq %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd3,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrlq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0xd3,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrlq %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0xd3,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm2, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xcb]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.psrl.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.psrl.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.psrl.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.psrl.q.256(<4 x i64>, <2 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_psrl_q_256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrl_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrlq %xmm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd3,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrlq %xmm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0xd3,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrlq %xmm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0xd3,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm2, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xcb]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.psrl.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.psrl.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 -1)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.psrl.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psrl.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_psrl_d_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrl_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrld %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd2,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrld %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xd2,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrld %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xd2,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm2, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xcb]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psrl.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.psrl.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 -1)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.psrl.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psrl.d.256(<8 x i32>, <4 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psrl_d_256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrl_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrld %xmm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd2,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrld %xmm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xd2,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrld %xmm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xd2,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm2, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xcb]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc1]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psrl.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.psrl.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.psrl.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res2, %res3
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psra.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_psra_d_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psra_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrad %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xe2,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrad %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xe2,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrad %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xe2,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc3]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psra.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.psra.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.psra.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psra.d.256(<8 x i32>, <4 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psra_d_256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psra_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrad %xmm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe2,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrad %xmm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xe2,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrad %xmm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xe2,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc3]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psra.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.psra.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.psra.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psll.d.128(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_psll_d_128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psll_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpslld %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xf2,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpslld %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x09,0xf2,0xd1]
|
|
|
|
; CHECK-NEXT: vpslld %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0xf2,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc3]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psll.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.psll.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.psll.d.128(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psll.d.256(<8 x i32>, <4 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psll_d_256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psll_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpslld %xmm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xf2,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpslld %xmm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0x7d,0x29,0xf2,0xd1]
|
|
|
|
; CHECK-NEXT: vpslld %xmm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0xf2,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc3]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psll.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.psll.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.psll.d.256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.psll.q.256(<4 x i64>, <2 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_psll_q_256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psll_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsllq %xmm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xf3,0xd9]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsllq %xmm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0xf3,0xd1]
|
|
|
|
; CHECK-NEXT: vpsllq %xmm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0xf3,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc3]
|
2016-11-07 00:29:08 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.psll.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.psll.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.psll.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
2016-11-07 00:29:14 +08:00
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.psrl.qi.128(<2 x i64>, i32, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_psrl_qi_128(<2 x i64> %x0, i32 %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrl_qi_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrlq $3, %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0x73,0xd0,0x03]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsrlq $3, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0xf5,0x09,0x73,0xd0,0x03]
|
|
|
|
; CHECK-NEXT: vpsrlq $3, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0x73,0xd0,0x03]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm2, %xmm1, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xca]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc1]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.psrl.qi.128(<2 x i64> %x0, i32 3, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.psrl.qi.128(<2 x i64> %x0, i32 3, <2 x i64> %x2, i8 -1)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.psrl.qi.128(<2 x i64> %x0, i32 3, <2 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res2, %res3
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.psrl.qi.256(<4 x i64>, i32, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_psrl_qi_256(<4 x i64> %x0, i32 %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrl_qi_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrlq $3, %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x73,0xd0,0x03]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsrlq $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0xf5,0x29,0x73,0xd0,0x03]
|
|
|
|
; CHECK-NEXT: vpsrlq $3, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0x73,0xd0,0x03]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm2, %ymm1, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xca]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc1]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.psrl.qi.256(<4 x i64> %x0, i32 3, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.psrl.qi.256(<4 x i64> %x0, i32 3, <4 x i64> %x2, i8 -1)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.psrl.qi.256(<4 x i64> %x0, i32 3, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res2, %res3
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psrl.di.128(<4 x i32>, i32, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_psrl_di_128(<4 x i32> %x0, i32 %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrl_di_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrld $3, %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0x72,0xd0,0x03]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsrld $3, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x75,0x09,0x72,0xd0,0x03]
|
|
|
|
; CHECK-NEXT: vpsrld $3, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x72,0xd0,0x03]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm2, %xmm1, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xca]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc1]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psrl.di.128(<4 x i32> %x0, i32 3, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.psrl.di.128(<4 x i32> %x0, i32 3, <4 x i32> %x2, i8 -1)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.psrl.di.128(<4 x i32> %x0, i32 3, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res2, %res3
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psrl.di.256(<8 x i32>, i32, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psrl_di_256(<8 x i32> %x0, i32 %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrl_di_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrld $3, %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x72,0xd0,0x03]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsrld $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x75,0x29,0x72,0xd0,0x03]
|
|
|
|
; CHECK-NEXT: vpsrld $3, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x72,0xd0,0x03]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm2, %ymm1, %ymm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xca]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc1]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psrl.di.256(<8 x i32> %x0, i32 3, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.psrl.di.256(<8 x i32> %x0, i32 3, <8 x i32> %x2, i8 -1)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.psrl.di.256(<8 x i32> %x0, i32 3, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res2, %res3
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psll.di.128(<4 x i32>, i32, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_psll_di_128(<4 x i32> %x0, i32 %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psll_di_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpslld $3, %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0x72,0xf0,0x03]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpslld $3, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x75,0x09,0x72,0xf0,0x03]
|
|
|
|
; CHECK-NEXT: vpslld $3, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0x89,0x72,0xf0,0x03]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc2]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psll.di.128(<4 x i32> %x0, i32 3, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.psll.di.128(<4 x i32> %x0, i32 3, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.psll.di.128(<4 x i32> %x0, i32 3, <4 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psll.di.256(<8 x i32>, i32, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psll_di_256(<8 x i32> %x0, i32 %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psll_di_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpslld $3, %ymm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x72,0xf0,0x03]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpslld $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x75,0x29,0x72,0xf0,0x03]
|
|
|
|
; CHECK-NEXT: vpslld $3, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x72,0xf0,0x03]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc2]
|
2016-11-07 00:29:14 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psll.di.256(<8 x i32> %x0, i32 3, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.psll.di.256(<8 x i32> %x0, i32 3, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.psll.di.256(<8 x i32> %x0, i32 3, <8 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
2016-11-07 00:29:19 +08:00
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.psrlv2.di(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_psrlv2_di(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrlv2_di:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrlvq %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0xf9,0x45,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrlvq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x45,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrlvq %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x45,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.psrlv2.di(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.psrlv2.di(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.psrlv2.di(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.psrlv4.di(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_psrlv4_di(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrlv4_di:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrlvq %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0xfd,0x45,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrlvq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x45,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrlvq %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x45,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.psrlv4.di(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.psrlv4.di(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.psrlv4.di(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psrlv4.si(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_psrlv4_si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrlv4_si:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrlvd %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x45,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrlvd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x45,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrlvd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x45,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psrlv4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.psrlv4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.psrlv4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psrlv8.si(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psrlv8_si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrlv8_si:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsrlvd %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x45,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsrlvd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x45,0xd1]
|
|
|
|
; CHECK-NEXT: vpsrlvd %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x45,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psrlv8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.psrlv8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.psrlv8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psrav4.si(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_psrav4_si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrav4_si:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsravd %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x46,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsravd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x46,0xd1]
|
|
|
|
; CHECK-NEXT: vpsravd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x46,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psrav4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.psrav4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.psrav4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psrav8.si(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psrav8_si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrav8_si:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsravd %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x46,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsravd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x46,0xd1]
|
|
|
|
; CHECK-NEXT: vpsravd %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x46,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psrav8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.psrav8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.psrav8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psrav8_si_const() {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrav8_si_const:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa {{.*}}(%rip), %ymm0 ## EVEX TO VEX Compression ymm0 = [2,9,4294967284,23,4294967270,37,4294967256,51]
|
|
|
|
; CHECK-NEXT: ## encoding: [0xc5,0xfd,0x6f,0x05,A,A,A,A]
|
|
|
|
; CHECK-NEXT: ## fixup A - offset: 4, value: LCPI276_0-4, kind: reloc_riprel_4byte
|
|
|
|
; CHECK-NEXT: vpsravd {{.*}}(%rip), %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x46,0x05,A,A,A,A]
|
|
|
|
; CHECK-NEXT: ## fixup A - offset: 5, value: LCPI276_1-4, kind: reloc_riprel_4byte
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psrav8.si(<8 x i32> <i32 2, i32 9, i32 -12, i32 23, i32 -26, i32 37, i32 -40, i32 51>, <8 x i32> <i32 1, i32 18, i32 35, i32 52, i32 69, i32 15, i32 32, i32 49>, <8 x i32> zeroinitializer, i8 -1)
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.psllv2.di(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_psllv2_di(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psllv2_di:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsllvq %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0xf9,0x47,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsllvq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x47,0xd1]
|
|
|
|
; CHECK-NEXT: vpsllvq %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x47,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.psllv2.di(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.psllv2.di(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.psllv2.di(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.psllv4.di(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_psllv4_di(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psllv4_di:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsllvq %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0xfd,0x47,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsllvq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x47,0xd1]
|
|
|
|
; CHECK-NEXT: vpsllvq %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x47,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.psllv4.di(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.psllv4.di(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.psllv4.di(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.psllv4.si(<4 x i32>, <4 x i32>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_psllv4_si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psllv4_si:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsllvd %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x47,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsllvd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x47,0xd1]
|
|
|
|
; CHECK-NEXT: vpsllvd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x47,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.psllv4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.psllv4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.psllv4.si(<4 x i32> %x0, <4 x i32> %x1, <4 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.psllv8.si(<8 x i32>, <8 x i32>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_psllv8_si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psllv8_si:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpsllvd %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x47,0xd9]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsllvd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x47,0xd1]
|
|
|
|
; CHECK-NEXT: vpsllvd %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x47,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc3]
|
2016-11-07 00:29:19 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.psllv8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.psllv8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.psllv8.si(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x2, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
2016-11-07 10:12:57 +08:00
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pmovzxb.d.128(<16 x i8>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pmovzxb_d_128(<16 x i8> %x0, <4 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxb_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxbd %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x31,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxbd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x31,0xc8]
|
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
|
|
|
|
; CHECK-NEXT: vpmovzxbd %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x31,0xc0]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pmovzxb.d.128(<16 x i8> %x0, <4 x i32> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pmovzxb.d.128(<16 x i8> %x0, <4 x i32> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.pmovzxb.d.128(<16 x i8> %x0, <4 x i32> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pmovzxb.d.256(<16 x i8>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pmovzxb_d_256(<16 x i8> %x0, <8 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxb_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxbd %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x31,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxbd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x31,0xc8]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero
|
|
|
|
; CHECK-NEXT: vpmovzxbd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x31,0xc0]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pmovzxb.d.256(<16 x i8> %x0, <8 x i32> %x1, i8 %x2)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pmovzxb.d.256(<16 x i8> %x0, <8 x i32> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.pmovzxb.d.256(<16 x i8> %x0, <8 x i32> %x1, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pmovzxb.q.128(<16 x i8>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pmovzxb_q_128(<16 x i8> %x0, <2 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxb_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxbq %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x32,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxbq %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x32,0xc8]
|
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero
|
|
|
|
; CHECK-NEXT: vpmovzxbq %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x32,0xc0]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pmovzxb.q.128(<16 x i8> %x0, <2 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pmovzxb.q.128(<16 x i8> %x0, <2 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.pmovzxb.q.128(<16 x i8> %x0, <2 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pmovzxb.q.256(<16 x i8>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pmovzxb_q_256(<16 x i8> %x0, <4 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxb_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxbq %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x32,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero,xmm0[2],zero,zero,zero,zero,zero,zero,zero,xmm0[3],zero,zero,zero,zero,zero,zero,zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxbq %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x32,0xc8]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero,xmm0[2],zero,zero,zero,zero,zero,zero,zero,xmm0[3],zero,zero,zero,zero,zero,zero,zero
|
|
|
|
; CHECK-NEXT: vpmovzxbq %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x32,0xc0]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = xmm0[0],zero,zero,zero,zero,zero,zero,zero,xmm0[1],zero,zero,zero,zero,zero,zero,zero,xmm0[2],zero,zero,zero,zero,zero,zero,zero,xmm0[3],zero,zero,zero,zero,zero,zero,zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pmovzxb.q.256(<16 x i8> %x0, <4 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pmovzxb.q.256(<16 x i8> %x0, <4 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.pmovzxb.q.256(<16 x i8> %x0, <4 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pmovzxd.q.128(<4 x i32>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pmovzxd_q_128(<4 x i32> %x0, <2 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxd_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxdq %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x35,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[0],zero,xmm0[1],zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxdq %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x35,0xc8]
|
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[0],zero,xmm0[1],zero
|
|
|
|
; CHECK-NEXT: vpmovzxdq %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x35,0xc0]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[0],zero,xmm0[1],zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pmovzxd.q.128(<4 x i32> %x0, <2 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pmovzxd.q.128(<4 x i32> %x0, <2 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.pmovzxd.q.128(<4 x i32> %x0, <2 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pmovzxd.q.256(<4 x i32>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pmovzxd_q_256(<4 x i32> %x0, <4 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxd_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxdq %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x35,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxdq %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x35,0xc8]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
|
|
|
|
; CHECK-NEXT: vpmovzxdq %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x35,0xc0]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pmovzxd.q.256(<4 x i32> %x0, <4 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pmovzxd.q.256(<4 x i32> %x0, <4 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.pmovzxd.q.256(<4 x i32> %x0, <4 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pmovzxw.d.128(<8 x i16>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pmovzxw_d_128(<8 x i16> %x0, <4 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxw_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxwd %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x33,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxwd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x33,0xc8]
|
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
|
|
|
|
; CHECK-NEXT: vpmovzxwd %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x33,0xc0]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pmovzxw.d.128(<8 x i16> %x0, <4 x i32> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pmovzxw.d.128(<8 x i16> %x0, <4 x i32> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.pmovzxw.d.128(<8 x i16> %x0, <4 x i32> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pmovzxw.d.256(<8 x i16>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pmovzxw_d_256(<8 x i16> %x0, <8 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxw_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxwd %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x33,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxwd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x33,0xc8]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
|
|
|
|
; CHECK-NEXT: vpmovzxwd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x33,0xc0]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pmovzxw.d.256(<8 x i16> %x0, <8 x i32> %x1, i8 %x2)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pmovzxw.d.256(<8 x i16> %x0, <8 x i32> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.pmovzxw.d.256(<8 x i16> %x0, <8 x i32> %x1, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pmovzxw.q.128(<8 x i16>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pmovzxw_q_128(<8 x i16> %x0, <2 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxw_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxwq %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x34,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## xmm2 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxwq %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x34,0xc8]
|
|
|
|
; CHECK-NEXT: ## xmm1 {%k1} = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero
|
|
|
|
; CHECK-NEXT: vpmovzxwq %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x34,0xc0]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pmovzxw.q.128(<8 x i16> %x0, <2 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pmovzxw.q.128(<8 x i16> %x0, <2 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.pmovzxw.q.128(<8 x i16> %x0, <2 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pmovzxw.q.256(<8 x i16>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pmovzxw_q_256(<8 x i16> %x0, <4 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovzxw_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovzxwq %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x34,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: ## ymm2 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovzxwq %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x34,0xc8]
|
|
|
|
; CHECK-NEXT: ## ymm1 {%k1} = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
|
|
|
|
; CHECK-NEXT: vpmovzxwq %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x34,0xc0]
|
|
|
|
; CHECK-NEXT: ## ymm0 {%k1} {z} = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pmovzxw.q.256(<8 x i16> %x0, <4 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pmovzxw.q.256(<8 x i16> %x0, <4 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.pmovzxw.q.256(<8 x i16> %x0, <4 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pmovsxb.d.128(<16 x i8>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pmovsxb_d_128(<16 x i8> %x0, <4 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovsxb_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovsxbd %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x21,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovsxbd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x21,0xc8]
|
|
|
|
; CHECK-NEXT: vpmovsxbd %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x21,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pmovsxb.d.128(<16 x i8> %x0, <4 x i32> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pmovsxb.d.128(<16 x i8> %x0, <4 x i32> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.pmovsxb.d.128(<16 x i8> %x0, <4 x i32> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pmovsxb.d.256(<16 x i8>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pmovsxb_d_256(<16 x i8> %x0, <8 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovsxb_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovsxbd %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x21,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovsxbd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x21,0xc8]
|
|
|
|
; CHECK-NEXT: vpmovsxbd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x21,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pmovsxb.d.256(<16 x i8> %x0, <8 x i32> %x1, i8 %x2)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pmovsxb.d.256(<16 x i8> %x0, <8 x i32> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.pmovsxb.d.256(<16 x i8> %x0, <8 x i32> %x1, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pmovsxb.q.128(<16 x i8>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pmovsxb_q_128(<16 x i8> %x0, <2 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovsxb_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovsxbq %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x22,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovsxbq %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x22,0xc8]
|
|
|
|
; CHECK-NEXT: vpmovsxbq %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x22,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pmovsxb.q.128(<16 x i8> %x0, <2 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pmovsxb.q.128(<16 x i8> %x0, <2 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.pmovsxb.q.128(<16 x i8> %x0, <2 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pmovsxb.q.256(<16 x i8>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pmovsxb_q_256(<16 x i8> %x0, <4 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovsxb_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovsxbq %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x22,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovsxbq %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x22,0xc8]
|
|
|
|
; CHECK-NEXT: vpmovsxbq %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x22,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pmovsxb.q.256(<16 x i8> %x0, <4 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pmovsxb.q.256(<16 x i8> %x0, <4 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.pmovsxb.q.256(<16 x i8> %x0, <4 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.pmovsxw.d.128(<8 x i16>, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_pmovsxw_d_128(<8 x i16> %x0, <4 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovsxw_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovsxwd %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x23,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovsxwd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x23,0xc8]
|
|
|
|
; CHECK-NEXT: vpmovsxwd %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x23,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfe,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.pmovsxw.d.128(<8 x i16> %x0, <4 x i32> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.pmovsxw.d.128(<8 x i16> %x0, <4 x i32> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.pmovsxw.d.128(<8 x i16> %x0, <4 x i32> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.pmovsxw.d.256(<8 x i16>, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_pmovsxw_d_256(<8 x i16> %x0, <8 x i32> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovsxw_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovsxwd %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x23,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovsxwd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x23,0xc8]
|
|
|
|
; CHECK-NEXT: vpmovsxwd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x23,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xfe,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.pmovsxw.d.256(<8 x i16> %x0, <8 x i32> %x1, i8 %x2)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.pmovsxw.d.256(<8 x i16> %x0, <8 x i32> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.pmovsxw.d.256(<8 x i16> %x0, <8 x i32> %x1, i8 -1)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res3, %res2
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.pmovsxw.q.128(<8 x i16>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_pmovsxw_q_128(<8 x i16> %x0, <2 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovsxw_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovsxwq %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x24,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovsxwq %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x24,0xc8]
|
|
|
|
; CHECK-NEXT: vpmovsxwq %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x24,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.pmovsxw.q.128(<8 x i16> %x0, <2 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.pmovsxw.q.128(<8 x i16> %x0, <2 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.pmovsxw.q.128(<8 x i16> %x0, <2 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.pmovsxw.q.256(<8 x i16>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_pmovsxw_q_256(<8 x i16> %x0, <4 x i64> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_pmovsxw_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpmovsxwq %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x24,0xd0]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpmovsxwq %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x24,0xc8]
|
|
|
|
; CHECK-NEXT: vpmovsxwq %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x24,0xc0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc2]
|
2016-11-07 10:12:57 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.pmovsxw.q.256(<8 x i16> %x0, <4 x i64> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.pmovsxw.q.256(<8 x i16> %x0, <4 x i64> zeroinitializer, i8 %x2)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.pmovsxw.q.256(<8 x i16> %x0, <4 x i64> %x1, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
2016-11-13 02:04:46 +08:00
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.psra.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_psra_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psra_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpsraq %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf1,0xfd,0x08,0xe2,0xd9]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsraq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x09,0xe2,0xd1]
|
|
|
|
; CHECK-NEXT: vpsraq %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0xe2,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc3]
|
2016-11-13 02:04:46 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.psra.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.psra.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.psra.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.psra.q.256(<4 x i64>, <2 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_psra_q_256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psra_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpsraq %xmm1, %ymm0, %ymm3 ## encoding: [0x62,0xf1,0xfd,0x28,0xe2,0xd9]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsraq %xmm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf1,0xfd,0x29,0xe2,0xd1]
|
|
|
|
; CHECK-NEXT: vpsraq %xmm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0xe2,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc3]
|
2016-11-13 02:04:46 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.psra.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.psra.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.psra.q.256(<4 x i64> %x0, <2 x i64> %x1, <4 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.psra.qi.128(<2 x i64>, i32, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_psra_qi_128(<2 x i64> %x0, i32 %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psra_qi_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpsraq $3, %xmm0, %xmm2 ## encoding: [0x62,0xf1,0xed,0x08,0x72,0xe0,0x03]
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsraq $3, %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0xf5,0x09,0x72,0xe0,0x03]
|
|
|
|
; CHECK-NEXT: vpsraq $3, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0x89,0x72,0xe0,0x03]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm2, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc2]
|
2016-11-13 02:04:46 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.psra.qi.128(<2 x i64> %x0, i32 3, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.psra.qi.128(<2 x i64> %x0, i32 3, <2 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.psra.qi.128(<2 x i64> %x0, i32 3, <2 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.psra.qi.256(<4 x i64>, i32, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_psra_qi_256(<4 x i64> %x0, i32 %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psra_qi_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpsraq $3, %ymm0, %ymm2 ## encoding: [0x62,0xf1,0xed,0x28,0x72,0xe0,0x03]
|
|
|
|
; CHECK-NEXT: kmovw %esi, %k1 ## encoding: [0xc5,0xf8,0x92,0xce]
|
|
|
|
; CHECK-NEXT: vpsraq $3, %ymm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0xf5,0x29,0x72,0xe0,0x03]
|
|
|
|
; CHECK-NEXT: vpsraq $3, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf1,0xfd,0xa9,0x72,0xe0,0x03]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm2, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc2]
|
2016-11-13 02:04:46 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.psra.qi.256(<4 x i64> %x0, i32 3, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.psra.qi.256(<4 x i64> %x0, i32 3, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.psra.qi.256(<4 x i64> %x0, i32 3, <4 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
2016-11-14 09:53:22 +08:00
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.psrav.q.128(<2 x i64>, <2 x i64>, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_psrav_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrav_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpsravq %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf2,0xfd,0x08,0x46,0xd9]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsravq %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x46,0xd1]
|
|
|
|
; CHECK-NEXT: vpsravq %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x46,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0xd4,0xc3]
|
2016-11-14 09:53:22 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.psrav.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.psrav.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <2 x i64> @llvm.x86.avx512.mask.psrav.q.128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <2 x i64> %res, %res1
|
|
|
|
%res4 = add <2 x i64> %res3, %res2
|
|
|
|
ret <2 x i64> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_psrav_q_128_const(i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrav_q_128_const:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vmovdqa {{.*}}(%rip), %xmm0 ## EVEX TO VEX Compression xmm0 = [2,18446744073709551607]
|
|
|
|
; CHECK-NEXT: ## encoding: [0xc5,0xf9,0x6f,0x05,A,A,A,A]
|
|
|
|
; CHECK-NEXT: ## fixup A - offset: 4, value: LCPI304_0-4, kind: reloc_riprel_4byte
|
2016-11-14 09:53:22 +08:00
|
|
|
; CHECK-NEXT: vpsravq {{.*}}(%rip), %xmm0, %xmm0 ## encoding: [0x62,0xf2,0xfd,0x08,0x46,0x05,A,A,A,A]
|
|
|
|
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI304_1-4, kind: reloc_riprel_4byte
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.psrav.q.128(<2 x i64> <i64 2, i64 -9>, <2 x i64> <i64 1, i64 90>, <2 x i64> zeroinitializer, i8 -1)
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.psrav.q.256(<4 x i64>, <4 x i64>, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_psrav_q_256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_psrav_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vpsravq %ymm1, %ymm0, %ymm3 ## encoding: [0x62,0xf2,0xfd,0x28,0x46,0xd9]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpsravq %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x46,0xd1]
|
|
|
|
; CHECK-NEXT: vpsravq %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x46,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfd,0xd4,0xc3]
|
2016-11-14 09:53:22 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.psrav.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.psrav.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x i64> @llvm.x86.avx512.mask.psrav.q.256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x2, i8 -1)
|
|
|
|
%res3 = add <4 x i64> %res, %res1
|
|
|
|
%res4 = add <4 x i64> %res3, %res2
|
|
|
|
ret <4 x i64> %res4
|
|
|
|
}
|
|
|
|
|
2016-11-16 22:48:32 +08:00
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.cvtdq2pd.128(<4 x i32>, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double>@test_int_x86_avx512_mask_cvt_dq2pd_128(<4 x i32> %x0, <2 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_cvt_dq2pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vcvtdq2pd %xmm0, %xmm2 ## EVEX TO VEX Compression encoding: [0xc5,0xfa,0xe6,0xd0]
|
2016-11-16 22:48:32 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vcvtdq2pd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0xe6,0xc8]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm2, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0x58,0xc2]
|
2016-11-16 22:48:32 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.cvtdq2pd.128(<4 x i32> %x0, <2 x double> %x1, i8 %x2)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.cvtdq2pd.128(<4 x i32> %x0, <2 x double> %x1, i8 -1)
|
|
|
|
%res2 = fadd <2 x double> %res, %res1
|
|
|
|
ret <2 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.cvtdq2pd.256(<4 x i32>, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_cvt_dq2pd_256(<4 x i32> %x0, <4 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_cvt_dq2pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vcvtdq2pd %xmm0, %ymm2 ## EVEX TO VEX Compression encoding: [0xc5,0xfe,0xe6,0xd0]
|
2016-11-16 22:48:32 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vcvtdq2pd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0xe6,0xc8]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm2, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0x58,0xc2]
|
2016-11-16 22:48:32 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.cvtdq2pd.256(<4 x i32> %x0, <4 x double> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.cvtdq2pd.256(<4 x i32> %x0, <4 x double> %x1, i8 -1)
|
|
|
|
%res2 = fadd <4 x double> %res, %res1
|
|
|
|
ret <4 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.cvtudq2pd.128(<4 x i32>, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double>@test_int_x86_avx512_mask_cvt_udq2pd_128(<4 x i32> %x0, <2 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_cvt_udq2pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vcvtudq2pd %xmm0, %xmm2 ## encoding: [0x62,0xf1,0x7e,0x08,0x7a,0xd0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vcvtudq2pd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0x7a,0xc8]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm2, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0x58,0xc2]
|
2016-11-16 22:48:32 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.cvtudq2pd.128(<4 x i32> %x0, <2 x double> %x1, i8 %x2)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.cvtudq2pd.128(<4 x i32> %x0, <2 x double> %x1, i8 -1)
|
|
|
|
%res2 = fadd <2 x double> %res, %res1
|
|
|
|
ret <2 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.cvtudq2pd.256(<4 x i32>, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_cvt_udq2pd_256(<4 x i32> %x0, <4 x double> %x1, i8 %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_cvt_udq2pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vcvtudq2pd %xmm0, %ymm2 ## encoding: [0x62,0xf1,0x7e,0x28,0x7a,0xd0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vcvtudq2pd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0x7a,0xc8]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm2, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0x58,0xc2]
|
2016-11-16 22:48:32 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.cvtudq2pd.256(<4 x i32> %x0, <4 x double> %x1, i8 %x2)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.cvtudq2pd.256(<4 x i32> %x0, <4 x double> %x1, i8 -1)
|
|
|
|
%res2 = fadd <4 x double> %res, %res1
|
|
|
|
ret <4 x double> %res2
|
|
|
|
}
|
2016-11-23 14:54:55 +08:00
|
|
|
|
|
|
|
declare <4 x i32> @llvm.x86.avx512.mask.valign.d.128(<4 x i32>, <4 x i32>, i32, <4 x i32>, i8)
|
|
|
|
|
|
|
|
define <4 x i32>@test_int_x86_avx512_mask_valign_d_128(<4 x i32> %x0, <4 x i32> %x1,<4 x i32> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_valign_d_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: valignd $2, %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf3,0x7d,0x08,0x03,0xd9,0x02]
|
|
|
|
; CHECK-NEXT: ## xmm3 = xmm1[2,3],xmm0[0,1]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: valignd $2, %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf3,0x7d,0x09,0x03,0xd1,0x02]
|
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm1[2,3],xmm0[0,1]
|
|
|
|
; CHECK-NEXT: valignd $2, %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf3,0x7d,0x89,0x03,0xc1,0x02]
|
|
|
|
; CHECK-NEXT: ## xmm0 {%k1} {z} = xmm1[2,3],xmm0[0,1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %xmm3, %xmm2, %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xfe,0xcb]
|
|
|
|
; CHECK-NEXT: vpaddd %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf1,0xfe,0xc0]
|
2016-11-23 14:54:55 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i32> @llvm.x86.avx512.mask.valign.d.128(<4 x i32> %x0, <4 x i32> %x1, i32 2, <4 x i32> %x3, i8 %x4)
|
|
|
|
%res1 = call <4 x i32> @llvm.x86.avx512.mask.valign.d.128(<4 x i32> %x0, <4 x i32> %x1, i32 2, <4 x i32> %x3, i8 -1)
|
|
|
|
%res2 = call <4 x i32> @llvm.x86.avx512.mask.valign.d.128(<4 x i32> %x0, <4 x i32> %x1, i32 2, <4 x i32> zeroinitializer,i8 %x4)
|
|
|
|
%res3 = add <4 x i32> %res, %res1
|
|
|
|
%res4 = add <4 x i32> %res3, %res2
|
|
|
|
ret <4 x i32> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.valign.d.256(<8 x i32>, <8 x i32>, i32, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_valign_d_256(<8 x i32> %x0, <8 x i32> %x1, <8 x i32> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_valign_d_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: valignd $6, %ymm1, %ymm0, %ymm3 ## encoding: [0x62,0xf3,0x7d,0x28,0x03,0xd9,0x06]
|
|
|
|
; CHECK-NEXT: ## ymm3 = ymm1[6,7],ymm0[0,1,2,3,4,5]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: valignd $6, %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf3,0x7d,0x29,0x03,0xd1,0x06]
|
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm1[6,7],ymm0[0,1,2,3,4,5]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddd %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc3]
|
2016-11-23 14:54:55 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.valign.d.256(<8 x i32> %x0, <8 x i32> %x1, i32 6, <8 x i32> %x3, i8 %x4)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.valign.d.256(<8 x i32> %x0, <8 x i32> %x1, i32 6, <8 x i32> %x3, i8 -1)
|
|
|
|
%res2 = add <8 x i32> %res, %res1
|
|
|
|
ret <8 x i32> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x i64> @llvm.x86.avx512.mask.valign.q.128(<2 x i64>, <2 x i64>, i32, <2 x i64>, i8)
|
|
|
|
|
|
|
|
define <2 x i64>@test_int_x86_avx512_mask_valign_q_128(<2 x i64> %x0, <2 x i64> %x1, <2 x i64> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_valign_q_128:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: valignq $1, %xmm1, %xmm0, %xmm3 ## encoding: [0x62,0xf3,0xfd,0x08,0x03,0xd9,0x01]
|
|
|
|
; CHECK-NEXT: ## xmm3 = xmm1[1],xmm0[0]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: valignq $1, %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf3,0xfd,0x09,0x03,0xd1,0x01]
|
|
|
|
; CHECK-NEXT: ## xmm2 {%k1} = xmm1[1],xmm0[0]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %xmm3, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0xd4,0xc3]
|
2016-11-23 14:54:55 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x i64> @llvm.x86.avx512.mask.valign.q.128(<2 x i64> %x0, <2 x i64> %x1, i32 1, <2 x i64> %x3, i8 %x4)
|
|
|
|
%res1 = call <2 x i64> @llvm.x86.avx512.mask.valign.q.128(<2 x i64> %x0, <2 x i64> %x1, i32 1, <2 x i64> %x3, i8 -1)
|
|
|
|
%res2 = add <2 x i64> %res, %res1
|
|
|
|
ret <2 x i64> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x i64> @llvm.x86.avx512.mask.valign.q.256(<4 x i64>, <4 x i64>, i32, <4 x i64>, i8)
|
|
|
|
|
|
|
|
define <4 x i64>@test_int_x86_avx512_mask_valign_q_256(<4 x i64> %x0, <4 x i64> %x1, <4 x i64> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_valign_q_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: valignq $3, %ymm1, %ymm0, %ymm3 ## encoding: [0x62,0xf3,0xfd,0x28,0x03,0xd9,0x03]
|
|
|
|
; CHECK-NEXT: ## ymm3 = ymm1[3],ymm0[0,1,2]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: valignq $3, %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf3,0xfd,0x29,0x03,0xd1,0x03]
|
|
|
|
; CHECK-NEXT: ## ymm2 {%k1} = ymm1[3],ymm0[0,1,2]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpaddq %ymm3, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xd4,0xc3]
|
2016-11-23 14:54:55 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x i64> @llvm.x86.avx512.mask.valign.q.256(<4 x i64> %x0, <4 x i64> %x1, i32 3, <4 x i64> %x3, i8 %x4)
|
|
|
|
%res1 = call <4 x i64> @llvm.x86.avx512.mask.valign.q.256(<4 x i64> %x0, <4 x i64> %x1, i32 3, <4 x i64> %x3, i8 -1)
|
|
|
|
%res2 = add <4 x i64> %res, %res1
|
|
|
|
ret <4 x i64> %res2
|
|
|
|
}
|
|
|
|
|
2016-12-11 05:15:52 +08:00
|
|
|
declare <4 x double> @llvm.x86.avx512.mask.vpermilvar.pd.256(<4 x double>, <4 x i64>, <4 x double>, i8)
|
|
|
|
|
|
|
|
define <4 x double>@test_int_x86_avx512_mask_vpermilvar_pd_256(<4 x double> %x0, <4 x i64> %x1, <4 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermilvar_pd_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermilpd %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x0d,0xd9]
|
2016-12-11 05:15:52 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermilpd %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x0d,0xd1]
|
|
|
|
; CHECK-NEXT: vpermilpd %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x0d,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddpd %ymm0, %ymm3, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe5,0x58,0xc0]
|
2016-12-11 05:15:52 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x double> @llvm.x86.avx512.mask.vpermilvar.pd.256(<4 x double> %x0, <4 x i64> %x1, <4 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x double> @llvm.x86.avx512.mask.vpermilvar.pd.256(<4 x double> %x0, <4 x i64> %x1, <4 x double> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x double> @llvm.x86.avx512.mask.vpermilvar.pd.256(<4 x double> %x0, <4 x i64> %x1, <4 x double> %x2, i8 -1)
|
|
|
|
%res3 = fadd <4 x double> %res, %res1
|
|
|
|
%res4 = fadd <4 x double> %res2, %res3
|
|
|
|
ret <4 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <2 x double> @llvm.x86.avx512.mask.vpermilvar.pd.128(<2 x double>, <2 x i64>, <2 x double>, i8)
|
|
|
|
|
|
|
|
define <2 x double>@test_int_x86_avx512_mask_vpermilvar_pd_128(<2 x double> %x0, <2 x i64> %x1, <2 x double> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermilvar_pd_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermilpd %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x0d,0xd9]
|
2016-12-11 05:15:52 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermilpd %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x0d,0xd1]
|
|
|
|
; CHECK-NEXT: vpermilpd %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x0d,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddpd %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe9,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddpd %xmm3, %xmm0, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x58,0xc3]
|
2016-12-11 05:15:52 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <2 x double> @llvm.x86.avx512.mask.vpermilvar.pd.128(<2 x double> %x0, <2 x i64> %x1, <2 x double> %x2, i8 %x3)
|
|
|
|
%res1 = call <2 x double> @llvm.x86.avx512.mask.vpermilvar.pd.128(<2 x double> %x0, <2 x i64> %x1, <2 x double> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <2 x double> @llvm.x86.avx512.mask.vpermilvar.pd.128(<2 x double> %x0, <2 x i64> %x1, <2 x double> %x2, i8 -1)
|
|
|
|
%res3 = fadd <2 x double> %res, %res1
|
|
|
|
%res4 = fadd <2 x double> %res3, %res2
|
|
|
|
ret <2 x double> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.vpermilvar.ps.256(<8 x float>, <8 x i32>, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float>@test_int_x86_avx512_mask_vpermilvar_ps_256(<8 x float> %x0, <8 x i32> %x1, <8 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermilvar_ps_256:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermilps %ymm1, %ymm0, %ymm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x0c,0xd9]
|
2016-12-11 05:15:52 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermilps %ymm1, %ymm0, %ymm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x0c,0xd1]
|
|
|
|
; CHECK-NEXT: vpermilps %ymm1, %ymm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x0c,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xec,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddps %ymm3, %ymm0, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xfc,0x58,0xc3]
|
2016-12-11 05:15:52 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.vpermilvar.ps.256(<8 x float> %x0, <8 x i32> %x1, <8 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.vpermilvar.ps.256(<8 x float> %x0, <8 x i32> %x1, <8 x float> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x float> @llvm.x86.avx512.mask.vpermilvar.ps.256(<8 x float> %x0, <8 x i32> %x1, <8 x float> %x2, i8 -1)
|
|
|
|
%res3 = fadd <8 x float> %res, %res1
|
|
|
|
%res4 = fadd <8 x float> %res3, %res2
|
|
|
|
ret <8 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.vpermilvar.ps.128(<4 x float>, <4 x i32>, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float>@test_int_x86_avx512_mask_vpermilvar_ps_128(<4 x float> %x0, <4 x i32> %x1, <4 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpermilvar_ps_128:
|
|
|
|
; CHECK: ## BB#0:
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vpermilps %xmm1, %xmm0, %xmm3 ## EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x0c,0xd9]
|
2016-12-11 05:15:52 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpermilps %xmm1, %xmm0, %xmm2 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x0c,0xd1]
|
|
|
|
; CHECK-NEXT: vpermilps %xmm1, %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x0c,0xc1]
|
2016-12-28 18:12:48 +08:00
|
|
|
; CHECK-NEXT: vaddps %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe8,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddps %xmm0, %xmm3, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe0,0x58,0xc0]
|
2016-12-11 05:15:52 +08:00
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.vpermilvar.ps.128(<4 x float> %x0, <4 x i32> %x1, <4 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.vpermilvar.ps.128(<4 x float> %x0, <4 x i32> %x1, <4 x float> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x float> @llvm.x86.avx512.mask.vpermilvar.ps.128(<4 x float> %x0, <4 x i32> %x1, <4 x float> %x2, i8 -1)
|
|
|
|
%res3 = fadd <4 x float> %res, %res1
|
|
|
|
%res4 = fadd <4 x float> %res2, %res3
|
|
|
|
ret <4 x float> %res4
|
|
|
|
}
|
|
|
|
|
2017-01-03 13:45:46 +08:00
|
|
|
declare <4 x float> @llvm.x86.avx512.mask.vextractf32x4.256(<8 x float>, i32, <4 x float>, i8)
|
|
|
|
|
|
|
|
define <4 x float>@test_int_x86_avx512_mask_vextractf32x4_256(<8 x float> %x0, <4 x float> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vextractf32x4_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vextractf32x4 $1, %ymm0, %xmm2 ## encoding: [0x62,0xf3,0x7d,0x28,0x19,0xc2,0x01]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vextractf32x4 $1, %ymm0, %xmm1 {%k1} ## encoding: [0x62,0xf3,0x7d,0x29,0x19,0xc1,0x01]
|
|
|
|
; CHECK-NEXT: vextractf32x4 $1, %ymm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf3,0x7d,0xa9,0x19,0xc0,0x01]
|
|
|
|
; CHECK-NEXT: vaddps %xmm0, %xmm1, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf0,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddps %xmm0, %xmm2, %xmm0 ## EVEX TO VEX Compression encoding: [0xc5,0xe8,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <4 x float> @llvm.x86.avx512.mask.vextractf32x4.256(<8 x float> %x0, i32 1, <4 x float> %x2, i8 %x3)
|
|
|
|
%res1 = call <4 x float> @llvm.x86.avx512.mask.vextractf32x4.256(<8 x float> %x0, i32 1, <4 x float> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <4 x float> @llvm.x86.avx512.mask.vextractf32x4.256(<8 x float> %x0, i32 1, <4 x float> zeroinitializer, i8 -1)
|
|
|
|
%res3 = fadd <4 x float> %res, %res1
|
|
|
|
%res4 = fadd <4 x float> %res2, %res3
|
|
|
|
ret <4 x float> %res4
|
|
|
|
}
|
2017-01-03 13:45:57 +08:00
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.avx512.mask.insertf32x4.256(<8 x float>, <4 x float>, i32, <8 x float>, i8)
|
|
|
|
|
|
|
|
define <8 x float>@test_int_x86_avx512_mask_insertf32x4_256(<8 x float> %x0, <4 x float> %x1, <8 x float> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_insertf32x4_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vinsertf32x4 $1, %xmm1, %ymm0, %ymm0 ## encoding: [0x62,0xf3,0x7d,0x28,0x18,0xc1,0x01]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vblendmps %ymm0, %ymm2, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x6d,0x29,0x65,0xc8]
|
|
|
|
; CHECK-NEXT: vmovaps %ymm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf1,0x7c,0xa9,0x28,0xd0]
|
|
|
|
; CHECK-NEXT: vaddps %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf4,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: vaddps %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xec,0x58,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx512.mask.insertf32x4.256(<8 x float> %x0, <4 x float> %x1, i32 1, <8 x float> %x3, i8 %x4)
|
|
|
|
%res1 = call <8 x float> @llvm.x86.avx512.mask.insertf32x4.256(<8 x float> %x0, <4 x float> %x1, i32 1, <8 x float> %x3, i8 -1)
|
|
|
|
%res2 = call <8 x float> @llvm.x86.avx512.mask.insertf32x4.256(<8 x float> %x0, <4 x float> %x1, i32 1, <8 x float> zeroinitializer, i8 %x4)
|
|
|
|
%res3 = fadd <8 x float> %res, %res1
|
|
|
|
%res4 = fadd <8 x float> %res2, %res3
|
|
|
|
ret <8 x float> %res4
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i32> @llvm.x86.avx512.mask.inserti32x4.256(<8 x i32>, <4 x i32>, i32, <8 x i32>, i8)
|
|
|
|
|
|
|
|
define <8 x i32>@test_int_x86_avx512_mask_inserti32x4_256(<8 x i32> %x0, <4 x i32> %x1, <8 x i32> %x3, i8 %x4) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_inserti32x4_256:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: vinserti32x4 $1, %xmm1, %ymm0, %ymm0 ## encoding: [0x62,0xf3,0x7d,0x28,0x38,0xc1,0x01]
|
|
|
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
|
|
; CHECK-NEXT: vpblendmd %ymm0, %ymm2, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x6d,0x29,0x64,0xc8]
|
|
|
|
; CHECK-NEXT: vmovdqa32 %ymm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf1,0x7d,0xa9,0x6f,0xd0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm1, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xf5,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: vpaddd %ymm0, %ymm2, %ymm0 ## EVEX TO VEX Compression encoding: [0xc5,0xed,0xfe,0xc0]
|
|
|
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
|
|
|
|
|
|
%res = call <8 x i32> @llvm.x86.avx512.mask.inserti32x4.256(<8 x i32> %x0, <4 x i32> %x1, i32 1, <8 x i32> %x3, i8 %x4)
|
|
|
|
%res1 = call <8 x i32> @llvm.x86.avx512.mask.inserti32x4.256(<8 x i32> %x0, <4 x i32> %x1, i32 1, <8 x i32> %x3, i8 -1)
|
|
|
|
%res2 = call <8 x i32> @llvm.x86.avx512.mask.inserti32x4.256(<8 x i32> %x0, <4 x i32> %x1, i32 1, <8 x i32> zeroinitializer, i8 %x4)
|
|
|
|
%res3 = add <8 x i32> %res, %res1
|
|
|
|
%res4 = add <8 x i32> %res2, %res3
|
|
|
|
ret <8 x i32> %res4
|
|
|
|
}
|