llvm.org GIT mirror llvm / 41c9c2b
[X86][AVX512] Autoupgrade the BROADCAST intrinsics git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274550 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 4 years ago
7 changed file(s) with 356 addition(s) and 344 deletion(s). Raw diff Collapse all Expand all
223223 Name.startswith("avx2.pbroadcast") ||
224224 Name.startswith("avx.vpermil.") ||
225225 Name.startswith("sse2.pshuf") ||
226 Name.startswith("avx512.pbroadcast") ||
227 Name.startswith("avx512.mask.broadcast.s") ||
226228 Name.startswith("avx512.mask.movddup") ||
227229 Name.startswith("avx512.mask.movshdup") ||
228230 Name.startswith("avx512.mask.movsldup") ||
908910 Rep = Builder.CreateShuffleVector(Load, UndefValue::get(Load->getType()),
909911 Idxs);
910912 } else if (IsX86 && (Name.startswith("avx2.pbroadcast") ||
911 Name.startswith("avx2.vbroadcast"))) {
913 Name.startswith("avx2.vbroadcast") ||
914 Name.startswith("avx512.pbroadcast") ||
915 Name.startswith("avx512.mask.broadcast.s"))) {
912916 // Replace vp?broadcasts with a vector shuffle.
913917 Value *Op = CI->getArgOperand(0);
914918 unsigned NumElts = CI->getType()->getVectorNumElements();
915919 Type *MaskTy = VectorType::get(Type::getInt32Ty(C), NumElts);
916920 Rep = Builder.CreateShuffleVector(Op, UndefValue::get(Op->getType()),
917921 Constant::getNullValue(MaskTy));
922
923 if (CI->getNumArgOperands() == 3)
924 Rep = EmitX86Select(Builder, CI->getArgOperand(2), Rep,
925 CI->getArgOperand(1));
918926 } else if (IsX86 && Name.startswith("avx512.mask.palignr.")) {
919927 Rep = UpgradeX86PALIGNRIntrinsics(Builder, C, CI->getArgOperand(0),
920928 CI->getArgOperand(1),
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
11 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s
2
3 declare <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float>, <16 x float>, i16) nounwind readonly
4
5 define <16 x float> @test_x86_vbroadcast_ss_ps_512(<4 x float> %a0, <16 x float> %a1, i16 %mask ) {
6 ; CHECK-LABEL: test_x86_vbroadcast_ss_ps_512:
7 ; CHECK: ## BB#0:
8 ; CHECK-NEXT: vbroadcastss %xmm0, %zmm2
9 ; CHECK-NEXT: kmovw %edi, %k1
10 ; CHECK-NEXT: vbroadcastss %xmm0, %zmm1 {%k1}
11 ; CHECK-NEXT: vbroadcastss %xmm0, %zmm0 {%k1} {z}
12 ; CHECK-NEXT: vaddps %zmm1, %zmm2, %zmm1
13 ; CHECK-NEXT: vaddps %zmm1, %zmm0, %zmm0
14 ; CHECK-NEXT: retq
15
16 %res = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> zeroinitializer, i16 -1)
17 %res1 = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> %a1, i16 %mask)
18 %res2 = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> zeroinitializer, i16 %mask)
19 %res3 = fadd <16 x float> %res, %res1
20 %res4 = fadd <16 x float> %res2, %res3
21 ret <16 x float> %res4
22 }
23
24 declare <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double>, <8 x double>, i8) nounwind readonly
25
26 define <8 x double> @test_x86_vbroadcast_sd_pd_512(<2 x double> %a0, <8 x double> %a1, i8 %mask ) {
27 ; CHECK-LABEL: test_x86_vbroadcast_sd_pd_512:
28 ; CHECK: ## BB#0:
29 ; CHECK-NEXT: vbroadcastsd %xmm0, %zmm2
30 ; CHECK-NEXT: kmovw %edi, %k1
31 ; CHECK-NEXT: vbroadcastsd %xmm0, %zmm1 {%k1}
32 ; CHECK-NEXT: vbroadcastsd %xmm0, %zmm0 {%k1} {z}
33 ; CHECK-NEXT: vaddpd %zmm1, %zmm2, %zmm1
34 ; CHECK-NEXT: vaddpd %zmm1, %zmm0, %zmm0
35 ; CHECK-NEXT: retq
36
37 %res = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> zeroinitializer, i8 -1)
38 %res1 = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> %a1, i8 %mask)
39 %res2 = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> zeroinitializer, i8 %mask)
40 %res3 = fadd <8 x double> %res, %res1
41 %res4 = fadd <8 x double> %res2, %res3
42 ret <8 x double> %res4
43 }
44
45 declare <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32>, <16 x i32>, i16)
46
47 define <16 x i32>@test_int_x86_avx512_pbroadcastd_512(<4 x i32> %x0, <16 x i32> %x1, i16 %mask) {
48 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_512:
49 ; CHECK: ## BB#0:
50 ; CHECK-NEXT: vpbroadcastd %xmm0, %zmm2
51 ; CHECK-NEXT: kmovw %edi, %k1
52 ; CHECK-NEXT: vpbroadcastd %xmm0, %zmm1 {%k1}
53 ; CHECK-NEXT: vpbroadcastd %xmm0, %zmm0 {%k1} {z}
54 ; CHECK-NEXT: vpaddd %zmm1, %zmm2, %zmm1
55 ; CHECK-NEXT: vpaddd %zmm1, %zmm0, %zmm0
56 ; CHECK-NEXT: retq
57 %res = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> %x1, i16 -1)
58 %res1 = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> %x1, i16 %mask)
59 %res2 = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> zeroinitializer, i16 %mask)
60 %res3 = add <16 x i32> %res, %res1
61 %res4 = add <16 x i32> %res2, %res3
62 ret <16 x i32> %res4
63 }
64
65 declare <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64>, <8 x i64>, i8)
66
67 define <8 x i64>@test_int_x86_avx512_pbroadcastq_512(<2 x i64> %x0, <8 x i64> %x1, i8 %mask) {
68 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_512:
69 ; CHECK: ## BB#0:
70 ; CHECK-NEXT: vpbroadcastq %xmm0, %zmm2
71 ; CHECK-NEXT: kmovw %edi, %k1
72 ; CHECK-NEXT: vpbroadcastq %xmm0, %zmm1 {%k1}
73 ; CHECK-NEXT: vpbroadcastq %xmm0, %zmm0 {%k1} {z}
74 ; CHECK-NEXT: vpaddq %zmm1, %zmm2, %zmm1
75 ; CHECK-NEXT: vpaddq %zmm1, %zmm0, %zmm0
76 ; CHECK-NEXT: retq
77 %res = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> %x1,i8 -1)
78 %res1 = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> %x1,i8 %mask)
79 %res2 = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> zeroinitializer,i8 %mask)
80 %res3 = add <8 x i64> %res, %res1
81 %res4 = add <8 x i64> %res2, %res3
82 ret <8 x i64> %res4
83 }
284
385 declare <16 x float> @llvm.x86.avx512.mask.movsldup.512(<16 x float>, <16 x float>, i16)
486
641641 ret <8 x double> %res
642642 }
643643 declare <8 x double> @llvm.x86.avx512.vbroadcast.sd.512(i8*) nounwind readonly
644
645 define <16 x float> @test_x86_vbroadcast_ss_ps_512(<4 x float> %a0, <16 x float> %a1, i16 %mask ) {
646 ; CHECK-LABEL: test_x86_vbroadcast_ss_ps_512:
647 ; CHECK: ## BB#0:
648 ; CHECK-NEXT: kmovw %edi, %k1
649 ; CHECK-NEXT: vbroadcastss %xmm0, %zmm1 {%k1}
650 ; CHECK-NEXT: vbroadcastss %xmm0, %zmm2 {%k1} {z}
651 ; CHECK-NEXT: vbroadcastss %xmm0, %zmm0
652 ; CHECK-NEXT: vaddps %zmm1, %zmm0, %zmm0
653 ; CHECK-NEXT: vaddps %zmm0, %zmm2, %zmm0
654 ; CHECK-NEXT: retq
655
656 %res = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> zeroinitializer, i16 -1)
657 %res1 = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> %a1, i16 %mask)
658 %res2 = call <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float> %a0, <16 x float> zeroinitializer, i16 %mask)
659 %res3 = fadd <16 x float> %res, %res1
660 %res4 = fadd <16 x float> %res2, %res3
661 ret <16 x float> %res4
662 }
663 declare <16 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.512(<4 x float>, <16 x float>, i16) nounwind readonly
664
665
666 define <8 x double> @test_x86_vbroadcast_sd_pd_512(<2 x double> %a0, <8 x double> %a1, i8 %mask ) {
667 ; CHECK-LABEL: test_x86_vbroadcast_sd_pd_512:
668 ; CHECK: ## BB#0:
669 ; CHECK-NEXT: kmovw %edi, %k1
670 ; CHECK-NEXT: vbroadcastsd %xmm0, %zmm1 {%k1}
671 ; CHECK-NEXT: vbroadcastsd %xmm0, %zmm2 {%k1} {z}
672 ; CHECK-NEXT: vbroadcastsd %xmm0, %zmm0
673 ; CHECK-NEXT: vaddpd %zmm1, %zmm0, %zmm0
674 ; CHECK-NEXT: vaddpd %zmm0, %zmm2, %zmm0
675 ; CHECK-NEXT: retq
676
677 %res = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> zeroinitializer, i8 -1)
678 %res1 = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> %a1, i8 %mask)
679 %res2 = call <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double> %a0, <8 x double> zeroinitializer, i8 %mask)
680 %res3 = fadd <8 x double> %res, %res1
681 %res4 = fadd <8 x double> %res2, %res3
682 ret <8 x double> %res4
683 }
684 declare <8 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.512(<2 x double>, <8 x double>, i8) nounwind readonly
685
686 define <16 x i32>@test_int_x86_avx512_pbroadcastd_512(<4 x i32> %x0, <16 x i32> %x1, i16 %mask) {
687 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_512:
688 ; CHECK: ## BB#0:
689 ; CHECK-NEXT: kmovw %edi, %k1
690 ; CHECK-NEXT: vpbroadcastd %xmm0, %zmm1 {%k1}
691 ; CHECK-NEXT: vpbroadcastd %xmm0, %zmm2 {%k1} {z}
692 ; CHECK-NEXT: vpbroadcastd %xmm0, %zmm0
693 ; CHECK-NEXT: vpaddd %zmm1, %zmm0, %zmm0
694 ; CHECK-NEXT: vpaddd %zmm0, %zmm2, %zmm0
695 ; CHECK-NEXT: retq
696 %res = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> %x1, i16 -1)
697 %res1 = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> %x1, i16 %mask)
698 %res2 = call <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32> %x0, <16 x i32> zeroinitializer, i16 %mask)
699 %res3 = add <16 x i32> %res, %res1
700 %res4 = add <16 x i32> %res2, %res3
701 ret <16 x i32> %res4
702 }
703 declare <16 x i32> @llvm.x86.avx512.pbroadcastd.512(<4 x i32>, <16 x i32>, i16)
704
705 define <8 x i64>@test_int_x86_avx512_pbroadcastq_512(<2 x i64> %x0, <8 x i64> %x1, i8 %mask) {
706 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_512:
707 ; CHECK: ## BB#0:
708 ; CHECK-NEXT: kmovw %edi, %k1
709 ; CHECK-NEXT: vpbroadcastq %xmm0, %zmm1 {%k1}
710 ; CHECK-NEXT: vpbroadcastq %xmm0, %zmm2 {%k1} {z}
711 ; CHECK-NEXT: vpbroadcastq %xmm0, %zmm0
712 ; CHECK-NEXT: vpaddq %zmm1, %zmm0, %zmm0
713 ; CHECK-NEXT: vpaddq %zmm0, %zmm2, %zmm0
714 ; CHECK-NEXT: retq
715 %res = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> %x1,i8 -1)
716 %res1 = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> %x1,i8 %mask)
717 %res2 = call <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64> %x0, <8 x i64> zeroinitializer,i8 %mask)
718 %res3 = add <8 x i64> %res, %res1
719 %res4 = add <8 x i64> %res2, %res3
720 ret <8 x i64> %res4
721 }
722 declare <8 x i64> @llvm.x86.avx512.pbroadcastq.512(<2 x i64>, <8 x i64>, i8)
723644
724645 define <16 x i32> @test_conflict_d(<16 x i32> %a) {
725646 ; CHECK-LABEL: test_conflict_d:
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
11 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512bw -mattr=+avx512vl --show-mc-encoding| FileCheck %s
2
3 declare <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8>, <32 x i8>, i32)
4
5 define <32 x i8>@test_int_x86_avx512_pbroadcastb_256(<16 x i8> %x0, <32 x i8> %x1, i32 %mask) {
6 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_256:
7 ; CHECK: ## BB#0:
8 ; CHECK-NEXT: vpbroadcastb %xmm0, %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x78,0xd0]
9 ; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
10 ; CHECK-NEXT: vpbroadcastb %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x78,0xc8]
11 ; CHECK-NEXT: vpbroadcastb %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x78,0xc0]
12 ; CHECK-NEXT: vpaddb %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0x6d,0x28,0xfc,0xc9]
13 ; CHECK-NEXT: vpaddb %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfc,0xc1]
14 ; CHECK-NEXT: retq ## encoding: [0xc3]
15 %res = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> %x1, i32 -1)
16 %res1 = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> %x1, i32 %mask)
17 %res2 = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> zeroinitializer, i32 %mask)
18 %res3 = add <32 x i8> %res, %res1
19 %res4 = add <32 x i8> %res2, %res3
20 ret <32 x i8> %res4
21 }
22
23 declare <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8>, <16 x i8>, i16)
24
25 define <16 x i8>@test_int_x86_avx512_pbroadcastb_128(<16 x i8> %x0, <16 x i8> %x1, i16 %mask) {
26 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_128:
27 ; CHECK: ## BB#0:
28 ; CHECK-NEXT: vpbroadcastb %xmm0, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x78,0xd0]
29 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
30 ; CHECK-NEXT: vpbroadcastb %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x78,0xc8]
31 ; CHECK-NEXT: vpbroadcastb %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x78,0xc0]
32 ; CHECK-NEXT: vpaddb %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0x6d,0x08,0xfc,0xc9]
33 ; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfc,0xc1]
34 ; CHECK-NEXT: retq ## encoding: [0xc3]
35 %res = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> %x1, i16 -1)
36 %res1 = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> %x1, i16 %mask)
37 %res2 = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> zeroinitializer, i16 %mask)
38 %res3 = add <16 x i8> %res, %res1
39 %res4 = add <16 x i8> %res2, %res3
40 ret <16 x i8> %res4
41 }
42
43 declare <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16>, <16 x i16>, i16)
44
45 define <16 x i16>@test_int_x86_avx512_pbroadcastw_256(<8 x i16> %x0, <16 x i16> %x1, i16 %mask) {
46 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_256:
47 ; CHECK: ## BB#0:
48 ; CHECK-NEXT: vpbroadcastw %xmm0, %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x79,0xd0]
49 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
50 ; CHECK-NEXT: vpbroadcastw %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x79,0xc8]
51 ; CHECK-NEXT: vpbroadcastw %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x79,0xc0]
52 ; CHECK-NEXT: vpaddw %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0x6d,0x28,0xfd,0xc9]
53 ; CHECK-NEXT: vpaddw %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfd,0xc1]
54 ; CHECK-NEXT: retq ## encoding: [0xc3]
55 %res = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> %x1, i16 -1)
56 %res1 = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> %x1, i16 %mask)
57 %res2 = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> zeroinitializer, i16 %mask)
58 %res3 = add <16 x i16> %res, %res1
59 %res4 = add <16 x i16> %res2, %res3
60 ret <16 x i16> %res4
61 }
62
63 declare <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16>, <8 x i16>, i8)
64
65 define <8 x i16>@test_int_x86_avx512_pbroadcastw_128(<8 x i16> %x0, <8 x i16> %x1, i8 %mask) {
66 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_128:
67 ; CHECK: ## BB#0:
68 ; CHECK-NEXT: vpbroadcastw %xmm0, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x79,0xd0]
69 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
70 ; CHECK-NEXT: vpbroadcastw %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x79,0xc8]
71 ; CHECK-NEXT: vpbroadcastw %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x79,0xc0]
72 ; CHECK-NEXT: vpaddw %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0x6d,0x08,0xfd,0xc9]
73 ; CHECK-NEXT: vpaddw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfd,0xc1]
74 ; CHECK-NEXT: retq ## encoding: [0xc3]
75 %res = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> %x1, i8 -1)
76 %res1 = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> %x1, i8 %mask)
77 %res2 = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> zeroinitializer, i8 %mask)
78 %res3 = add <8 x i16> %res, %res1
79 %res4 = add <8 x i16> %res2, %res3
80 ret <8 x i16> %res4
81 }
82
83 declare <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8>, <64 x i8>, i64)
84
85 define <64 x i8>@test_int_x86_avx512_pbroadcastb_512(<16 x i8> %x0, <64 x i8> %x1, i64 %mask) {
86 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_512:
87 ; CHECK: ## BB#0:
88 ; CHECK-NEXT: vpbroadcastb %xmm0, %zmm2 ## encoding: [0x62,0xf2,0x7d,0x48,0x78,0xd0]
89 ; CHECK-NEXT: kmovq %rdi, %k1 ## encoding: [0xc4,0xe1,0xfb,0x92,0xcf]
90 ; CHECK-NEXT: vpbroadcastb %xmm0, %zmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x49,0x78,0xc8]
91 ; CHECK-NEXT: vpbroadcastb %xmm0, %zmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xc9,0x78,0xc0]
92 ; CHECK-NEXT: vpaddb %zmm1, %zmm2, %zmm1 ## encoding: [0x62,0xf1,0x6d,0x48,0xfc,0xc9]
93 ; CHECK-NEXT: vpaddb %zmm1, %zmm0, %zmm0 ## encoding: [0x62,0xf1,0x7d,0x48,0xfc,0xc1]
94 ; CHECK-NEXT: retq ## encoding: [0xc3]
95 %res = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> %x1, i64 -1)
96 %res1 = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> %x1, i64 %mask)
97 %res2 = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> zeroinitializer, i64 %mask)
98 %res3 = add <64 x i8> %res, %res1
99 %res4 = add <64 x i8> %res2, %res3
100 ret <64 x i8> %res4
101 }
102
103 declare <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16>, <32 x i16>, i32)
104
105 define <32 x i16>@test_int_x86_avx512_pbroadcastw_512(<8 x i16> %x0, <32 x i16> %x1, i32 %mask) {
106 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_512:
107 ; CHECK: ## BB#0:
108 ; CHECK-NEXT: vpbroadcastw %xmm0, %zmm2 ## encoding: [0x62,0xf2,0x7d,0x48,0x79,0xd0]
109 ; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
110 ; CHECK-NEXT: vpbroadcastw %xmm0, %zmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x49,0x79,0xc8]
111 ; CHECK-NEXT: vpbroadcastw %xmm0, %zmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xc9,0x79,0xc0]
112 ; CHECK-NEXT: vpaddw %zmm1, %zmm2, %zmm1 ## encoding: [0x62,0xf1,0x6d,0x48,0xfd,0xc9]
113 ; CHECK-NEXT: vpaddw %zmm1, %zmm0, %zmm0 ## encoding: [0x62,0xf1,0x7d,0x48,0xfd,0xc1]
114 ; CHECK-NEXT: retq ## encoding: [0xc3]
115 %res = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> %x1, i32 -1)
116 %res1 = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> %x1, i32 %mask)
117 %res2 = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> zeroinitializer, i32 %mask)
118 %res3 = add <32 x i16> %res, %res1
119 %res4 = add <32 x i16> %res2, %res3
120 ret <32 x i16> %res4
121 }
2122
3123 declare void @llvm.x86.avx512.mask.storeu.b.128(i8*, <16 x i8>, i16)
4124
52115211 ret <16 x i16> %res4
52125212 }
52135213
5214 declare <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8>, <32 x i8>, i32)
5215
5216 define <32 x i8>@test_int_x86_avx512_pbroadcastb_256(<16 x i8> %x0, <32 x i8> %x1, i32 %mask) {
5217 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_256:
5218 ; CHECK: ## BB#0:
5219 ; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
5220 ; CHECK-NEXT: vpbroadcastb %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x78,0xc8]
5221 ; CHECK-NEXT: vpbroadcastb %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x78,0xd0]
5222 ; CHECK-NEXT: vpbroadcastb %xmm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x78,0xc0]
5223 ; CHECK-NEXT: vpaddb %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfc,0xc1]
5224 ; CHECK-NEXT: vpaddb %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0x6d,0x28,0xfc,0xc0]
5225 ; CHECK-NEXT: retq ## encoding: [0xc3]
5226 %res = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> %x1, i32 -1)
5227 %res1 = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> %x1, i32 %mask)
5228 %res2 = call <32 x i8> @llvm.x86.avx512.pbroadcastb.256(<16 x i8> %x0, <32 x i8> zeroinitializer, i32 %mask)
5229 %res3 = add <32 x i8> %res, %res1
5230 %res4 = add <32 x i8> %res2, %res3
5231 ret <32 x i8> %res4
5232 }
5233
5234 declare <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8>, <16 x i8>, i16)
5235
5236 define <16 x i8>@test_int_x86_avx512_pbroadcastb_128(<16 x i8> %x0, <16 x i8> %x1, i16 %mask) {
5237 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_128:
5238 ; CHECK: ## BB#0:
5239 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
5240 ; CHECK-NEXT: vpbroadcastb %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x78,0xc8]
5241 ; CHECK-NEXT: vpbroadcastb %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x78,0xd0]
5242 ; CHECK-NEXT: vpbroadcastb %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x78,0xc0]
5243 ; CHECK-NEXT: vpaddb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfc,0xc1]
5244 ; CHECK-NEXT: vpaddb %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0x6d,0x08,0xfc,0xc0]
5245 ; CHECK-NEXT: retq ## encoding: [0xc3]
5246 %res = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> %x1, i16 -1)
5247 %res1 = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> %x1, i16 %mask)
5248 %res2 = call <16 x i8> @llvm.x86.avx512.pbroadcastb.128(<16 x i8> %x0, <16 x i8> zeroinitializer, i16 %mask)
5249 %res3 = add <16 x i8> %res, %res1
5250 %res4 = add <16 x i8> %res2, %res3
5251 ret <16 x i8> %res4
5252 }
5253
5254 declare <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16>, <16 x i16>, i16)
5255
5256 define <16 x i16>@test_int_x86_avx512_pbroadcastw_256(<8 x i16> %x0, <16 x i16> %x1, i16 %mask) {
5257 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_256:
5258 ; CHECK: ## BB#0:
5259 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
5260 ; CHECK-NEXT: vpbroadcastw %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x79,0xc8]
5261 ; CHECK-NEXT: vpbroadcastw %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x79,0xd0]
5262 ; CHECK-NEXT: vpbroadcastw %xmm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x79,0xc0]
5263 ; CHECK-NEXT: vpaddw %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfd,0xc1]
5264 ; CHECK-NEXT: vpaddw %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0x6d,0x28,0xfd,0xc0]
5265 ; CHECK-NEXT: retq ## encoding: [0xc3]
5266 %res = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> %x1, i16 -1)
5267 %res1 = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> %x1, i16 %mask)
5268 %res2 = call <16 x i16> @llvm.x86.avx512.pbroadcastw.256(<8 x i16> %x0, <16 x i16> zeroinitializer, i16 %mask)
5269 %res3 = add <16 x i16> %res, %res1
5270 %res4 = add <16 x i16> %res2, %res3
5271 ret <16 x i16> %res4
5272 }
5273
5274 declare <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16>, <8 x i16>, i8)
5275
5276 define <8 x i16>@test_int_x86_avx512_pbroadcastw_128(<8 x i16> %x0, <8 x i16> %x1, i8 %mask) {
5277 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_128:
5278 ; CHECK: ## BB#0:
5279 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
5280 ; CHECK-NEXT: vpbroadcastw %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x79,0xc8]
5281 ; CHECK-NEXT: vpbroadcastw %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x79,0xd0]
5282 ; CHECK-NEXT: vpbroadcastw %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x79,0xc0]
5283 ; CHECK-NEXT: vpaddw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfd,0xc1]
5284 ; CHECK-NEXT: vpaddw %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0x6d,0x08,0xfd,0xc0]
5285 ; CHECK-NEXT: retq ## encoding: [0xc3]
5286 %res = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> %x1, i8 -1)
5287 %res1 = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> %x1, i8 %mask)
5288 %res2 = call <8 x i16> @llvm.x86.avx512.pbroadcastw.128(<8 x i16> %x0, <8 x i16> zeroinitializer, i8 %mask)
5289 %res3 = add <8 x i16> %res, %res1
5290 %res4 = add <8 x i16> %res2, %res3
5291 ret <8 x i16> %res4
5292 }
5293
5294 declare <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8>, <64 x i8>, i64)
5295
5296 define <64 x i8>@test_int_x86_avx512_pbroadcastb_512(<16 x i8> %x0, <64 x i8> %x1, i64 %mask) {
5297 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastb_512:
5298 ; CHECK: ## BB#0:
5299 ; CHECK-NEXT: kmovq %rdi, %k1 ## encoding: [0xc4,0xe1,0xfb,0x92,0xcf]
5300 ; CHECK-NEXT: vpbroadcastb %xmm0, %zmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x49,0x78,0xc8]
5301 ; CHECK-NEXT: vpbroadcastb %xmm0, %zmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xc9,0x78,0xd0]
5302 ; CHECK-NEXT: vpbroadcastb %xmm0, %zmm0 ## encoding: [0x62,0xf2,0x7d,0x48,0x78,0xc0]
5303 ; CHECK-NEXT: vpaddb %zmm1, %zmm0, %zmm0 ## encoding: [0x62,0xf1,0x7d,0x48,0xfc,0xc1]
5304 ; CHECK-NEXT: vpaddb %zmm0, %zmm2, %zmm0 ## encoding: [0x62,0xf1,0x6d,0x48,0xfc,0xc0]
5305 ; CHECK-NEXT: retq ## encoding: [0xc3]
5306 %res = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> %x1, i64 -1)
5307 %res1 = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> %x1, i64 %mask)
5308 %res2 = call <64 x i8> @llvm.x86.avx512.pbroadcastb.512(<16 x i8> %x0, <64 x i8> zeroinitializer, i64 %mask)
5309 %res3 = add <64 x i8> %res, %res1
5310 %res4 = add <64 x i8> %res2, %res3
5311 ret <64 x i8> %res4
5312 }
5313
5314 declare <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16>, <32 x i16>, i32)
5315
5316 define <32 x i16>@test_int_x86_avx512_pbroadcastw_512(<8 x i16> %x0, <32 x i16> %x1, i32 %mask) {
5317 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastw_512:
5318 ; CHECK: ## BB#0:
5319 ; CHECK-NEXT: kmovd %edi, %k1 ## encoding: [0xc5,0xfb,0x92,0xcf]
5320 ; CHECK-NEXT: vpbroadcastw %xmm0, %zmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x49,0x79,0xc8]
5321 ; CHECK-NEXT: vpbroadcastw %xmm0, %zmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xc9,0x79,0xd0]
5322 ; CHECK-NEXT: vpbroadcastw %xmm0, %zmm0 ## encoding: [0x62,0xf2,0x7d,0x48,0x79,0xc0]
5323 ; CHECK-NEXT: vpaddw %zmm1, %zmm0, %zmm0 ## encoding: [0x62,0xf1,0x7d,0x48,0xfd,0xc1]
5324 ; CHECK-NEXT: vpaddw %zmm0, %zmm2, %zmm0 ## encoding: [0x62,0xf1,0x6d,0x48,0xfd,0xc0]
5325 ; CHECK-NEXT: retq ## encoding: [0xc3]
5326 %res = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> %x1, i32 -1)
5327 %res1 = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> %x1, i32 %mask)
5328 %res2 = call <32 x i16> @llvm.x86.avx512.pbroadcastw.512(<8 x i16> %x0, <32 x i16> zeroinitializer, i32 %mask)
5329 %res3 = add <32 x i16> %res, %res1
5330 %res4 = add <32 x i16> %res2, %res3
5331 ret <32 x i16> %res4
5332 }
5333
53345214 declare i16 @llvm.x86.avx512.cvtb2mask.128(<16 x i8>)
53355215
53365216 define i16@test_int_x86_avx512_cvtb2mask_128(<16 x i8> %x0) {
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
11 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512vl --show-mc-encoding| FileCheck %s
2
3 declare <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32>, <8 x i32>, i8)
4
5 define <8 x i32>@test_int_x86_avx512_pbroadcastd_256(<4 x i32> %x0, <8 x i32> %x1, i8 %mask, i32 * %y_ptr) {
6 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_256:
7 ; CHECK: ## BB#0:
8 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
9 ; CHECK-NEXT: vpbroadcastd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x58,0xc8]
10 ; CHECK-NEXT: vpbroadcastd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x58,0xc0]
11 ; CHECK-NEXT: vpaddd (%rsi){1to8}, %ymm1, %ymm1 ## encoding: [0x62,0xf1,0x75,0x38,0xfe,0x0e]
12 ; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfe,0xc1]
13 ; CHECK-NEXT: retq ## encoding: [0xc3]
14 %y_32 = load i32, i32 * %y_ptr
15 %y = insertelement <4 x i32> undef, i32 %y_32, i32 0
16 %res = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %y, <8 x i32> %x1, i8 -1)
17 %res1 = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %x0, <8 x i32> %x1, i8 %mask)
18 %res2 = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %x0, <8 x i32> zeroinitializer, i8 %mask)
19 %res3 = add <8 x i32> %res, %res1
20 %res4 = add <8 x i32> %res2, %res3
21 ret <8 x i32> %res4
22 }
23
24 declare <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32>, <4 x i32>, i8)
25
26 define <4 x i32>@test_int_x86_avx512_pbroadcastd_128(<4 x i32> %x0, <4 x i32> %x1, i8 %mask) {
27 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_128:
28 ; CHECK: ## BB#0:
29 ; CHECK-NEXT: vpbroadcastd %xmm0, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x58,0xd0]
30 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
31 ; CHECK-NEXT: vpbroadcastd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x58,0xc8]
32 ; CHECK-NEXT: vpbroadcastd %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x58,0xc0]
33 ; CHECK-NEXT: vpaddd %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0x6d,0x08,0xfe,0xc9]
34 ; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfe,0xc1]
35 ; CHECK-NEXT: retq ## encoding: [0xc3]
36 %res = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> %x1, i8 -1)
37 %res1 = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> %x1, i8 %mask)
38 %res2 = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> zeroinitializer, i8 %mask)
39 %res3 = add <4 x i32> %res, %res1
40 %res4 = add <4 x i32> %res2, %res3
41 ret <4 x i32> %res4
42 }
43
44 declare <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64>, <4 x i64>, i8)
45
46 define <4 x i64>@test_int_x86_avx512_pbroadcastq_256(<2 x i64> %x0, <4 x i64> %x1, i8 %mask) {
47 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_256:
48 ; CHECK: ## BB#0:
49 ; CHECK-NEXT: vpbroadcastq %xmm0, %ymm2 ## encoding: [0x62,0xf2,0xfd,0x28,0x59,0xd0]
50 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
51 ; CHECK-NEXT: vpbroadcastq %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x59,0xc8]
52 ; CHECK-NEXT: vpbroadcastq %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x59,0xc0]
53 ; CHECK-NEXT: vpaddq %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0xed,0x28,0xd4,0xc9]
54 ; CHECK-NEXT: vpaddq %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0xd4,0xc1]
55 ; CHECK-NEXT: retq ## encoding: [0xc3]
56 %res = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> %x1,i8 -1)
57 %res1 = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> %x1,i8 %mask)
58 %res2 = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> zeroinitializer,i8 %mask)
59 %res3 = add <4 x i64> %res, %res1
60 %res4 = add <4 x i64> %res2, %res3
61 ret <4 x i64> %res4
62 }
63
64 declare <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64>, <2 x i64>, i8)
65
66 define <2 x i64>@test_int_x86_avx512_pbroadcastq_128(<2 x i64> %x0, <2 x i64> %x1, i8 %mask) {
67 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_128:
68 ; CHECK: ## BB#0:
69 ; CHECK-NEXT: vpbroadcastq %xmm0, %xmm2 ## encoding: [0x62,0xf2,0xfd,0x08,0x59,0xd0]
70 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
71 ; CHECK-NEXT: vpbroadcastq %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x59,0xc8]
72 ; CHECK-NEXT: vpbroadcastq %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x59,0xc0]
73 ; CHECK-NEXT: vpaddq %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0xed,0x08,0xd4,0xc9]
74 ; CHECK-NEXT: vpaddq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xd4,0xc1]
75 ; CHECK-NEXT: retq ## encoding: [0xc3]
76 %res = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> %x1,i8 -1)
77 %res1 = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> %x1,i8 %mask)
78 %res2 = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> zeroinitializer,i8 %mask)
79 %res3 = add <2 x i64> %res, %res1
80 %res4 = add <2 x i64> %res2, %res3
81 ret <2 x i64> %res4
82 }
83
84 declare <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double>, <4 x double>, i8) nounwind readonly
85
86 define <4 x double> @test_x86_vbroadcast_sd_pd_256(<2 x double> %a0, <4 x double> %a1, i8 %mask ) {
87 ; CHECK-LABEL: test_x86_vbroadcast_sd_pd_256:
88 ; CHECK: ## BB#0:
89 ; CHECK-NEXT: vbroadcastsd %xmm0, %ymm2 ## encoding: [0x62,0xf2,0xfd,0x28,0x19,0xd0]
90 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
91 ; CHECK-NEXT: vbroadcastsd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x19,0xc8]
92 ; CHECK-NEXT: vbroadcastsd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x19,0xc0]
93 ; CHECK-NEXT: vaddpd %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0xed,0x28,0x58,0xc9]
94 ; CHECK-NEXT: vaddpd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0x58,0xc1]
95 ; CHECK-NEXT: retq ## encoding: [0xc3]
96 %res = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> zeroinitializer, i8 -1)
97 %res1 = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> %a1, i8 %mask)
98 %res2 = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> zeroinitializer, i8 %mask)
99 %res3 = fadd <4 x double> %res, %res1
100 %res4 = fadd <4 x double> %res2, %res3
101 ret <4 x double> %res4
102 }
103
104 declare <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float>, <8 x float>, i8) nounwind readonly
105
106 define <8 x float> @test_x86_vbroadcast_ss_ps_256(<4 x float> %a0, <8 x float> %a1, i8 %mask ) {
107 ; CHECK-LABEL: test_x86_vbroadcast_ss_ps_256:
108 ; CHECK: ## BB#0:
109 ; CHECK-NEXT: vbroadcastss %xmm0, %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x18,0xd0]
110 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
111 ; CHECK-NEXT: vbroadcastss %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x18,0xc8]
112 ; CHECK-NEXT: vbroadcastss %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x18,0xc0]
113 ; CHECK-NEXT: vaddps %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0x6c,0x28,0x58,0xc9]
114 ; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7c,0x28,0x58,0xc1]
115 ; CHECK-NEXT: retq ## encoding: [0xc3]
116 %res = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> zeroinitializer, i8 -1)
117 %res1 = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> %a1, i8 %mask)
118 %res2 = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> zeroinitializer, i8 %mask)
119 %res3 = fadd <8 x float> %res, %res1
120 %res4 = fadd <8 x float> %res2, %res3
121 ret <8 x float> %res4
122 }
123
124 declare <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float>, <4 x float>, i8) nounwind readonly
125
126 define <4 x float> @test_x86_vbroadcast_ss_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask ) {
127 ; CHECK-LABEL: test_x86_vbroadcast_ss_ps_128:
128 ; CHECK: ## BB#0:
129 ; CHECK-NEXT: vbroadcastss %xmm0, %xmm2 ## encoding: [0x62,0xf2,0x7d,0x08,0x18,0xd0]
130 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
131 ; CHECK-NEXT: vbroadcastss %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x18,0xc8]
132 ; CHECK-NEXT: vbroadcastss %xmm0, %xmm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x18,0xc0]
133 ; CHECK-NEXT: vaddps %xmm1, %xmm2, %xmm1 ## encoding: [0x62,0xf1,0x6c,0x08,0x58,0xc9]
134 ; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x58,0xc1]
135 ; CHECK-NEXT: retq ## encoding: [0xc3]
136 %res = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> zeroinitializer, i8 -1)
137 %res1 = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> %a1, i8 %mask)
138 %res2 = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> zeroinitializer, i8 %mask)
139 %res3 = fadd <4 x float> %res, %res1
140 %res4 = fadd <4 x float> %res2, %res3
141 ret <4 x float> %res4
142 }
2143
3144 declare <4 x float> @llvm.x86.avx512.mask.movsldup.128(<4 x float>, <4 x float>, i8)
4145
59785978 ret <4 x i64> %res2
59795979 }
59805980
5981 declare <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32>, <8 x i32>, i8)
5982
5983 define <8 x i32>@test_int_x86_avx512_pbroadcastd_256(<4 x i32> %x0, <8 x i32> %x1, i8 %mask, i32 * %y_ptr) {
5984 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_256:
5985 ; CHECK: ## BB#0:
5986 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
5987 ; CHECK-NEXT: vpbroadcastd (%rsi), %ymm2 ## encoding: [0x62,0xf2,0x7d,0x28,0x58,0x16]
5988 ; CHECK-NEXT: vpbroadcastd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x58,0xc8]
5989 ; CHECK-NEXT: vpbroadcastd %xmm0, %ymm0 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x58,0xc0]
5990 ; CHECK-NEXT: vpaddd %ymm1, %ymm2, %ymm1 ## encoding: [0x62,0xf1,0x6d,0x28,0xfe,0xc9]
5991 ; CHECK-NEXT: vpaddd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7d,0x28,0xfe,0xc1]
5992 ; CHECK-NEXT: retq ## encoding: [0xc3]
5993 %y_32 = load i32, i32 * %y_ptr
5994 %y = insertelement <4 x i32> undef, i32 %y_32, i32 0
5995 %res = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %y, <8 x i32> %x1, i8 -1)
5996 %res1 = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %x0, <8 x i32> %x1, i8 %mask)
5997 %res2 = call <8 x i32> @llvm.x86.avx512.pbroadcastd.256(<4 x i32> %x0, <8 x i32> zeroinitializer, i8 %mask)
5998 %res3 = add <8 x i32> %res, %res1
5999 %res4 = add <8 x i32> %res2, %res3
6000 ret <8 x i32> %res4
6001 }
6002
6003 declare <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32>, <4 x i32>, i8)
6004
6005 define <4 x i32>@test_int_x86_avx512_pbroadcastd_128(<4 x i32> %x0, <4 x i32> %x1, i8 %mask) {
6006 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastd_128:
6007 ; CHECK: ## BB#0:
6008 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
6009 ; CHECK-NEXT: vpbroadcastd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x58,0xc8]
6010 ; CHECK-NEXT: vpbroadcastd %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x58,0xd0]
6011 ; CHECK-NEXT: vpbroadcastd %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x58,0xc0]
6012 ; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xfe,0xc1]
6013 ; CHECK-NEXT: vpaddd %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0x6d,0x08,0xfe,0xc0]
6014 ; CHECK-NEXT: retq ## encoding: [0xc3]
6015 %res = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> %x1, i8 -1)
6016 %res1 = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> %x1, i8 %mask)
6017 %res2 = call <4 x i32> @llvm.x86.avx512.pbroadcastd.128(<4 x i32> %x0, <4 x i32> zeroinitializer, i8 %mask)
6018 %res3 = add <4 x i32> %res, %res1
6019 %res4 = add <4 x i32> %res2, %res3
6020 ret <4 x i32> %res4
6021 }
6022
6023 declare <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64>, <4 x i64>, i8)
6024
6025 define <4 x i64>@test_int_x86_avx512_pbroadcastq_256(<2 x i64> %x0, <4 x i64> %x1, i8 %mask) {
6026 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_256:
6027 ; CHECK: ## BB#0:
6028 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
6029 ; CHECK-NEXT: vpbroadcastq %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x59,0xc8]
6030 ; CHECK-NEXT: vpbroadcastq %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x59,0xd0]
6031 ; CHECK-NEXT: vpbroadcastq %xmm0, %ymm0 ## encoding: [0x62,0xf2,0xfd,0x28,0x59,0xc0]
6032 ; CHECK-NEXT: vpaddq %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0xd4,0xc1]
6033 ; CHECK-NEXT: vpaddq %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0xed,0x28,0xd4,0xc0]
6034 ; CHECK-NEXT: retq ## encoding: [0xc3]
6035 %res = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> %x1,i8 -1)
6036 %res1 = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> %x1,i8 %mask)
6037 %res2 = call <4 x i64> @llvm.x86.avx512.pbroadcastq.256(<2 x i64> %x0, <4 x i64> zeroinitializer,i8 %mask)
6038 %res3 = add <4 x i64> %res, %res1
6039 %res4 = add <4 x i64> %res2, %res3
6040 ret <4 x i64> %res4
6041 }
6042
6043 declare <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64>, <2 x i64>, i8)
6044
6045 define <2 x i64>@test_int_x86_avx512_pbroadcastq_128(<2 x i64> %x0, <2 x i64> %x1, i8 %mask) {
6046 ; CHECK-LABEL: test_int_x86_avx512_pbroadcastq_128:
6047 ; CHECK: ## BB#0:
6048 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
6049 ; CHECK-NEXT: vpbroadcastq %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x09,0x59,0xc8]
6050 ; CHECK-NEXT: vpbroadcastq %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0x89,0x59,0xd0]
6051 ; CHECK-NEXT: vpbroadcastq %xmm0, %xmm0 ## encoding: [0x62,0xf2,0xfd,0x08,0x59,0xc0]
6052 ; CHECK-NEXT: vpaddq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xd4,0xc1]
6053 ; CHECK-NEXT: vpaddq %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0xed,0x08,0xd4,0xc0]
6054 ; CHECK-NEXT: retq ## encoding: [0xc3]
6055 %res = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> %x1,i8 -1)
6056 %res1 = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> %x1,i8 %mask)
6057 %res2 = call <2 x i64> @llvm.x86.avx512.pbroadcastq.128(<2 x i64> %x0, <2 x i64> zeroinitializer,i8 %mask)
6058 %res3 = add <2 x i64> %res, %res1
6059 %res4 = add <2 x i64> %res2, %res3
6060 ret <2 x i64> %res4
6061 }
6062
60635981 define <4 x float> @test_x86_vcvtph2ps_128(<8 x i16> %a0) {
60645982 ; CHECK-LABEL: test_x86_vcvtph2ps_128:
60655983 ; CHECK: ## BB#0:
64166334
64176335 declare <4 x double> @llvm.x86.avx512.rcp14.pd.256(<4 x double>, <4 x double>, i8) nounwind readnone
64186336 declare <2 x double> @llvm.x86.avx512.rcp14.pd.128(<2 x double>, <2 x double>, i8) nounwind readnone
6419
6420 define <4 x double> @test_x86_vbroadcast_sd_pd_256(<2 x double> %a0, <4 x double> %a1, i8 %mask ) {
6421 ; CHECK-LABEL: test_x86_vbroadcast_sd_pd_256:
6422 ; CHECK: ## BB#0:
6423 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
6424 ; CHECK-NEXT: vbroadcastsd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0xfd,0x29,0x19,0xc8]
6425 ; CHECK-NEXT: vbroadcastsd %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0xfd,0xa9,0x19,0xd0]
6426 ; CHECK-NEXT: vbroadcastsd %xmm0, %ymm0 ## encoding: [0x62,0xf2,0xfd,0x28,0x19,0xc0]
6427 ; CHECK-NEXT: vaddpd %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0xfd,0x28,0x58,0xc1]
6428 ; CHECK-NEXT: vaddpd %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0xed,0x28,0x58,0xc0]
6429 ; CHECK-NEXT: retq ## encoding: [0xc3]
6430 %res = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> zeroinitializer, i8 -1)
6431 %res1 = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> %a1, i8 %mask)
6432 %res2 = call <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double> %a0, <4 x double> zeroinitializer, i8 %mask)
6433 %res3 = fadd <4 x double> %res, %res1
6434 %res4 = fadd <4 x double> %res2, %res3
6435 ret <4 x double> %res4
6436 }
6437 declare <4 x double> @llvm.x86.avx512.mask.broadcast.sd.pd.256(<2 x double>, <4 x double>, i8) nounwind readonly
6438
6439 define <8 x float> @test_x86_vbroadcast_ss_ps_256(<4 x float> %a0, <8 x float> %a1, i8 %mask ) {
6440 ; CHECK-LABEL: test_x86_vbroadcast_ss_ps_256:
6441 ; CHECK: ## BB#0:
6442 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
6443 ; CHECK-NEXT: vbroadcastss %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x29,0x18,0xc8]
6444 ; CHECK-NEXT: vbroadcastss %xmm0, %ymm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0xa9,0x18,0xd0]
6445 ; CHECK-NEXT: vbroadcastss %xmm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x18,0xc0]
6446 ; CHECK-NEXT: vaddps %ymm1, %ymm0, %ymm0 ## encoding: [0x62,0xf1,0x7c,0x28,0x58,0xc1]
6447 ; CHECK-NEXT: vaddps %ymm0, %ymm2, %ymm0 ## encoding: [0x62,0xf1,0x6c,0x28,0x58,0xc0]
6448 ; CHECK-NEXT: retq ## encoding: [0xc3]
6449 %res = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> zeroinitializer, i8 -1)
6450 %res1 = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> %a1, i8 %mask)
6451 %res2 = call <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float> %a0, <8 x float> zeroinitializer, i8 %mask)
6452 %res3 = fadd <8 x float> %res, %res1
6453 %res4 = fadd <8 x float> %res2, %res3
6454 ret <8 x float> %res4
6455 }
6456 declare <8 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.256(<4 x float>, <8 x float>, i8) nounwind readonly
6457
6458 define <4 x float> @test_x86_vbroadcast_ss_ps_128(<4 x float> %a0, <4 x float> %a1, i8 %mask ) {
6459 ; CHECK-LABEL: test_x86_vbroadcast_ss_ps_128:
6460 ; CHECK: ## BB#0:
6461 ; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
6462 ; CHECK-NEXT: vbroadcastss %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf2,0x7d,0x09,0x18,0xc8]
6463 ; CHECK-NEXT: vbroadcastss %xmm0, %xmm2 {%k1} {z} ## encoding: [0x62,0xf2,0x7d,0x89,0x18,0xd0]
6464 ; CHECK-NEXT: vbroadcastss %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x18,0xc0]
6465 ; CHECK-NEXT: vaddps %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x58,0xc1]
6466 ; CHECK-NEXT: vaddps %xmm0, %xmm2, %xmm0 ## encoding: [0x62,0xf1,0x6c,0x08,0x58,0xc0]
6467 ; CHECK-NEXT: retq ## encoding: [0xc3]
6468 %res = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> zeroinitializer, i8 -1)
6469 %res1 = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> %a1, i8 %mask)
6470 %res2 = call <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float> %a0, <4 x float> zeroinitializer, i8 %mask)
6471 %res3 = fadd <4 x float> %res, %res1
6472 %res4 = fadd <4 x float> %res2, %res3
6473 ret <4 x float> %res4
6474 }
6475 declare <4 x float> @llvm.x86.avx512.mask.broadcast.ss.ps.128(<4 x float>, <4 x float>, i8) nounwind readonly
6476
64776337
64786338 declare <8 x float> @llvm.x86.avx512.mask.broadcastf32x4.256(<4 x float>, <8 x float>, i8)
64796339
71256985 ; CHECK: ## BB#0:
71266986 ; CHECK-NEXT: vmovdqa32 {{.*#+}} ymm0 = [2,9,4294967284,23,4294967270,37,4294967256,51]
71276987 ; CHECK-NEXT: ## encoding: [0x62,0xf1,0x7d,0x28,0x6f,0x05,A,A,A,A]
7128 ; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI468_0-4, kind: reloc_riprel_4byte
6988 ; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI461_0-4, kind: reloc_riprel_4byte
71296989 ; CHECK-NEXT: vpsravd {{.*}}(%rip), %ymm0, %ymm0 ## encoding: [0x62,0xf2,0x7d,0x28,0x46,0x05,A,A,A,A]
7130 ; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI468_1-4, kind: reloc_riprel_4byte
6990 ; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI461_1-4, kind: reloc_riprel_4byte
71316991 ; CHECK-NEXT: retq ## encoding: [0xc3]
71326992 %res = call <8 x i32> @llvm.x86.avx512.mask.psrav8.si(<8 x i32> , <8 x i32> , <8 x i32> zeroinitializer, i8 -1)
71336993 ret <8 x i32> %res
71587018 ; CHECK: ## BB#0:
71597019 ; CHECK-NEXT: vmovdqa64 {{.*#+}} xmm0 = [2,18446744073709551607]
71607020 ; CHECK-NEXT: ## encoding: [0x62,0xf1,0xfd,0x08,0x6f,0x05,A,A,A,A]
7161 ; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI470_0-4, kind: reloc_riprel_4byte
7021 ; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI463_0-4, kind: reloc_riprel_4byte
71627022 ; CHECK-NEXT: vpsravq {{.*}}(%rip), %xmm0, %xmm0 ## encoding: [0x62,0xf2,0xfd,0x08,0x46,0x05,A,A,A,A]
7163 ; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI470_1-4, kind: reloc_riprel_4byte
7023 ; CHECK-NEXT: ## fixup A - offset: 6, value: LCPI463_1-4, kind: reloc_riprel_4byte
71647024 ; CHECK-NEXT: retq ## encoding: [0xc3]
71657025 %res = call <2 x i64> @llvm.x86.avx512.mask.psrav.q.128(<2 x i64> , <2 x i64> , <2 x i64> zeroinitializer, i8 -1)
71667026 ret <2 x i64> %res