Author: Simon Pilgrim
Date: 2025-08-29T17:44:58Z
New Revision: a0fd7163b6d9d4b80817ec2ef8da5efa99bd90c9

URL: 
https://github.com/llvm/llvm-project/commit/a0fd7163b6d9d4b80817ec2ef8da5efa99bd90c9
DIFF: 
https://github.com/llvm/llvm-project/commit/a0fd7163b6d9d4b80817ec2ef8da5efa99bd90c9.diff

LOG: [X86] Merge matching AVX/AVX2 memory Features/Attributes blocks. NFC. 
(#156065)

Added: 
    

Modified: 
    clang/include/clang/Basic/BuiltinsX86.td

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/BuiltinsX86.td 
b/clang/include/clang/Basic/BuiltinsX86.td
index dfff92839da4e..4ddad63db283b 100644
--- a/clang/include/clang/Basic/BuiltinsX86.td
+++ b/clang/include/clang/Basic/BuiltinsX86.td
@@ -539,28 +539,22 @@ let Features = "avx", Attributes = [NoThrow] in {
 
 let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
   def lddqu256 : X86Builtin<"_Vector<32, char>(char const *)">;
-}
-
-let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
-  def maskloadpd : X86Builtin<"_Vector<2, double>(_Vector<2, double const *>, 
_Vector<2, long long int>)">;
-  def maskloadps : X86Builtin<"_Vector<4, float>(_Vector<4, float const *>, 
_Vector<4, int>)">;
-}
 
-let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
   def maskloadpd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double const 
*>, _Vector<4, long long int>)">;
   def maskloadps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float const *>, 
_Vector<8, int>)">;
+
+  def maskstorepd256 : X86Builtin<"void(_Vector<4, double *>, _Vector<4, long 
long int>, _Vector<4, double>)">;
+  def maskstoreps256 : X86Builtin<"void(_Vector<8, float *>, _Vector<8, int>, 
_Vector<8, float>)">;
 }
 
 let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
+  def maskloadpd : X86Builtin<"_Vector<2, double>(_Vector<2, double const *>, 
_Vector<2, long long int>)">;
+  def maskloadps : X86Builtin<"_Vector<4, float>(_Vector<4, float const *>, 
_Vector<4, int>)">;
+
   def maskstorepd : X86Builtin<"void(_Vector<2, double *>, _Vector<2, long 
long int>, _Vector<2, double>)">;
   def maskstoreps : X86Builtin<"void(_Vector<4, float *>, _Vector<4, int>, 
_Vector<4, float>)">;
 }
 
-let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  def maskstorepd256 : X86Builtin<"void(_Vector<4, double *>, _Vector<4, long 
long int>, _Vector<4, double>)">;
-  def maskstoreps256 : X86Builtin<"void(_Vector<8, float *>, _Vector<8, int>, 
_Vector<8, float>)">;
-}
-
 let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] 
in {
   def vec_ext_v32qi : X86Builtin<"char(_Vector<32, char>, _Constant int)">;
   def vec_ext_v16hi : X86Builtin<"short(_Vector<16, short>, _Constant int)">;
@@ -626,13 +620,11 @@ let Features = "avx2", Attributes = [NoThrow, Const, 
Constexpr, RequiredVectorWi
 
   def psllwi256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, int)">;
   def pslldi256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int)">;
-  def psllqi256
-      : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, 
int)">;
+  def psllqi256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long 
int>, int)">;
 
   def psrlwi256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, int)">;
   def psrldi256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int)">;
-  def psrlqi256
-      : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, 
int)">;
+  def psrlqi256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long 
int>, int)">;
 
   def psrawi256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, int)">;
   def psradi256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int)">;
@@ -658,87 +650,39 @@ let Features = "avx2", Attributes = [NoThrow, Const, 
Constexpr, RequiredVectorWi
 let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
   def maskloadd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int const *>, 
_Vector<8, int>)">;
   def maskloadq256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long 
long int const *>, _Vector<4, long long int>)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
-  def maskloadd : X86Builtin<"_Vector<4, int>(_Vector<4, int const *>, 
_Vector<4, int>)">;
-  def maskloadq : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long 
int const *>, _Vector<2, long long int>)">;
-}
 
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
   def maskstored256 : X86Builtin<"void(_Vector<8, int *>, _Vector<8, int>, 
_Vector<8, int>)">;
   def maskstoreq256 : X86Builtin<"void(_Vector<4, long long int *>, _Vector<4, 
long long int>, _Vector<4, long long int>)">;
+
+  def gatherd_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, 
double const *, _Vector<4, int>, _Vector<4, double>, _Constant char)">;
+  def gatherq_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, 
double const *, _Vector<4, long long int>, _Vector<4, double>, _Constant 
char)">;
+  def gatherd_ps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, float 
const *, _Vector<8, int>, _Vector<8, float>, _Constant char)">;
+  def gatherq_ps256 : X86Builtin<"_Vector<4, float>(_Vector<4, float>, float 
const *, _Vector<4, long long int>, _Vector<4, float>, _Constant char)">;
+
+  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)">;
+  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)">;
+  def gatherd_d256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int const *, 
_Vector<8, int>, _Vector<8, int>, _Constant char)">;
+  def gatherq_d256 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int const *, 
_Vector<4, long long int>, _Vector<4, int>, _Constant char)">;
 }
 
 let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
+  def maskloadd : X86Builtin<"_Vector<4, int>(_Vector<4, int const *>, 
_Vector<4, int>)">;
+  def maskloadq : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long 
int const *>, _Vector<2, long long int>)">;
+
   def maskstored : X86Builtin<"void(_Vector<4, int *>, _Vector<4, int>, 
_Vector<4, int>)">;
   def maskstoreq : X86Builtin<"void(_Vector<2, long long int *>, _Vector<2, 
long long int>, _Vector<2, long long int>)">;
-}
 
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
   def gatherd_pd : X86Builtin<"_Vector<2, double>(_Vector<2, double>, double 
const *, _Vector<4, int>, _Vector<2, double>, _Constant char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  def gatherd_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, 
double const *, _Vector<4, int>, _Vector<4, double>, _Constant char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
   def gatherq_pd : X86Builtin<"_Vector<2, double>(_Vector<2, double>, double 
const *, _Vector<2, long long int>, _Vector<2, double>, _Constant char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  def gatherq_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, 
double const *, _Vector<4, long long int>, _Vector<4, double>, _Constant 
char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
   def gatherd_ps : X86Builtin<"_Vector<4, float>(_Vector<4, float>, float 
const *, _Vector<4, int>, _Vector<4, float>, _Constant char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  def gatherd_ps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, float 
const *, _Vector<8, int>, _Vector<8, float>, _Constant char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
   def gatherq_ps : X86Builtin<"_Vector<4, float>(_Vector<4, float>, float 
const *, _Vector<2, long long int>, _Vector<4, float>, _Constant char)">;
-}
 
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  def gatherq_ps256 : X86Builtin<"_Vector<4, float>(_Vector<4, float>, float 
const *, _Vector<4, long long int>, _Vector<4, float>, _Constant char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
   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)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  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)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
   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)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  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)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
   def gatherd_d : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int const *, 
_Vector<4, int>, _Vector<4, int>, _Constant char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  def gatherd_d256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int const *, 
_Vector<8, int>, _Vector<8, int>, _Constant char)">;
-}
-
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
   def gatherq_d : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int const *, 
_Vector<2, long long int>, _Vector<4, int>, _Constant char)">;
 }
 
-let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
-  def gatherq_d256 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int const *, 
_Vector<4, long long int>, _Vector<4, int>, _Constant char)">;
-}
-
 let Features = "f16c", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] 
in {
   def vcvtps2ph : X86Builtin<"_Vector<8, short>(_Vector<4, float>, _Constant 
int)">;
 }


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to