mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
[X86][AVX512] Autoupgrade the BROADCAST intrinsics
llvm-svn: 274550
This commit is contained in:
parent
c0cc4aee06
commit
283bb6907e
@ -224,6 +224,8 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
|
|||||||
Name.startswith("avx2.pbroadcast") ||
|
Name.startswith("avx2.pbroadcast") ||
|
||||||
Name.startswith("avx.vpermil.") ||
|
Name.startswith("avx.vpermil.") ||
|
||||||
Name.startswith("sse2.pshuf") ||
|
Name.startswith("sse2.pshuf") ||
|
||||||
|
Name.startswith("avx512.pbroadcast") ||
|
||||||
|
Name.startswith("avx512.mask.broadcast.s") ||
|
||||||
Name.startswith("avx512.mask.movddup") ||
|
Name.startswith("avx512.mask.movddup") ||
|
||||||
Name.startswith("avx512.mask.movshdup") ||
|
Name.startswith("avx512.mask.movshdup") ||
|
||||||
Name.startswith("avx512.mask.movsldup") ||
|
Name.startswith("avx512.mask.movsldup") ||
|
||||||
@ -909,13 +911,19 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
|
|||||||
Rep = Builder.CreateShuffleVector(Load, UndefValue::get(Load->getType()),
|
Rep = Builder.CreateShuffleVector(Load, UndefValue::get(Load->getType()),
|
||||||
Idxs);
|
Idxs);
|
||||||
} else if (IsX86 && (Name.startswith("avx2.pbroadcast") ||
|
} else if (IsX86 && (Name.startswith("avx2.pbroadcast") ||
|
||||||
Name.startswith("avx2.vbroadcast"))) {
|
Name.startswith("avx2.vbroadcast") ||
|
||||||
|
Name.startswith("avx512.pbroadcast") ||
|
||||||
|
Name.startswith("avx512.mask.broadcast.s"))) {
|
||||||
// Replace vp?broadcasts with a vector shuffle.
|
// Replace vp?broadcasts with a vector shuffle.
|
||||||
Value *Op = CI->getArgOperand(0);
|
Value *Op = CI->getArgOperand(0);
|
||||||
unsigned NumElts = CI->getType()->getVectorNumElements();
|
unsigned NumElts = CI->getType()->getVectorNumElements();
|
||||||
Type *MaskTy = VectorType::get(Type::getInt32Ty(C), NumElts);
|
Type *MaskTy = VectorType::get(Type::getInt32Ty(C), NumElts);
|
||||||
Rep = Builder.CreateShuffleVector(Op, UndefValue::get(Op->getType()),
|
Rep = Builder.CreateShuffleVector(Op, UndefValue::get(Op->getType()),
|
||||||
Constant::getNullValue(MaskTy));
|
Constant::getNullValue(MaskTy));
|
||||||
|
|
||||||
|
if (CI->getNumArgOperands() == 3)
|
||||||
|
Rep = EmitX86Select(Builder, CI->getArgOperand(2), Rep,
|
||||||
|
CI->getArgOperand(1));
|
||||||
} else if (IsX86 && Name.startswith("avx512.mask.palignr.")) {
|
} else if (IsX86 && Name.startswith("avx512.mask.palignr.")) {
|
||||||
Rep = UpgradeX86PALIGNRIntrinsics(Builder, C, CI->getArgOperand(0),
|
Rep = UpgradeX86PALIGNRIntrinsics(Builder, C, CI->getArgOperand(0),
|
||||||
CI->getArgOperand(1),
|
CI->getArgOperand(1),
|
||||||
|
@ -1,6 +1,88 @@
|
|||||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s
|
||||||
|
|
||||||
|
declare <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float>, <16 x float>, i16) nounwind readonly
|
||||||
|
|
||||||
|
define <16 x float> @test_x86_vbroadcast_ss_ps_512(<4 x float> %a0, <16 x float> %a1, i16 %mask ) {
|
||||||
|
; CHECK-LABEL: test_x86_vbroadcast_ss_ps_512:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vbroadcastss %xmm0, %zmm2
|
||||||
|
; CHECK-NEXT: kmovw %edi, %k1
|
||||||
|
; CHECK-NEXT: vbroadcastss %xmm0, %zmm1 {%k1}
|
||||||
|
; CHECK-NEXT: vbroadcastss %xmm0, %zmm0 {%k1} {z}
|
||||||
|
; CHECK-NEXT: vaddps %zmm1, %zmm2, %zmm1
|
||||||
|
; CHECK-NEXT: vaddps %zmm1, %zmm0, %zmm0
|
||||||
|
; CHECK-NEXT: retq
|
||||||
|
|
||||||
|
%res = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> zeroinitializer, i16 -1)
|
||||||
|
%res1 = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> %a1, i16 %mask)
|
||||||
|
%res2 = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> zeroinitializer, i16 %mask)
|
||||||
|
%res3 = fadd <16 x float> %res, %res1
|
||||||
|
%res4 = fadd <16 x float> %res2, %res3
|
||||||
|
ret <16 x float> %res4
|
||||||
|
}
|
||||||
|
|
||||||
|
declare <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double>, <8 x double>, i8) nounwind readonly
|
||||||
|
|
||||||
|
define <8 x double> @test_x86_vbroadcast_sd_pd_512(<2 x double> %a0, <8 x double> %a1, i8 %mask ) {
|
||||||
|
; CHECK-LABEL: test_x86_vbroadcast_sd_pd_512:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vbroadcastsd %xmm0, %zmm2
|
||||||
|
; CHECK-NEXT: kmovw %edi, %k1
|
||||||
|
; CHECK-NEXT: vbroadcastsd %xmm0, %zmm1 {%k1}
|
||||||
|
; CHECK-NEXT: vbroadcastsd %xmm0, %zmm0 {%k1} {z}
|
||||||
|
; CHECK-NEXT: vaddpd %zmm1, %zmm2, %zmm1
|
||||||
|
; CHECK-NEXT: vaddpd %zmm1, %zmm0, %zmm0
|
||||||
|
; CHECK-NEXT: retq
|
||||||
|
|
||||||
|
%res = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> zeroinitializer, i8 -1)
|
||||||
|
%res1 = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> %a1, i8 %mask)
|
||||||
|
%res2 = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> zeroinitializer, i8 %mask)
|
||||||
|
%res3 = fadd <8 x double> %res, %res1
|
||||||
|
%res4 = fadd <8 x double> %res2, %res3
|
||||||
|
ret <8 x double> %res4
|
||||||
|
}
|
||||||
|
|
||||||
|
declare <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32>, <16 x i32>, i16)
|
||||||
|
|
||||||
|
define <16 x i32>@test_int_x86_avx512_pbroadcastd_512(<4 x i32> %x0, <16 x i32> %x1, i16 %mask) {
|
||||||
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_512:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vpbroadcastd %xmm0, %zmm2
|
||||||
|
; CHECK-NEXT: kmovw %edi, %k1
|
||||||
|
; CHECK-NEXT: vpbroadcastd %xmm0, %zmm1 {%k1}
|
||||||
|
; CHECK-NEXT: vpbroadcastd %xmm0, %zmm0 {%k1} {z}
|
||||||
|
; CHECK-NEXT: vpaddd %zmm1, %zmm2, %zmm1
|
||||||
|
; CHECK-NEXT: vpaddd %zmm1, %zmm0, %zmm0
|
||||||
|
; CHECK-NEXT: retq
|
||||||
|
%res = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> %x1, i16 -1)
|
||||||
|
%res1 = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> %x1, i16 %mask)
|
||||||
|
%res2 = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> zeroinitializer, i16 %mask)
|
||||||
|
%res3 = add <16 x i32> %res, %res1
|
||||||
|
%res4 = add <16 x i32> %res2, %res3
|
||||||
|
ret <16 x i32> %res4
|
||||||
|
}
|
||||||
|
|
||||||
|
declare <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64>, <8 x i64>, i8)
|
||||||
|
|
||||||
|
define <8 x i64>@test_int_x86_avx512_pbroadcastq_512(<2 x i64> %x0, <8 x i64> %x1, i8 %mask) {
|
||||||
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_512:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vpbroadcastq %xmm0, %zmm2
|
||||||
|
; CHECK-NEXT: kmovw %edi, %k1
|
||||||
|
; CHECK-NEXT: vpbroadcastq %xmm0, %zmm1 {%k1}
|
||||||
|
; CHECK-NEXT: vpbroadcastq %xmm0, %zmm0 {%k1} {z}
|
||||||
|
; CHECK-NEXT: vpaddq %zmm1, %zmm2, %zmm1
|
||||||
|
; CHECK-NEXT: vpaddq %zmm1, %zmm0, %zmm0
|
||||||
|
; CHECK-NEXT: retq
|
||||||
|
%res = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> %x1,i8 -1)
|
||||||
|
%res1 = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> %x1,i8 %mask)
|
||||||
|
%res2 = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> zeroinitializer,i8 %mask)
|
||||||
|
%res3 = add <8 x i64> %res, %res1
|
||||||
|
%res4 = add <8 x i64> %res2, %res3
|
||||||
|
ret <8 x i64> %res4
|
||||||
|
}
|
||||||
|
|
||||||
declare <16 x float> @llvm.x86.avx512.mask.movsldup.512(<16 x float>, <16 x float>, i16)
|
declare <16 x float> @llvm.x86.avx512.mask.movsldup.512(<16 x float>, <16 x float>, i16)
|
||||||
|
|
||||||
define <16 x float>@test_int_x86_avx512_mask_movsldup_512(<16 x float> %x0, <16 x float> %x1, i16 %x2) {
|
define <16 x float>@test_int_x86_avx512_mask_movsldup_512(<16 x float> %x0, <16 x float> %x1, i16 %x2) {
|
||||||
|
@ -643,85 +643,6 @@ define <8 x double> @test_x86_vbroadcast_sd_512(i8* %a0) {
|
|||||||
}
|
}
|
||||||
declare <8 x double> @llvm.x86.avx512.vbroadcast.sd.512(i8*) nounwind readonly
|
declare <8 x double> @llvm.x86.avx512.vbroadcast.sd.512(i8*) nounwind readonly
|
||||||
|
|
||||||
define <16 x float> @test_x86_vbroadcast_ss_ps_512(<4 x float> %a0, <16 x float> %a1, i16 %mask ) {
|
|
||||||
; CHECK-LABEL: test_x86_vbroadcast_ss_ps_512:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovw %edi, %k1
|
|
||||||
; CHECK-NEXT: vbroadcastss %xmm0, %zmm1 {%k1}
|
|
||||||
; CHECK-NEXT: vbroadcastss %xmm0, %zmm2 {%k1} {z}
|
|
||||||
; CHECK-NEXT: vbroadcastss %xmm0, %zmm0
|
|
||||||
; CHECK-NEXT: vaddps %zmm1, %zmm0, %zmm0
|
|
||||||
; CHECK-NEXT: vaddps %zmm0, %zmm2, %zmm0
|
|
||||||
; CHECK-NEXT: retq
|
|
||||||
|
|
||||||
%res = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> zeroinitializer, i16 -1)
|
|
||||||
%res1 = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> %a1, i16 %mask)
|
|
||||||
%res2 = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> zeroinitializer, i16 %mask)
|
|
||||||
%res3 = fadd <16 x float> %res, %res1
|
|
||||||
%res4 = fadd <16 x float> %res2, %res3
|
|
||||||
ret <16 x float> %res4
|
|
||||||
}
|
|
||||||
declare <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float>, <16 x float>, i16) nounwind readonly
|
|
||||||
|
|
||||||
|
|
||||||
define <8 x double> @test_x86_vbroadcast_sd_pd_512(<2 x double> %a0, <8 x double> %a1, i8 %mask ) {
|
|
||||||
; CHECK-LABEL: test_x86_vbroadcast_sd_pd_512:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovw %edi, %k1
|
|
||||||
; CHECK-NEXT: vbroadcastsd %xmm0, %zmm1 {%k1}
|
|
||||||
; CHECK-NEXT: vbroadcastsd %xmm0, %zmm2 {%k1} {z}
|
|
||||||
; CHECK-NEXT: vbroadcastsd %xmm0, %zmm0
|
|
||||||
; CHECK-NEXT: vaddpd %zmm1, %zmm0, %zmm0
|
|
||||||
; CHECK-NEXT: vaddpd %zmm0, %zmm2, %zmm0
|
|
||||||
; CHECK-NEXT: retq
|
|
||||||
|
|
||||||
%res = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> zeroinitializer, i8 -1)
|
|
||||||
%res1 = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> %a1, i8 %mask)
|
|
||||||
%res2 = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> zeroinitializer, i8 %mask)
|
|
||||||
%res3 = fadd <8 x double> %res, %res1
|
|
||||||
%res4 = fadd <8 x double> %res2, %res3
|
|
||||||
ret <8 x double> %res4
|
|
||||||
}
|
|
||||||
declare <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double>, <8 x double>, i8) nounwind readonly
|
|
||||||
|
|
||||||
define <16 x i32>@test_int_x86_avx512_pbroadcastd_512(<4 x i32> %x0, <16 x i32> %x1, i16 %mask) {
|
|
||||||
; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_512:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovw %edi, %k1
|
|
||||||
; CHECK-NEXT: vpbroadcastd %xmm0, %zmm1 {%k1}
|
|
||||||
; CHECK-NEXT: vpbroadcastd %xmm0, %zmm2 {%k1} {z}
|
|
||||||
; CHECK-NEXT: vpbroadcastd %xmm0, %zmm0
|
|
||||||
; CHECK-NEXT: vpaddd %zmm1, %zmm0, %zmm0
|
|
||||||
; CHECK-NEXT: vpaddd %zmm0, %zmm2, %zmm0
|
|
||||||
; CHECK-NEXT: retq
|
|
||||||
%res = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> %x1, i16 -1)
|
|
||||||
%res1 = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> %x1, i16 %mask)
|
|
||||||
%res2 = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> zeroinitializer, i16 %mask)
|
|
||||||
%res3 = add <16 x i32> %res, %res1
|
|
||||||
%res4 = add <16 x i32> %res2, %res3
|
|
||||||
ret <16 x i32> %res4
|
|
||||||
}
|
|
||||||
declare <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32>, <16 x i32>, i16)
|
|
||||||
|
|
||||||
define <8 x i64>@test_int_x86_avx512_pbroadcastq_512(<2 x i64> %x0, <8 x i64> %x1, i8 %mask) {
|
|
||||||
; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_512:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovw %edi, %k1
|
|
||||||
; CHECK-NEXT: vpbroadcastq %xmm0, %zmm1 {%k1}
|
|
||||||
; CHECK-NEXT: vpbroadcastq %xmm0, %zmm2 {%k1} {z}
|
|
||||||
; CHECK-NEXT: vpbroadcastq %xmm0, %zmm0
|
|
||||||
; CHECK-NEXT: vpaddq %zmm1, %zmm0, %zmm0
|
|
||||||
; CHECK-NEXT: vpaddq %zmm0, %zmm2, %zmm0
|
|
||||||
; CHECK-NEXT: retq
|
|
||||||
%res = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> %x1,i8 -1)
|
|
||||||
%res1 = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> %x1,i8 %mask)
|
|
||||||
%res2 = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> zeroinitializer,i8 %mask)
|
|
||||||
%res3 = add <8 x i64> %res, %res1
|
|
||||||
%res4 = add <8 x i64> %res2, %res3
|
|
||||||
ret <8 x i64> %res4
|
|
||||||
}
|
|
||||||
declare <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64>, <8 x i64>, i8)
|
|
||||||
|
|
||||||
define <16 x i32> @test_conflict_d(<16 x i32> %a) {
|
define <16 x i32> @test_conflict_d(<16 x i32> %a) {
|
||||||
; CHECK-LABEL: test_conflict_d:
|
; CHECK-LABEL: test_conflict_d:
|
||||||
; CHECK: ## BB#0:
|
; CHECK: ## BB#0:
|
||||||
|
@ -1,6 +1,126 @@
|
|||||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512bw -mattr=+avx512vl --show-mc-encoding| FileCheck %s
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512bw -mattr=+avx512vl --show-mc-encoding| FileCheck %s
|
||||||
|
|
||||||
|
declare <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8>, <32 x i8>, i32)
|
||||||
|
|
||||||
|
define <32 x i8>@test_int_x86_avx512_pbroadcastb_256(<16 x i8> %x0, <32 x i8> %x1, i32 %mask) {
|
||||||
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_256:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x78,0xd0]
|
||||||
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x78,0xc8]
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x78,0xc0]
|
||||||
|
; CHECK-NEXT: vpaddb %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0x6d,0x28,0xfc,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddb %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfc,0xc1]
|
||||||
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||||
|
%res = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> %x1, i32 -1)
|
||||||
|
%res1 = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> %x1, i32 %mask)
|
||||||
|
%res2 = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> zeroinitializer, i32 %mask)
|
||||||
|
%res3 = add <32 x i8> %res, %res1
|
||||||
|
%res4 = add <32 x i8> %res2, %res3
|
||||||
|
ret <32 x i8> %res4
|
||||||
|
}
|
||||||
|
|
||||||
|
declare <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8>, <16 x i8>, i16)
|
||||||
|
|
||||||
|
define <16 x i8>@test_int_x86_avx512_pbroadcastb_128(<16 x i8> %x0, <16 x i8> %x1, i16 %mask) {
|
||||||
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_128:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x78,0xd0]
|
||||||
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x78,0xc8]
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x78,0xc0]
|
||||||
|
; CHECK-NEXT: vpaddb %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0x6d,0x08,0xfc,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfc,0xc1]
|
||||||
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||||
|
%res = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> %x1, i16 -1)
|
||||||
|
%res1 = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> %x1, i16 %mask)
|
||||||
|
%res2 = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> zeroinitializer, i16 %mask)
|
||||||
|
%res3 = add <16 x i8> %res, %res1
|
||||||
|
%res4 = add <16 x i8> %res2, %res3
|
||||||
|
ret <16 x i8> %res4
|
||||||
|
}
|
||||||
|
|
||||||
|
declare <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16>, <16 x i16>, i16)
|
||||||
|
|
||||||
|
define <16 x i16>@test_int_x86_avx512_pbroadcastw_256(<8 x i16> %x0, <16 x i16> %x1, i16 %mask) {
|
||||||
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_256:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x79,0xd0]
|
||||||
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x79,0xc8]
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x79,0xc0]
|
||||||
|
; CHECK-NEXT: vpaddw %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0x6d,0x28,0xfd,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddw %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfd,0xc1]
|
||||||
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||||
|
%res = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> %x1, i16 -1)
|
||||||
|
%res1 = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> %x1, i16 %mask)
|
||||||
|
%res2 = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> zeroinitializer, i16 %mask)
|
||||||
|
%res3 = add <16 x i16> %res, %res1
|
||||||
|
%res4 = add <16 x i16> %res2, %res3
|
||||||
|
ret <16 x i16> %res4
|
||||||
|
}
|
||||||
|
|
||||||
|
declare <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16>, <8 x i16>, i8)
|
||||||
|
|
||||||
|
define <8 x i16>@test_int_x86_avx512_pbroadcastw_128(<8 x i16> %x0, <8 x i16> %x1, i8 %mask) {
|
||||||
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_128:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x79,0xd0]
|
||||||
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x79,0xc8]
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x79,0xc0]
|
||||||
|
; CHECK-NEXT: vpaddw %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0x6d,0x08,0xfd,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfd,0xc1]
|
||||||
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||||
|
%res = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> %x1, i8 -1)
|
||||||
|
%res1 = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> %x1, i8 %mask)
|
||||||
|
%res2 = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> zeroinitializer, i8 %mask)
|
||||||
|
%res3 = add <8 x i16> %res, %res1
|
||||||
|
%res4 = add <8 x i16> %res2, %res3
|
||||||
|
ret <8 x i16> %res4
|
||||||
|
}
|
||||||
|
|
||||||
|
declare <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8>, <64 x i8>, i64)
|
||||||
|
|
||||||
|
define <64 x i8>@test_int_x86_avx512_pbroadcastb_512(<16 x i8> %x0, <64 x i8> %x1, i64 %mask) {
|
||||||
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_512:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %zmm2 ## encoding: [0x62,0xf2,0x7d,0x48,0x78,0xd0]
|
||||||
|
; CHECK-NEXT: kmovq %rdi, %k1 ## encoding: [0xc4,0xe1,0xfb,0x92,0xcf]
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %zmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x49,0x78,0xc8]
|
||||||
|
; CHECK-NEXT: vpbroadcastb %xmm0, %zmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xc9,0x78,0xc0]
|
||||||
|
; CHECK-NEXT: vpaddb %zmm1, %zmm2, %zmm1 ## encoding: [0x62,0xf1,0x6d,0x48,0xfc,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddb %zmm1, %zmm0, %zmm0 ## encoding: [0x62,0xf1,0x7d,0x48,0xfc,0xc1]
|
||||||
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||||
|
%res = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> %x1, i64 -1)
|
||||||
|
%res1 = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> %x1, i64 %mask)
|
||||||
|
%res2 = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> zeroinitializer, i64 %mask)
|
||||||
|
%res3 = add <64 x i8> %res, %res1
|
||||||
|
%res4 = add <64 x i8> %res2, %res3
|
||||||
|
ret <64 x i8> %res4
|
||||||
|
}
|
||||||
|
|
||||||
|
declare <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16>, <32 x i16>, i32)
|
||||||
|
|
||||||
|
define <32 x i16>@test_int_x86_avx512_pbroadcastw_512(<8 x i16> %x0, <32 x i16> %x1, i32 %mask) {
|
||||||
|
; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_512:
|
||||||
|
; CHECK: ## BB#0:
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %zmm2 ## encoding: [0x62,0xf2,0x7d,0x48,0x79,0xd0]
|
||||||
|
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %zmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x49,0x79,0xc8]
|
||||||
|
; CHECK-NEXT: vpbroadcastw %xmm0, %zmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xc9,0x79,0xc0]
|
||||||
|
; CHECK-NEXT: vpaddw %zmm1, %zmm2, %zmm1 ## encoding: [0x62,0xf1,0x6d,0x48,0xfd,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddw %zmm1, %zmm0, %zmm0 ## encoding: [0x62,0xf1,0x7d,0x48,0xfd,0xc1]
|
||||||
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||||
|
%res = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> %x1, i32 -1)
|
||||||
|
%res1 = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> %x1, i32 %mask)
|
||||||
|
%res2 = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> zeroinitializer, i32 %mask)
|
||||||
|
%res3 = add <32 x i16> %res, %res1
|
||||||
|
%res4 = add <32 x i16> %res2, %res3
|
||||||
|
ret <32 x i16> %res4
|
||||||
|
}
|
||||||
|
|
||||||
declare void @llvm.x86.avx512.mask.storeu.b.128(i8*, <16 x i8>, i16)
|
declare void @llvm.x86.avx512.mask.storeu.b.128(i8*, <16 x i8>, i16)
|
||||||
|
|
||||||
define void@test_int_x86_avx512_mask_storeu_b_128(i8* %ptr1, i8* %ptr2, <16 x i8> %x1, i16 %x2) {
|
define void@test_int_x86_avx512_mask_storeu_b_128(i8* %ptr1, i8* %ptr2, <16 x i8> %x1, i16 %x2) {
|
||||||
|
@ -5212,126 +5212,6 @@ define <16 x i16>@test_int_x86_avx512_mask_dbpsadbw_256(<32 x i8> %x0, <32 x i8>
|
|||||||
ret <16 x i16> %res4
|
ret <16 x i16> %res4
|
||||||
}
|
}
|
||||||
|
|
||||||
declare <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8>, <32 x i8>, i32)
|
|
||||||
|
|
||||||
define <32 x i8>@test_int_x86_avx512_pbroadcastb_256(<16 x i8> %x0, <32 x i8> %x1, i32 %mask) {
|
|
||||||
; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_256:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x78,0xc8]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x78,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x78,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddb %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfc,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddb %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0x6d,0x28,0xfc,0xc0]
|
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
||||||
%res = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> %x1, i32 -1)
|
|
||||||
%res1 = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> %x1, i32 %mask)
|
|
||||||
%res2 = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> zeroinitializer, i32 %mask)
|
|
||||||
%res3 = add <32 x i8> %res, %res1
|
|
||||||
%res4 = add <32 x i8> %res2, %res3
|
|
||||||
ret <32 x i8> %res4
|
|
||||||
}
|
|
||||||
|
|
||||||
declare <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8>, <16 x i8>, i16)
|
|
||||||
|
|
||||||
define <16 x i8>@test_int_x86_avx512_pbroadcastb_128(<16 x i8> %x0, <16 x i8> %x1, i16 %mask) {
|
|
||||||
; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_128:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x78,0xc8]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x78,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x78,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfc,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddb %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0x6d,0x08,0xfc,0xc0]
|
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
||||||
%res = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> %x1, i16 -1)
|
|
||||||
%res1 = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> %x1, i16 %mask)
|
|
||||||
%res2 = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> zeroinitializer, i16 %mask)
|
|
||||||
%res3 = add <16 x i8> %res, %res1
|
|
||||||
%res4 = add <16 x i8> %res2, %res3
|
|
||||||
ret <16 x i8> %res4
|
|
||||||
}
|
|
||||||
|
|
||||||
declare <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16>, <16 x i16>, i16)
|
|
||||||
|
|
||||||
define <16 x i16>@test_int_x86_avx512_pbroadcastw_256(<8 x i16> %x0, <16 x i16> %x1, i16 %mask) {
|
|
||||||
; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_256:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x79,0xc8]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x79,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x79,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddw %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfd,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0x6d,0x28,0xfd,0xc0]
|
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
||||||
%res = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> %x1, i16 -1)
|
|
||||||
%res1 = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> %x1, i16 %mask)
|
|
||||||
%res2 = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> zeroinitializer, i16 %mask)
|
|
||||||
%res3 = add <16 x i16> %res, %res1
|
|
||||||
%res4 = add <16 x i16> %res2, %res3
|
|
||||||
ret <16 x i16> %res4
|
|
||||||
}
|
|
||||||
|
|
||||||
declare <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16>, <8 x i16>, i8)
|
|
||||||
|
|
||||||
define <8 x i16>@test_int_x86_avx512_pbroadcastw_128(<8 x i16> %x0, <8 x i16> %x1, i8 %mask) {
|
|
||||||
; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_128:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x79,0xc8]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x79,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x79,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfd,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0x6d,0x08,0xfd,0xc0]
|
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
||||||
%res = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> %x1, i8 -1)
|
|
||||||
%res1 = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> %x1, i8 %mask)
|
|
||||||
%res2 = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> zeroinitializer, i8 %mask)
|
|
||||||
%res3 = add <8 x i16> %res, %res1
|
|
||||||
%res4 = add <8 x i16> %res2, %res3
|
|
||||||
ret <8 x i16> %res4
|
|
||||||
}
|
|
||||||
|
|
||||||
declare <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8>, <64 x i8>, i64)
|
|
||||||
|
|
||||||
define <64 x i8>@test_int_x86_avx512_pbroadcastb_512(<16 x i8> %x0, <64 x i8> %x1, i64 %mask) {
|
|
||||||
; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_512:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovq %rdi, %k1 ## encoding: [0xc4,0xe1,0xfb,0x92,0xcf]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %zmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x49,0x78,0xc8]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %zmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xc9,0x78,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastb %xmm0, %zmm0 ## encoding: [0x62,0xf2,0x7d,0x48,0x78,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddb %zmm1, %zmm0, %zmm0 ## encoding: [0x62,0xf1,0x7d,0x48,0xfc,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddb %zmm0, %zmm2, %zmm0 ## encoding: [0x62,0xf1,0x6d,0x48,0xfc,0xc0]
|
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
||||||
%res = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> %x1, i64 -1)
|
|
||||||
%res1 = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> %x1, i64 %mask)
|
|
||||||
%res2 = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> zeroinitializer, i64 %mask)
|
|
||||||
%res3 = add <64 x i8> %res, %res1
|
|
||||||
%res4 = add <64 x i8> %res2, %res3
|
|
||||||
ret <64 x i8> %res4
|
|
||||||
}
|
|
||||||
|
|
||||||
declare <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16>, <32 x i16>, i32)
|
|
||||||
|
|
||||||
define <32 x i16>@test_int_x86_avx512_pbroadcastw_512(<8 x i16> %x0, <32 x i16> %x1, i32 %mask) {
|
|
||||||
; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_512:
|
|
||||||
; CHECK: ## BB#0:
|
|
||||||
; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %zmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x49,0x79,0xc8]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %zmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xc9,0x79,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastw %xmm0, %zmm0 ## encoding: [0x62,0xf2,0x7d,0x48,0x79,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddw %zmm1, %zmm0, %zmm0 ## encoding: [0x62,0xf1,0x7d,0x48,0xfd,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddw %zmm0, %zmm2, %zmm0 ## encoding: [0x62,0xf1,0x6d,0x48,0xfd,0xc0]
|
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
|
||||||
%res = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> %x1, i32 -1)
|
|
||||||
%res1 = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> %x1, i32 %mask)
|
|
||||||
%res2 = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> zeroinitializer, i32 %mask)
|
|
||||||
%res3 = add <32 x i16> %res, %res1
|
|
||||||
%res4 = add <32 x i16> %res2, %res3
|
|
||||||
ret <32 x i16> %res4
|
|
||||||
}
|
|
||||||
|
|
||||||
declare i16 @llvm.x86.avx512.cvtb2mask.128(<16 x i8>)
|
declare i16 @llvm.x86.avx512.cvtb2mask.128(<16 x i8>)
|
||||||
|
|
||||||
define i16@test_int_x86_avx512_cvtb2mask_128(<16 x i8> %x0) {
|
define i16@test_int_x86_avx512_cvtb2mask_128(<16 x i8> %x0) {
|
||||||
|
@ -1,6 +1,147 @@
|
|||||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512vl --show-mc-encoding| FileCheck %s
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512vl --show-mc-encoding| FileCheck %s
|
||||||
|
|
||||||
|
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]
|
||||||
|
; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfe,0xc1]
|
||||||
|
; 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:
|
||||||
|
; CHECK-NEXT: vpbroadcastd %xmm0, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x58,0xd0]
|
||||||
|
; 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]
|
||||||
|
; CHECK-NEXT: vpaddd %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0x6d,0x08,0xfe,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfe,0xc1]
|
||||||
|
; 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:
|
||||||
|
; CHECK-NEXT: vpbroadcastq %xmm0, %ymm2 ## encoding: [0x62,0xf2,0xfd,0x28,0x59,0xd0]
|
||||||
|
; 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]
|
||||||
|
; CHECK-NEXT: vpaddq %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0xed,0x28,0xd4,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddq %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0xd4,0xc1]
|
||||||
|
; 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:
|
||||||
|
; CHECK-NEXT: vpbroadcastq %xmm0, %xmm2 ## encoding: [0x62,0xf2,0xfd,0x08,0x59,0xd0]
|
||||||
|
; 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]
|
||||||
|
; CHECK-NEXT: vpaddq %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0xed,0x08,0xd4,0xc9]
|
||||||
|
; CHECK-NEXT: vpaddq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xd4,0xc1]
|
||||||
|
; 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:
|
||||||
|
; CHECK-NEXT: vbroadcastsd %xmm0, %ymm2 ## encoding: [0x62,0xf2,0xfd,0x28,0x19,0xd0]
|
||||||
|
; 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]
|
||||||
|
; CHECK-NEXT: vaddpd %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0xed,0x28,0x58,0xc9]
|
||||||
|
; CHECK-NEXT: vaddpd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0x58,0xc1]
|
||||||
|
; 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:
|
||||||
|
; CHECK-NEXT: vbroadcastss %xmm0, %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x18,0xd0]
|
||||||
|
; 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]
|
||||||
|
; CHECK-NEXT: vaddps %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0x6c,0x28,0x58,0xc9]
|
||||||
|
; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7c,0x28,0x58,0xc1]
|
||||||
|
; 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:
|
||||||
|
; CHECK-NEXT: vbroadcastss %xmm0, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x18,0xd0]
|
||||||
|
; 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]
|
||||||
|
; CHECK-NEXT: vaddps %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0x6c,0x08,0x58,0xc9]
|
||||||
|
; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x58,0xc1]
|
||||||
|
; 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
|
||||||
|
}
|
||||||
|
|
||||||
declare <4 x float> @llvm.x86.avx512.mask.movsldup.128(<4 x float>, <4 x float>, i8)
|
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) {
|
define <4 x float>@test_int_x86_avx512_mask_movsldup_128(<4 x float> %x0, <4 x float> %x1, i8 %x2) {
|
||||||
|
@ -5979,88 +5979,6 @@ define <4 x i64>@test_int_x86_avx512_maskz_pternlog_q_256(<4 x i64> %x0, <4 x i6
|
|||||||
ret <4 x i64> %res2
|
ret <4 x i64> %res2
|
||||||
}
|
}
|
||||||
|
|
||||||
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 (%rsi), %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x58,0x16]
|
|
||||||
; 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 %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0x6d,0x28,0xfe,0xc9]
|
|
||||||
; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfe,0xc1]
|
|
||||||
; 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:
|
|
||||||
; 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, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x58,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastd %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x58,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfe,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0x6d,0x08,0xfe,0xc0]
|
|
||||||
; 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:
|
|
||||||
; 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, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x59,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastq %xmm0, %ymm0 ## encoding: [0x62,0xf2,0xfd,0x28,0x59,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddq %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0xd4,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0xed,0x28,0xd4,0xc0]
|
|
||||||
; 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:
|
|
||||||
; 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, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x59,0xd0]
|
|
||||||
; CHECK-NEXT: vpbroadcastq %xmm0, %xmm0 ## encoding: [0x62,0xf2,0xfd,0x08,0x59,0xc0]
|
|
||||||
; CHECK-NEXT: vpaddq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xd4,0xc1]
|
|
||||||
; CHECK-NEXT: vpaddq %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0xed,0x08,0xd4,0xc0]
|
|
||||||
; 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
|
|
||||||
}
|
|
||||||
|
|
||||||
define <4 x float> @test_x86_vcvtph2ps_128(<8 x i16> %a0) {
|
define <4 x float> @test_x86_vcvtph2ps_128(<8 x i16> %a0) {
|
||||||
; CHECK-LABEL: test_x86_vcvtph2ps_128:
|
; CHECK-LABEL: test_x86_vcvtph2ps_128:
|
||||||
; CHECK: ## BB#0:
|
; CHECK: ## BB#0:
|
||||||
@ -6418,64 +6336,6 @@ define <2 x double> @test_rcp_pd_128_rrk(<2 x double> %a0, <2 x double> %a1, i8
|
|||||||
declare <4 x double> @llvm.x86.avx512.rcp14.pd.256(<4 x double>, <4 x double>, i8) nounwind readnone
|
declare <4 x double> @llvm.x86.avx512.rcp14.pd.256(<4 x double>, <4 x double>, i8) nounwind readnone
|
||||||
declare <2 x double> @llvm.x86.avx512.rcp14.pd.128(<2 x double>, <2 x double>, i8) nounwind readnone
|
declare <2 x double> @llvm.x86.avx512.rcp14.pd.128(<2 x double>, <2 x double>, i8) nounwind readnone
|
||||||
|
|
||||||
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:
|
|
||||||
; 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, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x19,0xd0]
|
|
||||||
; CHECK-NEXT: vbroadcastsd %xmm0, %ymm0 ## encoding: [0x62,0xf2,0xfd,0x28,0x19,0xc0]
|
|
||||||
; CHECK-NEXT: vaddpd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0x58,0xc1]
|
|
||||||
; CHECK-NEXT: vaddpd %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0xed,0x28,0x58,0xc0]
|
|
||||||
; 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 <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double>, <4 x double>, 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:
|
|
||||||
; 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, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x18,0xd0]
|
|
||||||
; CHECK-NEXT: vbroadcastss %xmm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x18,0xc0]
|
|
||||||
; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7c,0x28,0x58,0xc1]
|
|
||||||
; CHECK-NEXT: vaddps %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0x6c,0x28,0x58,0xc0]
|
|
||||||
; 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 <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float>, <8 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:
|
|
||||||
; 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, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x18,0xd0]
|
|
||||||
; CHECK-NEXT: vbroadcastss %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x18,0xc0]
|
|
||||||
; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x58,0xc1]
|
|
||||||
; CHECK-NEXT: vaddps %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0x6c,0x08,0x58,0xc0]
|
|
||||||
; 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
|
|
||||||
}
|
|
||||||
declare <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float>, <4 x float>, i8) nounwind readonly
|
|
||||||
|
|
||||||
|
|
||||||
declare <8 x float> @llvm.x86.avx512.mask.broadcastf32x4.256(<4 x float>, <8 x float>, i8)
|
declare <8 x float> @llvm.x86.avx512.mask.broadcastf32x4.256(<4 x float>, <8 x float>, i8)
|
||||||
|
|
||||||
define <8 x float>@test_int_x86_avx512_mask_broadcastf32x4_256(<4 x float> %x0, <8 x float> %x2, i8 %mask) {
|
define <8 x float>@test_int_x86_avx512_mask_broadcastf32x4_256(<4 x float> %x0, <8 x float> %x2, i8 %mask) {
|
||||||
@ -7126,9 +6986,9 @@ define <8 x i32>@test_int_x86_avx512_mask_psrav8_si_const() {
|
|||||||
; CHECK: ## BB#0:
|
; CHECK: ## BB#0:
|
||||||
; CHECK-NEXT: vmovdqa32 {{.*#+}} ymm0 = [2,9,4294967284,23,4294967270,37,4294967256,51]
|
; CHECK-NEXT: vmovdqa32 {{.*#+}} ymm0 = [2,9,4294967284,23,4294967270,37,4294967256,51]
|
||||||
; CHECK-NEXT: ## encoding: [0x62,0xf1,0x7d,0x28,0x6f,0x05,A,A,A,A]
|
; CHECK-NEXT: ## encoding: [0x62,0xf1,0x7d,0x28,0x6f,0x05,A,A,A,A]
|
||||||
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI468_0-4, kind: reloc_riprel_4byte
|
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI461_0-4, kind: reloc_riprel_4byte
|
||||||
; CHECK-NEXT: vpsravd {{.*}}(%rip), %ymm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x46,0x05,A,A,A,A]
|
; CHECK-NEXT: vpsravd {{.*}}(%rip), %ymm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x46,0x05,A,A,A,A]
|
||||||
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI468_1-4, kind: reloc_riprel_4byte
|
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI461_1-4, kind: reloc_riprel_4byte
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
; 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)
|
%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
|
ret <8 x i32> %res
|
||||||
@ -7159,9 +7019,9 @@ define <2 x i64>@test_int_x86_avx512_mask_psrav_q_128_const(i8 %x3) {
|
|||||||
; CHECK: ## BB#0:
|
; CHECK: ## BB#0:
|
||||||
; CHECK-NEXT: vmovdqa64 {{.*#+}} xmm0 = [2,18446744073709551607]
|
; CHECK-NEXT: vmovdqa64 {{.*#+}} xmm0 = [2,18446744073709551607]
|
||||||
; CHECK-NEXT: ## encoding: [0x62,0xf1,0xfd,0x08,0x6f,0x05,A,A,A,A]
|
; CHECK-NEXT: ## encoding: [0x62,0xf1,0xfd,0x08,0x6f,0x05,A,A,A,A]
|
||||||
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI470_0-4, kind: reloc_riprel_4byte
|
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI463_0-4, kind: reloc_riprel_4byte
|
||||||
; CHECK-NEXT: vpsravq {{.*}}(%rip), %xmm0, %xmm0 ## encoding: [0x62,0xf2,0xfd,0x08,0x46,0x05,A,A,A,A]
|
; CHECK-NEXT: vpsravq {{.*}}(%rip), %xmm0, %xmm0 ## encoding: [0x62,0xf2,0xfd,0x08,0x46,0x05,A,A,A,A]
|
||||||
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI470_1-4, kind: reloc_riprel_4byte
|
; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI463_1-4, kind: reloc_riprel_4byte
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
; 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)
|
%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
|
ret <2 x i64> %res
|
||||||
|
Loading…
Reference in New Issue
Block a user