llvm.org GIT mirror llvm / 829f921
Merging r355227 and r355228: ------------------------------------------------------------------------ r355227 | ctopper | 2019-03-01 22:02:34 +0100 (Fri, 01 Mar 2019) | 3 lines [X86] Add test case for D58805. NFC This demonstrates dead store elimination removing a store that may alias a gather that uses null as its base. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r355228 | ctopper | 2019-03-01 22:02:40 +0100 (Fri, 01 Mar 2019) | 7 lines [X86] Remove IntrArgMemOnly from target specific gather/scatter intrinsics IntrArgMemOnly implies that only memory pointed to by pointer typed arguments will be accessed. But these intrinsics allow you to pass null to the pointer argument and put the full address into the index argument. Other passes won't be able to understand this. A colleague found that ISPC was creating gathers like this and then dead store elimination removed some stores because it didn't understand what the gather was doing since the pointer argument was null. Differential Revision: https://reviews.llvm.org/D58805 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_80@355383 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 1 year, 8 months ago
2 changed file(s) with 157 addition(s) and 122 deletion(s). Raw diff Collapse all Expand all
16761676
16771677 // Gather ops
16781678 let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
1679 // NOTE: These can't be ArgMemOnly because you can put the address completely
1680 // in the index register.
16791681 def int_x86_avx2_gather_d_pd : GCCBuiltin<"__builtin_ia32_gatherd_pd">,
16801682 Intrinsic<[llvm_v2f64_ty],
16811683 [llvm_v2f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2f64_ty, llvm_i8_ty],
1682 [IntrReadMem, IntrArgMemOnly]>;
1684 [IntrReadMem]>;
16831685 def int_x86_avx2_gather_d_pd_256 : GCCBuiltin<"__builtin_ia32_gatherd_pd256">,
16841686 Intrinsic<[llvm_v4f64_ty],
16851687 [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f64_ty, llvm_i8_ty],
1686 [IntrReadMem, IntrArgMemOnly]>;
1688 [IntrReadMem]>;
16871689 def int_x86_avx2_gather_q_pd : GCCBuiltin<"__builtin_ia32_gatherq_pd">,
16881690 Intrinsic<[llvm_v2f64_ty],
16891691 [llvm_v2f64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty],
1690 [IntrReadMem, IntrArgMemOnly]>;
1692 [IntrReadMem]>;
16911693 def int_x86_avx2_gather_q_pd_256 : GCCBuiltin<"__builtin_ia32_gatherq_pd256">,
16921694 Intrinsic<[llvm_v4f64_ty],
16931695 [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty],
1694 [IntrReadMem, IntrArgMemOnly]>;
1696 [IntrReadMem]>;
16951697 def int_x86_avx2_gather_d_ps : GCCBuiltin<"__builtin_ia32_gatherd_ps">,
16961698 Intrinsic<[llvm_v4f32_ty],
16971699 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty],
1698 [IntrReadMem, IntrArgMemOnly]>;
1700 [IntrReadMem]>;
16991701 def int_x86_avx2_gather_d_ps_256 : GCCBuiltin<"__builtin_ia32_gatherd_ps256">,
17001702 Intrinsic<[llvm_v8f32_ty],
17011703 [llvm_v8f32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty],
1702 [IntrReadMem, IntrArgMemOnly]>;
1704 [IntrReadMem]>;
17031705 def int_x86_avx2_gather_q_ps : GCCBuiltin<"__builtin_ia32_gatherq_ps">,
17041706 Intrinsic<[llvm_v4f32_ty],
17051707 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4f32_ty, llvm_i8_ty],
1706 [IntrReadMem, IntrArgMemOnly]>;
1708 [IntrReadMem]>;
17071709 def int_x86_avx2_gather_q_ps_256 : GCCBuiltin<"__builtin_ia32_gatherq_ps256">,
17081710 Intrinsic<[llvm_v4f32_ty],
17091711 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f32_ty, llvm_i8_ty],
1710 [IntrReadMem, IntrArgMemOnly]>;
1712 [IntrReadMem]>;
17111713
17121714 def int_x86_avx2_gather_d_q : GCCBuiltin<"__builtin_ia32_gatherd_q">,
17131715 Intrinsic<[llvm_v2i64_ty],
17141716 [llvm_v2i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2i64_ty, llvm_i8_ty],
1715 [IntrReadMem, IntrArgMemOnly]>;
1717 [IntrReadMem]>;
17161718 def int_x86_avx2_gather_d_q_256 : GCCBuiltin<"__builtin_ia32_gatherd_q256">,
17171719 Intrinsic<[llvm_v4i64_ty],
17181720 [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i64_ty, llvm_i8_ty],
1719 [IntrReadMem, IntrArgMemOnly]>;
1721 [IntrReadMem]>;
17201722 def int_x86_avx2_gather_q_q : GCCBuiltin<"__builtin_ia32_gatherq_q">,
17211723 Intrinsic<[llvm_v2i64_ty],
17221724 [llvm_v2i64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty],
1723 [IntrReadMem, IntrArgMemOnly]>;
1725 [IntrReadMem]>;
17241726 def int_x86_avx2_gather_q_q_256 : GCCBuiltin<"__builtin_ia32_gatherq_q256">,
17251727 Intrinsic<[llvm_v4i64_ty],
17261728 [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty],
1727 [IntrReadMem, IntrArgMemOnly]>;
1729 [IntrReadMem]>;
17281730 def int_x86_avx2_gather_d_d : GCCBuiltin<"__builtin_ia32_gatherd_d">,
17291731 Intrinsic<[llvm_v4i32_ty],
17301732 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty],
1731 [IntrReadMem, IntrArgMemOnly]>;
1733 [IntrReadMem]>;
17321734 def int_x86_avx2_gather_d_d_256 : GCCBuiltin<"__builtin_ia32_gatherd_d256">,
17331735 Intrinsic<[llvm_v8i32_ty],
17341736 [llvm_v8i32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty],
1735 [IntrReadMem, IntrArgMemOnly]>;
1737 [IntrReadMem]>;
17361738 def int_x86_avx2_gather_q_d : GCCBuiltin<"__builtin_ia32_gatherq_d">,
17371739 Intrinsic<[llvm_v4i32_ty],
17381740 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4i32_ty, llvm_i8_ty],
1739 [IntrReadMem, IntrArgMemOnly]>;
1741 [IntrReadMem]>;
17401742 def int_x86_avx2_gather_q_d_256 : GCCBuiltin<"__builtin_ia32_gatherq_d256">,
17411743 Intrinsic<[llvm_v4i32_ty],
17421744 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i32_ty, llvm_i8_ty],
1743 [IntrReadMem, IntrArgMemOnly]>;
1745 [IntrReadMem]>;
17441746 }
17451747
17461748 // Misc.
35633565 // Gather and Scatter ops
35643566 let TargetPrefix = "x86" in {
35653567 // NOTE: These are deprecated in favor of the versions that take a vXi1 mask.
3568 // NOTE: These can't be ArgMemOnly because you can put the address completely
3569 // in the index register.
35663570 def int_x86_avx512_gather_dpd_512 : GCCBuiltin<"__builtin_ia32_gathersiv8df">,
35673571 Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_ptr_ty,
35683572 llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty],
3569 [IntrReadMem, IntrArgMemOnly]>;
3573 [IntrReadMem]>;
35703574 def int_x86_avx512_gather_dps_512 : GCCBuiltin<"__builtin_ia32_gathersiv16sf">,
35713575 Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_ptr_ty,
35723576 llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty],
3573 [IntrReadMem, IntrArgMemOnly]>;
3577 [IntrReadMem]>;
35743578 def int_x86_avx512_gather_qpd_512 : GCCBuiltin<"__builtin_ia32_gatherdiv8df">,
35753579 Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_ptr_ty,
35763580 llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty],
3577 [IntrReadMem, IntrArgMemOnly]>;
3581 [IntrReadMem]>;
35783582 def int_x86_avx512_gather_qps_512 : GCCBuiltin<"__builtin_ia32_gatherdiv16sf">,
35793583 Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_ptr_ty,
35803584 llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty],
3581 [IntrReadMem, IntrArgMemOnly]>;
3585 [IntrReadMem]>;
35823586
35833587
35843588 def int_x86_avx512_gather_dpq_512 : GCCBuiltin<"__builtin_ia32_gathersiv8di">,
35853589 Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_ptr_ty,
35863590 llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty],
3587 [IntrReadMem, IntrArgMemOnly]>;
3591 [IntrReadMem]>;
35883592 def int_x86_avx512_gather_dpi_512 : GCCBuiltin<"__builtin_ia32_gathersiv16si">,
35893593 Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_ptr_ty,
35903594 llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty],
3591 [IntrReadMem, IntrArgMemOnly]>;
3595 [IntrReadMem]>;
35923596 def int_x86_avx512_gather_qpq_512 : GCCBuiltin<"__builtin_ia32_gatherdiv8di">,
35933597 Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_ptr_ty,
35943598 llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty],
3595 [IntrReadMem, IntrArgMemOnly]>;
3599 [IntrReadMem]>;
35963600 def int_x86_avx512_gather_qpi_512 : GCCBuiltin<"__builtin_ia32_gatherdiv16si">,
35973601 Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_ptr_ty,
35983602 llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty],
3599 [IntrReadMem, IntrArgMemOnly]>;
3603 [IntrReadMem]>;
36003604
36013605 def int_x86_avx512_gather3div2_df :
36023606 GCCBuiltin<"__builtin_ia32_gather3div2df">,
36033607 Intrinsic<[llvm_v2f64_ty],
36043608 [llvm_v2f64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty, llvm_i32_ty],
3605 [IntrReadMem, IntrArgMemOnly]>;
3609 [IntrReadMem]>;
36063610
36073611 def int_x86_avx512_gather3div2_di :
36083612 GCCBuiltin<"__builtin_ia32_gather3div2di">,
36093613 Intrinsic<[llvm_v2i64_ty],
36103614 [llvm_v2i64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty, llvm_i32_ty],
3611 [IntrReadMem, IntrArgMemOnly]>;
3615 [IntrReadMem]>;
36123616
36133617 def int_x86_avx512_gather3div4_df :
36143618 GCCBuiltin<"__builtin_ia32_gather3div4df">,
36153619 Intrinsic<[llvm_v4f64_ty],
36163620 [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty, llvm_i32_ty],
3617 [IntrReadMem, IntrArgMemOnly]>;
3621 [IntrReadMem]>;
36183622
36193623 def int_x86_avx512_gather3div4_di :
36203624 GCCBuiltin<"__builtin_ia32_gather3div4di">,
36213625 Intrinsic<[llvm_v4i64_ty],
36223626 [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty, llvm_i32_ty],
3623 [IntrReadMem, IntrArgMemOnly]>;
3627 [IntrReadMem]>;
36243628
36253629 def int_x86_avx512_gather3div4_sf :
36263630 GCCBuiltin<"__builtin_ia32_gather3div4sf">,
36273631 Intrinsic<[llvm_v4f32_ty],
36283632 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty, llvm_i32_ty],
3629 [IntrReadMem, IntrArgMemOnly]>;
3633 [IntrReadMem]>;
36303634
36313635 def int_x86_avx512_gather3div4_si :
36323636 GCCBuiltin<"__builtin_ia32_gather3div4si">,
36333637 Intrinsic<[llvm_v4i32_ty],
36343638 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty, llvm_i32_ty],
3635 [IntrReadMem, IntrArgMemOnly]>;
3639 [IntrReadMem]>;
36363640
36373641 def int_x86_avx512_gather3div8_sf :
36383642 GCCBuiltin<"__builtin_ia32_gather3div8sf">,
36393643 Intrinsic<[llvm_v4f32_ty],
36403644 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty, llvm_i32_ty],
3641 [IntrReadMem, IntrArgMemOnly]>;
3645 [IntrReadMem]>;
36423646
36433647 def int_x86_avx512_gather3div8_si :
36443648 GCCBuiltin<"__builtin_ia32_gather3div8si">,
36453649 Intrinsic<[llvm_v4i32_ty],
36463650 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty, llvm_i32_ty],
3647 [IntrReadMem, IntrArgMemOnly]>;
3651 [IntrReadMem]>;
36483652
36493653 def int_x86_avx512_gather3siv2_df :
36503654 GCCBuiltin<"__builtin_ia32_gather3siv2df">,
36513655 Intrinsic<[llvm_v2f64_ty],
36523656 [llvm_v2f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty],
3653 [IntrReadMem, IntrArgMemOnly]>;
3657 [IntrReadMem]>;
36543658
36553659 def int_x86_avx512_gather3siv2_di :
36563660 GCCBuiltin<"__builtin_ia32_gather3siv2di">,
36573661 Intrinsic<[llvm_v2i64_ty],
36583662 [llvm_v2i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty],
3659 [IntrReadMem, IntrArgMemOnly]>;
3663 [IntrReadMem]>;
36603664
36613665 def int_x86_avx512_gather3siv4_df :
36623666 GCCBuiltin<"__builtin_ia32_gather3siv4df">,
36633667 Intrinsic<[llvm_v4f64_ty],
36643668 [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty],
3665 [IntrReadMem, IntrArgMemOnly]>;
3669 [IntrReadMem]>;
36663670
36673671 def int_x86_avx512_gather3siv4_di :
36683672 GCCBuiltin<"__builtin_ia32_gather3siv4di">,
36693673 Intrinsic<[llvm_v4i64_ty],
36703674 [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty],
3671 [IntrReadMem, IntrArgMemOnly]>;
3675 [IntrReadMem]>;
36723676
36733677 def int_x86_avx512_gather3siv4_sf :
36743678 GCCBuiltin<"__builtin_ia32_gather3siv4sf">,
36753679 Intrinsic<[llvm_v4f32_ty],
36763680 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty],
3677 [IntrReadMem, IntrArgMemOnly]>;
3681 [IntrReadMem]>;
36783682
36793683 def int_x86_avx512_gather3siv4_si :
36803684 GCCBuiltin<"__builtin_ia32_gather3siv4si">,
36813685 Intrinsic<[llvm_v4i32_ty],
36823686 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty],
3683 [IntrReadMem, IntrArgMemOnly]>;
3687 [IntrReadMem]>;
36843688
36853689 def int_x86_avx512_gather3siv8_sf :
36863690 GCCBuiltin<"__builtin_ia32_gather3siv8sf">,
36873691 Intrinsic<[llvm_v8f32_ty],
36883692 [llvm_v8f32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty],
3689 [IntrReadMem, IntrArgMemOnly]>;
3693 [IntrReadMem]>;
36903694
36913695 def int_x86_avx512_gather3siv8_si :
36923696 GCCBuiltin<"__builtin_ia32_gather3siv8si">,
36933697 Intrinsic<[llvm_v8i32_ty],
36943698 [llvm_v8i32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty],
3695 [IntrReadMem, IntrArgMemOnly]>;
3699 [IntrReadMem]>;
36963700
36973701 // scatter
36983702 // NOTE: These are deprecated in favor of the versions that take a vXi1 mask.
3703 // NOTE: These can't be ArgMemOnly because you can put the address completely
3704 // in the index register.
36993705 def int_x86_avx512_scatter_dpd_512 : GCCBuiltin<"__builtin_ia32_scattersiv8df">,
37003706 Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty,
37013707 llvm_v8i32_ty, llvm_v8f64_ty, llvm_i32_ty],
3702 [IntrArgMemOnly]>;
3708 []>;
37033709 def int_x86_avx512_scatter_dps_512 : GCCBuiltin<"__builtin_ia32_scattersiv16sf">,
37043710 Intrinsic<[], [llvm_ptr_ty, llvm_i16_ty,
37053711 llvm_v16i32_ty, llvm_v16f32_ty, llvm_i32_ty],
3706 [IntrArgMemOnly]>;
3712 []>;
37073713 def int_x86_avx512_scatter_qpd_512 : GCCBuiltin<"__builtin_ia32_scatterdiv8df">,
37083714 Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty,
37093715 llvm_v8i64_ty, llvm_v8f64_ty, llvm_i32_ty],
3710 [IntrArgMemOnly]>;
3716 []>;
37113717 def int_x86_avx512_scatter_qps_512 : GCCBuiltin<"__builtin_ia32_scatterdiv16sf">,
37123718 Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty,
37133719 llvm_v8i64_ty, llvm_v8f32_ty, llvm_i32_ty],
3714 [IntrArgMemOnly]>;
3720 []>;
37153721
37163722
37173723 def int_x86_avx512_scatter_dpq_512 : GCCBuiltin<"__builtin_ia32_scattersiv8di">,
37183724 Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty,
37193725 llvm_v8i32_ty, llvm_v8i64_ty, llvm_i32_ty],
3720 [IntrArgMemOnly]>;
3726 []>;
37213727 def int_x86_avx512_scatter_dpi_512 : GCCBuiltin<"__builtin_ia32_scattersiv16si">,
37223728 Intrinsic<[], [llvm_ptr_ty, llvm_i16_ty,
37233729 llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty],
3724 [IntrArgMemOnly]>;
3730 []>;
37253731 def int_x86_avx512_scatter_qpq_512 : GCCBuiltin<"__builtin_ia32_scatterdiv8di">,
37263732 Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty,llvm_v8i64_ty, llvm_v8i64_ty,
37273733 llvm_i32_ty],
3728 [IntrArgMemOnly]>;
3734 []>;
37293735 def int_x86_avx512_scatter_qpi_512 : GCCBuiltin<"__builtin_ia32_scatterdiv16si">,
37303736 Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty, llvm_v8i64_ty, llvm_v8i32_ty,
37313737 llvm_i32_ty],
3732 [IntrArgMemOnly]>;
3738 []>;
37333739
37343740 def int_x86_avx512_scatterdiv2_df :
37353741 GCCBuiltin<"__builtin_ia32_scatterdiv2df">,
37363742 Intrinsic<[],
37373743 [llvm_ptr_ty, llvm_i8_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i32_ty],
3738 [IntrArgMemOnly]>;
3744 []>;
37393745
37403746 def int_x86_avx512_scatterdiv2_di :
37413747 GCCBuiltin<"__builtin_ia32_scatterdiv2di">,
37423748 Intrinsic<[],
37433749 [llvm_ptr_ty, llvm_i8_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty],
3744 [IntrArgMemOnly]>;
3750 []>;
37453751
37463752 def int_x86_avx512_scatterdiv4_df :
37473753 GCCBuiltin<"__builtin_ia32_scatterdiv4df">,
37483754 Intrinsic<[],
37493755 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i32_ty],
3750 [IntrArgMemOnly]>;
3756 []>;
37513757
37523758 def int_x86_avx512_scatterdiv4_di :
37533759 GCCBuiltin<"__builtin_ia32_scatterdiv4di">,
37543760 Intrinsic<[],
37553761 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty],
3756 [IntrArgMemOnly]>;
3762 []>;
37573763
37583764 def int_x86_avx512_scatterdiv4_sf :
37593765 GCCBuiltin<"__builtin_ia32_scatterdiv4sf">,
37603766 Intrinsic<[],
37613767 [llvm_ptr_ty, llvm_i8_ty, llvm_v2i64_ty, llvm_v4f32_ty, llvm_i32_ty],
3762 [IntrArgMemOnly]>;
3768 []>;
37633769
37643770 def int_x86_avx512_scatterdiv4_si :
37653771 GCCBuiltin<"__builtin_ia32_scatterdiv4si">,
37663772 Intrinsic<[],
37673773 [llvm_ptr_ty, llvm_i8_ty, llvm_v2i64_ty, llvm_v4i32_ty, llvm_i32_ty],
3768 [IntrArgMemOnly]>;
3774 []>;
37693775
37703776 def int_x86_avx512_scatterdiv8_sf :
37713777 GCCBuiltin<"__builtin_ia32_scatterdiv8sf">,
37723778 Intrinsic<[],
37733779 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i64_ty, llvm_v4f32_ty, llvm_i32_ty],
3774 [IntrArgMemOnly]>;
3780 []>;
37753781
37763782 def int_x86_avx512_scatterdiv8_si :
37773783 GCCBuiltin<"__builtin_ia32_scatterdiv8si">,
37783784 Intrinsic<[],
37793785 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i64_ty, llvm_v4i32_ty, llvm_i32_ty],
3780 [IntrArgMemOnly]>;
3786 []>;
37813787
37823788 def int_x86_avx512_scattersiv2_df :
37833789 GCCBuiltin<"__builtin_ia32_scattersiv2df">,
37843790 Intrinsic<[],
37853791 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v2f64_ty, llvm_i32_ty],
3786 [IntrArgMemOnly]>;
3792 []>;
37873793
37883794 def int_x86_avx512_scattersiv2_di :
37893795 GCCBuiltin<"__builtin_ia32_scattersiv2di">,
37903796 Intrinsic<[],
37913797 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v2i64_ty, llvm_i32_ty],
3792 [IntrArgMemOnly]>;
3798 []>;
37933799
37943800 def int_x86_avx512_scattersiv4_df :
37953801 GCCBuiltin<"__builtin_ia32_scattersiv4df">,
37963802 Intrinsic<[],
37973803 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v4f64_ty, llvm_i32_ty],
3798 [IntrArgMemOnly]>;
3804 []>;
37993805
38003806 def int_x86_avx512_scattersiv4_di :
38013807 GCCBuiltin<"__builtin_ia32_scattersiv4di">,
38023808 Intrinsic<[],
38033809 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v4i64_ty, llvm_i32_ty],
3804 [IntrArgMemOnly]>;
3810 []>;
38053811
38063812 def int_x86_avx512_scattersiv4_sf :
38073813 GCCBuiltin<"__builtin_ia32_scattersiv4sf">,
38083814 Intrinsic<[],
38093815 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i32_ty],
3810 [IntrArgMemOnly]>;
3816 []>;
38113817
38123818 def int_x86_avx512_scattersiv4_si :
38133819 GCCBuiltin<"__builtin_ia32_scattersiv4si">,
38143820 Intrinsic<[],
38153821 [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty],
3816 [IntrArgMemOnly]>;
3822 []>;
38173823
38183824 def int_x86_avx512_scattersiv8_sf :
38193825 GCCBuiltin<"__builtin_ia32_scattersiv8sf">,
38203826 Intrinsic<[],
38213827 [llvm_ptr_ty, llvm_i8_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i32_ty],
3822 [IntrArgMemOnly]>;
3828 []>;
38233829
38243830 def int_x86_avx512_scattersiv8_si :
38253831 GCCBuiltin<"__builtin_ia32_scattersiv8si">,
38263832 Intrinsic<[],
38273833 [llvm_ptr_ty, llvm_i8_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty],
3828 [IntrArgMemOnly]>;
3834 []>;
38293835
38303836 // gather prefetch
3837 // NOTE: These can't be ArgMemOnly because you can put the address completely
3838 // in the index register.
38313839 def int_x86_avx512_gatherpf_dpd_512 : GCCBuiltin<"__builtin_ia32_gatherpfdpd">,
38323840 Intrinsic<[], [llvm_i8_ty, llvm_v8i32_ty, llvm_ptr_ty,
3833 llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>;
3841 llvm_i32_ty, llvm_i32_ty], []>;
38343842 def int_x86_avx512_gatherpf_dps_512 : GCCBuiltin<"__builtin_ia32_gatherpfdps">,
38353843 Intrinsic<[], [llvm_i16_ty, llvm_v16i32_ty, llvm_ptr_ty,
3836 llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>;
3844 llvm_i32_ty, llvm_i32_ty], []>;
38373845 def int_x86_avx512_gatherpf_qpd_512 : GCCBuiltin<"__builtin_ia32_gatherpfqpd">,
38383846 Intrinsic<[], [llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty,
3839 llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>;
3847 llvm_i32_ty, llvm_i32_ty], []>;
38403848 def int_x86_avx512_gatherpf_qps_512 : GCCBuiltin<"__builtin_ia32_gatherpfqps">,
38413849 Intrinsic<[], [llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty,
3842 llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>;
3850 llvm_i32_ty, llvm_i32_ty], []>;
38433851
38443852 // scatter prefetch
3853 // NOTE: These can't be ArgMemOnly because you can put the address completely
3854 // in the index register.
38453855 def int_x86_avx512_scatterpf_dpd_512 : GCCBuiltin<"__builtin_ia32_scatterpfdpd">,
38463856 Intrinsic<[], [llvm_i8_ty, llvm_v8i32_ty, llvm_ptr_ty,
3847 llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>;
3857 llvm_i32_ty, llvm_i32_ty], []>;
38483858 def int_x86_avx512_scatterpf_dps_512 : GCCBuiltin<"__builtin_ia32_scatterpfdps">,
38493859 Intrinsic<[], [llvm_i16_ty, llvm_v16i32_ty, llvm_ptr_ty,
3850 llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>;
3860 llvm_i32_ty, llvm_i32_ty], []>;
38513861 def int_x86_avx512_scatterpf_qpd_512 : GCCBuiltin<"__builtin_ia32_scatterpfqpd">,
38523862 Intrinsic<[], [llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty,
3853 llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>;
3863 llvm_i32_ty, llvm_i32_ty], []>;
38543864 def int_x86_avx512_scatterpf_qps_512 : GCCBuiltin<"__builtin_ia32_scatterpfqps">,
38553865 Intrinsic<[], [llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty,
3856 llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>;
3866 llvm_i32_ty, llvm_i32_ty], []>;
38573867 }
38583868
38593869 // AVX512 gather/scatter intrinsics that use vXi1 masks.
38603870 let TargetPrefix = "x86" in {
3871 // NOTE: These can't be ArgMemOnly because you can put the address completely
3872 // in the index register.
38613873 def int_x86_avx512_mask_gather_dpd_512 :
38623874 Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_ptr_ty,
38633875 llvm_v8i32_ty, llvm_v8i1_ty, llvm_i32_ty],
3864 [IntrReadMem, IntrArgMemOnly]>;
3876 [IntrReadMem]>;
38653877 def int_x86_avx512_mask_gather_dps_512 :
38663878 Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_ptr_ty,
38673879 llvm_v16i32_ty, llvm_v16i1_ty, llvm_i32_ty],
3868 [IntrReadMem, IntrArgMemOnly]>;
3880 [IntrReadMem]>;
38693881 def int_x86_avx512_mask_gather_qpd_512 :
38703882 Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_ptr_ty,
38713883 llvm_v8i64_ty, llvm_v8i1_ty, llvm_i32_ty],
3872 [IntrReadMem, IntrArgMemOnly]>;
3884 [IntrReadMem]>;
38733885 def int_x86_avx512_mask_gather_qps_512 :
38743886 Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_ptr_ty,
38753887 llvm_v8i64_ty, llvm_v8i1_ty, llvm_i32_ty],
3876 [IntrReadMem, IntrArgMemOnly]>;
3888 [IntrReadMem]>;
38773889
38783890
38793891 def int_x86_avx512_mask_gather_dpq_512 :
38803892 Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_ptr_ty,
38813893 llvm_v8i32_ty, llvm_v8i1_ty, llvm_i32_ty],
3882 [IntrReadMem, IntrArgMemOnly]>;
3894 [IntrReadMem]>;
38833895 def int_x86_avx512_mask_gather_dpi_512 :
38843896 Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_ptr_ty,
38853897 llvm_v16i32_ty, llvm_v16i1_ty, llvm_i32_ty],
3886 [IntrReadMem, IntrArgMemOnly]>;
3898 [IntrReadMem]>;
38873899 def int_x86_avx512_mask_gather_qpq_512 :
38883900 Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_ptr_ty,
38893901 llvm_v8i64_ty, llvm_v8i1_ty, llvm_i32_ty],
3890 [IntrReadMem, IntrArgMemOnly]>;
3902 [IntrReadMem]>;
38913903 def int_x86_avx512_mask_gather_qpi_512 :
38923904 Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_ptr_ty,
38933905 llvm_v8i64_ty, llvm_v8i1_ty, llvm_i32_ty],
3894 [IntrReadMem, IntrArgMemOnly]>;
3906 [IntrReadMem]>;
38953907
38963908 def int_x86_avx512_mask_gather3div2_df :
38973909 Intrinsic<[llvm_v2f64_ty],
38983910 [llvm_v2f64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i1_ty, llvm_i32_ty],
3899 [IntrReadMem, IntrArgMemOnly]>;
3911 [IntrReadMem]>;
39003912
39013913 def int_x86_avx512_mask_gather3div2_di :
39023914 Intrinsic<[llvm_v2i64_ty],
39033915 [llvm_v2i64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i1_ty, llvm_i32_ty],
3904 [IntrReadMem, IntrArgMemOnly]>;
3916 [IntrReadMem]>;
39053917
39063918 def int_x86_avx512_mask_gather3div4_df :
39073919 Intrinsic<[llvm_v4f64_ty],
39083920 [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i1_ty, llvm_i32_ty],
3909 [IntrReadMem, IntrArgMemOnly]>;
3921 [IntrReadMem]>;
39103922
39113923 def int_x86_avx512_mask_gather3div4_di :
39123924 Intrinsic<[llvm_v4i64_ty],
39133925 [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i1_ty, llvm_i32_ty],
3914 [IntrReadMem, IntrArgMemOnly]>;
3926 [IntrReadMem]>;
39153927
39163928 def int_x86_avx512_mask_gather3div4_sf :
39173929 Intrinsic<[llvm_v4f32_ty],
39183930 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i1_ty, llvm_i32_ty],
3919 [IntrReadMem, IntrArgMemOnly]>;
3931 [IntrReadMem]>;
39203932
39213933 def int_x86_avx512_mask_gather3div4_si :
39223934 Intrinsic<[llvm_v4i32_ty],
39233935 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i1_ty, llvm_i32_ty],
3924 [IntrReadMem, IntrArgMemOnly]>;
3936 [IntrReadMem]>;
39253937
39263938 def int_x86_avx512_mask_gather3div8_sf :
39273939 Intrinsic<[llvm_v4f32_ty],
39283940 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i1_ty, llvm_i32_ty],
3929 [IntrReadMem, IntrArgMemOnly]>;
3941 [IntrReadMem]>;
39303942
39313943 def int_x86_avx512_mask_gather3div8_si :
39323944 Intrinsic<[llvm_v4i32_ty],
39333945 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i1_ty, llvm_i32_ty],
3934 [IntrReadMem, IntrArgMemOnly]>;
3946 [IntrReadMem]>;
39353947
39363948 def int_x86_avx512_mask_gather3siv2_df :
39373949 Intrinsic<[llvm_v2f64_ty],
39383950 [llvm_v2f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2i1_ty, llvm_i32_ty],
3939 [IntrReadMem, IntrArgMemOnly]>;
3951 [IntrReadMem]>;
39403952
39413953 def int_x86_avx512_mask_gather3siv2_di :
39423954 Intrinsic<[llvm_v2i64_ty],
39433955 [llvm_v2i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2i1_ty, llvm_i32_ty],
3944 [IntrReadMem, IntrArgMemOnly]>;
3956 [IntrReadMem]>;
39453957
39463958 def int_x86_avx512_mask_gather3siv4_df :
39473959 Intrinsic<[llvm_v4f64_ty],
39483960 [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i1_ty, llvm_i32_ty],
3949 [IntrReadMem, IntrArgMemOnly]>;
3961 [IntrReadMem]>;
39503962
39513963 def int_x86_avx512_mask_gather3siv4_di :
39523964 Intrinsic<[llvm_v4i64_ty],
39533965 [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i1_ty, llvm_i32_ty],
3954 [IntrReadMem, IntrArgMemOnly]>;
3966 [IntrReadMem]>;
39553967
39563968 def int_x86_avx512_mask_gather3siv4_sf :
39573969 Intrinsic<[llvm_v4f32_ty],
39583970 [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i1_ty, llvm_i32_ty],
3959 [IntrReadMem, IntrArgMemOnly]>;
3971 [IntrReadMem]>;
39603972
39613973 def int_x86_avx512_mask_gather3siv4_si :
39623974 Intrinsic<[llvm_v4i32_ty],
39633975 [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i1_ty, llvm_i32_ty],
3964 [IntrReadMem, IntrArgMemOnly]>;
3976 [IntrReadMem]>;
39653977
39663978 def int_x86_avx512_mask_gather3siv8_sf :
39673979 Intrinsic<[llvm_v8f32_ty],
39683980 [llvm_v8f32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8i1_ty, llvm_i32_ty],
3969 [IntrReadMem, IntrArgMemOnly]>;
3981 [IntrReadMem]>;
39703982
39713983 def int_x86_avx512_mask_gather3siv8_si :
39723984 Intrinsic<[llvm_v8i32_ty],
39733985 [llvm_v8i32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8i1_ty, llvm_i32_ty],
3974 [IntrReadMem, IntrArgMemOnly]>;
3986 [IntrReadMem]>;
39753987
39763988 def int_x86_avx512_mask_scatter_dpd_512 :
39773989 Intrinsic<[], [llvm_ptr_ty, llvm_v8i1_ty,
39783990 llvm_v8i32_ty, llvm_v8f64_ty, llvm_i32_ty],
3979 [IntrArgMemOnly]>;
3991 []>;
39803992 def int_x86_avx512_mask_scatter_dps_512 :
39813993 Intrinsic<[], [llvm_ptr_ty, llvm_v16i1_ty,
39823994 llvm_v16i32_ty, llvm_v16f32_ty, llvm_i32_ty],
3983 [IntrArgMemOnly]>;
3995 []>;
39843996 def int_x86_avx512_mask_scatter_qpd_512 :
39853997 Intrinsic<[], [llvm_ptr_ty, llvm_v8i1_ty,
39863998 llvm_v8i64_ty, llvm_v8f64_ty, llvm_i32_ty],
3987 [IntrArgMemOnly]>;
3999 []>;
39884000 def int_x86_avx512_mask_scatter_qps_512 :
39894001 Intrinsic<[], [llvm_ptr_ty, llvm_v8i1_ty,
39904002 llvm_v8i64_ty, llvm_v8f32_ty, llvm_i32_ty],
3991 [IntrArgMemOnly]>;
3992
3993
4003 []>;
4004
4005
4006 // NOTE: These can't be ArgMemOnly because you can put the address completely
4007 // in the index register.
39944008 def int_x86_avx512_mask_scatter_dpq_512 :
39954009 Intrinsic<[], [llvm_ptr_ty, llvm_v8i1_ty,
39964010 llvm_v8i32_ty, llvm_v8i64_ty, llvm_i32_ty],
3997 [IntrArgMemOnly]>;
4011 []>;
39984012 def int_x86_avx512_mask_scatter_dpi_512 :
39994013 Intrinsic<[], [llvm_ptr_ty, llvm_v16i1_ty,
40004014 llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty],
4001 [IntrArgMemOnly]>;
4015 []>;
40024016 def int_x86_avx512_mask_scatter_qpq_512 :
40034017 Intrinsic<[], [llvm_ptr_ty, llvm_v8i1_ty,llvm_v8i64_ty, llvm_v8i64_ty,
40044018 llvm_i32_ty],
4005 [IntrArgMemOnly]>;
4019 []>;
40064020 def int_x86_avx512_mask_scatter_qpi_512 :
40074021 Intrinsic<[], [llvm_ptr_ty, llvm_v8i1_ty, llvm_v8i64_ty, llvm_v8i32_ty,
40084022 llvm_i32_ty],
4009 [IntrArgMemOnly]>;
4023 []>;
40104024
40114025 def int_x86_avx512_mask_scatterdiv2_df :
40124026 Intrinsic<[],
40134027 [llvm_ptr_ty, llvm_v2i1_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i32_ty],
4014 [IntrArgMemOnly]>;
4028 []>;
40154029
40164030 def int_x86_avx512_mask_scatterdiv2_di :
40174031 Intrinsic<[],
40184032 [llvm_ptr_ty, llvm_v2i1_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty],
4019 [IntrArgMemOnly]>;
4033 []>;
40204034
40214035 def int_x86_avx512_mask_scatterdiv4_df :
40224036 Intrinsic<[],
40234037 [llvm_ptr_ty, llvm_v4i1_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i32_ty],
4024 [IntrArgMemOnly]>;
4038 []>;
40254039
40264040 def int_x86_avx512_mask_scatterdiv4_di :
40274041 Intrinsic<[],
40284042 [llvm_ptr_ty, llvm_v4i1_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty],
4029 [IntrArgMemOnly]>;
4043 []>;
40304044
40314045 def int_x86_avx512_mask_scatterdiv4_sf :
40324046 Intrinsic<[],
40334047 [llvm_ptr_ty, llvm_v2i1_ty, llvm_v2i64_ty, llvm_v4f32_ty, llvm_i32_ty],
4034 [IntrArgMemOnly]>;
4048 []>;
40354049
40364050 def int_x86_avx512_mask_scatterdiv4_si :
40374051 Intrinsic<[],
40384052 [llvm_ptr_ty, llvm_v2i1_ty, llvm_v2i64_ty, llvm_v4i32_ty, llvm_i32_ty],
4039 [IntrArgMemOnly]>;
4053 []>;
40404054
40414055 def int_x86_avx512_mask_scatterdiv8_sf :
40424056 Intrinsic<[],
40434057 [llvm_ptr_ty, llvm_v4i1_ty, llvm_v4i64_ty, llvm_v4f32_ty, llvm_i32_ty],
4044 [IntrArgMemOnly]>;
4058 []>;
40454059
40464060 def int_x86_avx512_mask_scatterdiv8_si :
40474061 Intrinsic<[],
40484062 [llvm_ptr_ty, llvm_v4i1_ty, llvm_v4i64_ty, llvm_v4i32_ty, llvm_i32_ty],
4049 [IntrArgMemOnly]>;
4063 []>;
40504064
40514065 def int_x86_avx512_mask_scattersiv2_df :
40524066 Intrinsic<[],
40534067 [llvm_ptr_ty, llvm_v2i1_ty, llvm_v4i32_ty, llvm_v2f64_ty, llvm_i32_ty],
4054 [IntrArgMemOnly]>;
4068 []>;
40554069
40564070 def int_x86_avx512_mask_scattersiv2_di :
40574071 Intrinsic<[],
40584072 [llvm_ptr_ty, llvm_v2i1_ty, llvm_v4i32_ty, llvm_v2i64_ty, llvm_i32_ty],
4059 [IntrArgMemOnly]>;
4073 []>;
40604074
40614075 def int_x86_avx512_mask_scattersiv4_df :
40624076 Intrinsic<[],
40634077 [llvm_ptr_ty, llvm_v4i1_ty, llvm_v4i32_ty, llvm_v4f64_ty, llvm_i32_ty],
4064 [IntrArgMemOnly]>;
4078 []>;
40654079
40664080 def int_x86_avx512_mask_scattersiv4_di :
40674081 Intrinsic<[],
40684082 [llvm_ptr_ty, llvm_v4i1_ty, llvm_v4i32_ty, llvm_v4i64_ty, llvm_i32_ty],
4069 [IntrArgMemOnly]>;
4083 []>;
40704084
40714085 def int_x86_avx512_mask_scattersiv4_sf :
40724086 Intrinsic<[],
40734087 [llvm_ptr_ty, llvm_v4i1_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i32_ty],
4074 [IntrArgMemOnly]>;
4088 []>;
40754089
40764090 def int_x86_avx512_mask_scattersiv4_si :
40774091 Intrinsic<[],
40784092 [llvm_ptr_ty, llvm_v4i1_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty],
4079 [IntrArgMemOnly]>;
4093 []>;
40804094
40814095 def int_x86_avx512_mask_scattersiv8_sf :
40824096 Intrinsic<[],
40834097 [llvm_ptr_ty, llvm_v8i1_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i32_ty],
4084 [IntrArgMemOnly]>;
4098 []>;
40854099
40864100 def int_x86_avx512_mask_scattersiv8_si :
40874101 Intrinsic<[],
40884102 [llvm_ptr_ty, llvm_v8i1_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty],
4089 [IntrArgMemOnly]>;
4103 []>;
40904104 }
40914105
40924106 // AVX-512 conflict detection instruction
0 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1 ; RUN: opt < %s -dse -S | FileCheck %s
2
3 ; Both stores should be emitted because we can't tell if the gather aliases.
4
5 define <4 x i32> @bar(<4 x i32> %arg, i32* %arg1) {
6 ; CHECK-LABEL: @bar(
7 ; CHECK-NEXT: bb:
8 ; CHECK-NEXT: store i32 5, i32* [[ARG1:%.*]]
9 ; CHECK-NEXT: [[TMP:%.*]] = tail call <4 x i32> @llvm.x86.avx2.gather.d.d(<4 x i32> zeroinitializer, i8* null, <4 x i32> [[ARG:%.*]], <4 x i32> , i8 1)
10 ; CHECK-NEXT: store i32 10, i32* [[ARG1]]
11 ; CHECK-NEXT: ret <4 x i32> [[TMP]]
12 ;
13 bb:
14 store i32 5, i32* %arg1
15 %tmp = tail call <4 x i32> @llvm.x86.avx2.gather.d.d(<4 x i32> zeroinitializer, i8* null, <4 x i32> %arg, <4 x i32> , i8 1)
16 store i32 10, i32* %arg1
17 ret <4 x i32> %tmp
18 }
19
20 declare <4 x i32> @llvm.x86.avx2.gather.d.d(<4 x i32>, i8*, <4 x i32>, <4 x i32>, i8)