Skip to content

Commit a0fd716

Browse files
authored
[X86] Merge matching AVX/AVX2 memory Features/Attributes blocks. NFC. (#156065)
1 parent b1c8228 commit a0fd716

File tree

1 file changed

+21
-77
lines changed

1 file changed

+21
-77
lines changed

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 21 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -539,28 +539,22 @@ let Features = "avx", Attributes = [NoThrow] in {
539539

540540
let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
541541
def lddqu256 : X86Builtin<"_Vector<32, char>(char const *)">;
542-
}
543-
544-
let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
545-
def maskloadpd : X86Builtin<"_Vector<2, double>(_Vector<2, double const *>, _Vector<2, long long int>)">;
546-
def maskloadps : X86Builtin<"_Vector<4, float>(_Vector<4, float const *>, _Vector<4, int>)">;
547-
}
548542

549-
let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
550543
def maskloadpd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double const *>, _Vector<4, long long int>)">;
551544
def maskloadps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float const *>, _Vector<8, int>)">;
545+
546+
def maskstorepd256 : X86Builtin<"void(_Vector<4, double *>, _Vector<4, long long int>, _Vector<4, double>)">;
547+
def maskstoreps256 : X86Builtin<"void(_Vector<8, float *>, _Vector<8, int>, _Vector<8, float>)">;
552548
}
553549

554550
let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
551+
def maskloadpd : X86Builtin<"_Vector<2, double>(_Vector<2, double const *>, _Vector<2, long long int>)">;
552+
def maskloadps : X86Builtin<"_Vector<4, float>(_Vector<4, float const *>, _Vector<4, int>)">;
553+
555554
def maskstorepd : X86Builtin<"void(_Vector<2, double *>, _Vector<2, long long int>, _Vector<2, double>)">;
556555
def maskstoreps : X86Builtin<"void(_Vector<4, float *>, _Vector<4, int>, _Vector<4, float>)">;
557556
}
558557

559-
let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
560-
def maskstorepd256 : X86Builtin<"void(_Vector<4, double *>, _Vector<4, long long int>, _Vector<4, double>)">;
561-
def maskstoreps256 : X86Builtin<"void(_Vector<8, float *>, _Vector<8, int>, _Vector<8, float>)">;
562-
}
563-
564558
let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
565559
def vec_ext_v32qi : X86Builtin<"char(_Vector<32, char>, _Constant int)">;
566560
def vec_ext_v16hi : X86Builtin<"short(_Vector<16, short>, _Constant int)">;
@@ -626,13 +620,11 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
626620

627621
def psllwi256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, int)">;
628622
def pslldi256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int)">;
629-
def psllqi256
630-
: X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, int)">;
623+
def psllqi256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, int)">;
631624

632625
def psrlwi256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, int)">;
633626
def psrldi256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int)">;
634-
def psrlqi256
635-
: X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, int)">;
627+
def psrlqi256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, int)">;
636628

637629
def psrawi256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, int)">;
638630
def psradi256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int)">;
@@ -658,87 +650,39 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
658650
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
659651
def maskloadd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int const *>, _Vector<8, int>)">;
660652
def maskloadq256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int const *>, _Vector<4, long long int>)">;
661-
}
662-
663-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
664-
def maskloadd : X86Builtin<"_Vector<4, int>(_Vector<4, int const *>, _Vector<4, int>)">;
665-
def maskloadq : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int const *>, _Vector<2, long long int>)">;
666-
}
667653

668-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
669654
def maskstored256 : X86Builtin<"void(_Vector<8, int *>, _Vector<8, int>, _Vector<8, int>)">;
670655
def maskstoreq256 : X86Builtin<"void(_Vector<4, long long int *>, _Vector<4, long long int>, _Vector<4, long long int>)">;
656+
657+
def gatherd_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, double const *, _Vector<4, int>, _Vector<4, double>, _Constant char)">;
658+
def gatherq_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, double const *, _Vector<4, long long int>, _Vector<4, double>, _Constant char)">;
659+
def gatherd_ps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, float const *, _Vector<8, int>, _Vector<8, float>, _Constant char)">;
660+
def gatherq_ps256 : X86Builtin<"_Vector<4, float>(_Vector<4, float>, float const *, _Vector<4, long long int>, _Vector<4, float>, _Constant char)">;
661+
662+
def gatherd_q256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, long long int const *, _Vector<4, int>, _Vector<4, long long int>, _Constant char)">;
663+
def gatherq_q256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, long long int const *, _Vector<4, long long int>, _Vector<4, long long int>, _Constant char)">;
664+
def gatherd_d256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int const *, _Vector<8, int>, _Vector<8, int>, _Constant char)">;
665+
def gatherq_d256 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int const *, _Vector<4, long long int>, _Vector<4, int>, _Constant char)">;
671666
}
672667

673668
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
669+
def maskloadd : X86Builtin<"_Vector<4, int>(_Vector<4, int const *>, _Vector<4, int>)">;
670+
def maskloadq : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int const *>, _Vector<2, long long int>)">;
671+
674672
def maskstored : X86Builtin<"void(_Vector<4, int *>, _Vector<4, int>, _Vector<4, int>)">;
675673
def maskstoreq : X86Builtin<"void(_Vector<2, long long int *>, _Vector<2, long long int>, _Vector<2, long long int>)">;
676-
}
677674

678-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
679675
def gatherd_pd : X86Builtin<"_Vector<2, double>(_Vector<2, double>, double const *, _Vector<4, int>, _Vector<2, double>, _Constant char)">;
680-
}
681-
682-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
683-
def gatherd_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, double const *, _Vector<4, int>, _Vector<4, double>, _Constant char)">;
684-
}
685-
686-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
687676
def gatherq_pd : X86Builtin<"_Vector<2, double>(_Vector<2, double>, double const *, _Vector<2, long long int>, _Vector<2, double>, _Constant char)">;
688-
}
689-
690-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
691-
def gatherq_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, double const *, _Vector<4, long long int>, _Vector<4, double>, _Constant char)">;
692-
}
693-
694-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
695677
def gatherd_ps : X86Builtin<"_Vector<4, float>(_Vector<4, float>, float const *, _Vector<4, int>, _Vector<4, float>, _Constant char)">;
696-
}
697-
698-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
699-
def gatherd_ps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, float const *, _Vector<8, int>, _Vector<8, float>, _Constant char)">;
700-
}
701-
702-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
703678
def gatherq_ps : X86Builtin<"_Vector<4, float>(_Vector<4, float>, float const *, _Vector<2, long long int>, _Vector<4, float>, _Constant char)">;
704-
}
705679

706-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
707-
def gatherq_ps256 : X86Builtin<"_Vector<4, float>(_Vector<4, float>, float const *, _Vector<4, long long int>, _Vector<4, float>, _Constant char)">;
708-
}
709-
710-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
711680
def gatherd_q : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, long long int const *, _Vector<4, int>, _Vector<2, long long int>, _Constant char)">;
712-
}
713-
714-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
715-
def gatherd_q256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, long long int const *, _Vector<4, int>, _Vector<4, long long int>, _Constant char)">;
716-
}
717-
718-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
719681
def gatherq_q : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, long long int const *, _Vector<2, long long int>, _Vector<2, long long int>, _Constant char)">;
720-
}
721-
722-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
723-
def gatherq_q256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, long long int const *, _Vector<4, long long int>, _Vector<4, long long int>, _Constant char)">;
724-
}
725-
726-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
727682
def gatherd_d : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int const *, _Vector<4, int>, _Vector<4, int>, _Constant char)">;
728-
}
729-
730-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
731-
def gatherd_d256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int const *, _Vector<8, int>, _Vector<8, int>, _Constant char)">;
732-
}
733-
734-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
735683
def gatherq_d : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int const *, _Vector<2, long long int>, _Vector<4, int>, _Constant char)">;
736684
}
737685

738-
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
739-
def gatherq_d256 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int const *, _Vector<4, long long int>, _Vector<4, int>, _Constant char)">;
740-
}
741-
742686
let Features = "f16c", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
743687
def vcvtps2ph : X86Builtin<"_Vector<8, short>(_Vector<4, float>, _Constant int)">;
744688
}

0 commit comments

Comments
 (0)