[llvm] [X86][NFC] Move "_Int" after "k"/"kz" (PR #121450)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 1 19:45:37 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 23ec9ee17eacb18eeb01d3c5a0d424852c7c1909 3b35d0e9472677e5d676b1002bea644906a4867d --extensions inc,cpp -- llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp llvm/lib/Target/X86/X86InstrFMA3Info.cpp llvm/lib/Target/X86/X86InstrInfo.cpp llvm/test/TableGen/x86-fold-tables.inc
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
index abe0cc6365..ecc39dca17 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
@@ -140,8 +140,10 @@ bool X86ATTInstPrinter::printVecCompareInstr(const MCInst *MI,
   case X86::VCMPPSZ128rmik:  case X86::VCMPPSZ128rrik:
   case X86::VCMPPSZ256rmik:  case X86::VCMPPSZ256rrik:
   case X86::VCMPPSZrmik:     case X86::VCMPPSZrrik:
-  case X86::VCMPSDZrmik_Int: case X86::VCMPSDZrrik_Int:
-  case X86::VCMPSSZrmik_Int: case X86::VCMPSSZrrik_Int:
+  case X86::VCMPSDZrmik_Int:
+  case X86::VCMPSDZrrik_Int:
+  case X86::VCMPSSZrmik_Int:
+  case X86::VCMPSSZrrik_Int:
   case X86::VCMPPDZ128rmbi:  case X86::VCMPPDZ128rmbik:
   case X86::VCMPPDZ256rmbi:  case X86::VCMPPDZ256rmbik:
   case X86::VCMPPDZrmbi:     case X86::VCMPPDZrmbik:
@@ -150,8 +152,10 @@ bool X86ATTInstPrinter::printVecCompareInstr(const MCInst *MI,
   case X86::VCMPPSZrmbi:     case X86::VCMPPSZrmbik:
   case X86::VCMPPDZrrib:     case X86::VCMPPDZrribk:
   case X86::VCMPPSZrrib:     case X86::VCMPPSZrribk:
-  case X86::VCMPSDZrrib_Int: case X86::VCMPSDZrribk_Int:
-  case X86::VCMPSSZrrib_Int: case X86::VCMPSSZrribk_Int:
+  case X86::VCMPSDZrrib_Int:
+  case X86::VCMPSDZrribk_Int:
+  case X86::VCMPSSZrrib_Int:
+  case X86::VCMPSSZrribk_Int:
   case X86::VCMPPHZ128rmi:   case X86::VCMPPHZ128rri:
   case X86::VCMPPHZ256rmi:   case X86::VCMPPHZ256rri:
   case X86::VCMPPHZrmi:      case X86::VCMPPHZrri:
@@ -160,12 +164,14 @@ bool X86ATTInstPrinter::printVecCompareInstr(const MCInst *MI,
   case X86::VCMPPHZ128rmik:  case X86::VCMPPHZ128rrik:
   case X86::VCMPPHZ256rmik:  case X86::VCMPPHZ256rrik:
   case X86::VCMPPHZrmik:     case X86::VCMPPHZrrik:
-  case X86::VCMPSHZrmik_Int: case X86::VCMPSHZrrik_Int:
+  case X86::VCMPSHZrmik_Int:
+  case X86::VCMPSHZrrik_Int:
   case X86::VCMPPHZ128rmbi:  case X86::VCMPPHZ128rmbik:
   case X86::VCMPPHZ256rmbi:  case X86::VCMPPHZ256rmbik:
   case X86::VCMPPHZrmbi:     case X86::VCMPPHZrmbik:
   case X86::VCMPPHZrrib:     case X86::VCMPPHZrribk:
-  case X86::VCMPSHZrrib_Int: case X86::VCMPSHZrribk_Int:
+  case X86::VCMPSHZrrib_Int:
+  case X86::VCMPSHZrribk_Int:
   case X86::VCMPPBF16Z128rmi:  case X86::VCMPPBF16Z128rri:
   case X86::VCMPPBF16Z256rmi:  case X86::VCMPPBF16Z256rri:
   case X86::VCMPPBF16Zrmi:     case X86::VCMPPBF16Zrri:
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
index 681d0dab37..a0df601b84 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
@@ -40,15 +40,15 @@ using namespace llvm;
   CASE_MASK_INS_COMMON(Inst, Suffix, src)         \
   CASE_MASKZ_INS_COMMON(Inst, Suffix, src)
 
-#define CASE_MASK_INS_COMMON_INT(Inst, Suffix, src) \
+#define CASE_MASK_INS_COMMON_INT(Inst, Suffix, src)                            \
   case X86::V##Inst##Suffix##src##k_Int:
 
-#define CASE_MASKZ_INS_COMMON_INT(Inst, Suffix, src) \
+#define CASE_MASKZ_INS_COMMON_INT(Inst, Suffix, src)                           \
   case X86::V##Inst##Suffix##src##kz_Int:
 
-#define CASE_AVX512_INS_COMMON_INT(Inst, Suffix, src) \
-  CASE_AVX_INS_COMMON(Inst, Suffix, src##_Int)        \
-  CASE_MASK_INS_COMMON_INT(Inst, Suffix, src)         \
+#define CASE_AVX512_INS_COMMON_INT(Inst, Suffix, src)                          \
+  CASE_AVX_INS_COMMON(Inst, Suffix, src##_Int)                                 \
+  CASE_MASK_INS_COMMON_INT(Inst, Suffix, src)                                  \
   CASE_MASKZ_INS_COMMON_INT(Inst, Suffix, src)
 
 #define CASE_FPCLASS_PACKED(Inst, src)    \
@@ -200,24 +200,24 @@ using namespace llvm;
   CASE_AVX512_FMA(Inst##PD, mb)                   \
   CASE_AVX512_FMA(Inst##PS, mb)
 
-#define CASE_FMA_SCALAR_REG(Inst)                 \
-  CASE_AVX_INS_COMMON(Inst##SD, , r)              \
-  CASE_AVX_INS_COMMON(Inst##SS, , r)              \
-  CASE_AVX_INS_COMMON(Inst##SD, , r_Int)          \
-  CASE_AVX_INS_COMMON(Inst##SS, , r_Int)          \
-  CASE_AVX_INS_COMMON(Inst##SD, Z, r)             \
-  CASE_AVX_INS_COMMON(Inst##SS, Z, r)             \
-  CASE_AVX512_INS_COMMON_INT(Inst##SD, Z, r)      \
+#define CASE_FMA_SCALAR_REG(Inst)                                              \
+  CASE_AVX_INS_COMMON(Inst##SD, , r)                                           \
+  CASE_AVX_INS_COMMON(Inst##SS, , r)                                           \
+  CASE_AVX_INS_COMMON(Inst##SD, , r_Int)                                       \
+  CASE_AVX_INS_COMMON(Inst##SS, , r_Int)                                       \
+  CASE_AVX_INS_COMMON(Inst##SD, Z, r)                                          \
+  CASE_AVX_INS_COMMON(Inst##SS, Z, r)                                          \
+  CASE_AVX512_INS_COMMON_INT(Inst##SD, Z, r)                                   \
   CASE_AVX512_INS_COMMON_INT(Inst##SS, Z, r)
 
-#define CASE_FMA_SCALAR_MEM(Inst)                 \
-  CASE_AVX_INS_COMMON(Inst##SD, , m)              \
-  CASE_AVX_INS_COMMON(Inst##SS, , m)              \
-  CASE_AVX_INS_COMMON(Inst##SD, , m_Int)          \
-  CASE_AVX_INS_COMMON(Inst##SS, , m_Int)          \
-  CASE_AVX_INS_COMMON(Inst##SD, Z, m)             \
-  CASE_AVX_INS_COMMON(Inst##SS, Z, m)             \
-  CASE_AVX512_INS_COMMON_INT(Inst##SD, Z, m)      \
+#define CASE_FMA_SCALAR_MEM(Inst)                                              \
+  CASE_AVX_INS_COMMON(Inst##SD, , m)                                           \
+  CASE_AVX_INS_COMMON(Inst##SS, , m)                                           \
+  CASE_AVX_INS_COMMON(Inst##SD, , m_Int)                                       \
+  CASE_AVX_INS_COMMON(Inst##SS, , m_Int)                                       \
+  CASE_AVX_INS_COMMON(Inst##SD, Z, m)                                          \
+  CASE_AVX_INS_COMMON(Inst##SS, Z, m)                                          \
+  CASE_AVX512_INS_COMMON_INT(Inst##SD, Z, m)                                   \
   CASE_AVX512_INS_COMMON_INT(Inst##SS, Z, m)
 
 #define CASE_FMA4(Inst, suf)                      \
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
index 01e2d4ace9..b05abb286d 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
@@ -277,8 +277,10 @@ void X86InstPrinterCommon::printCMPMnemonic(const MCInst *MI, bool IsVCmp,
   case X86::VCMPSDrmi_Int:   case X86::VCMPSDrri_Int:
   case X86::VCMPSDZrmi:      case X86::VCMPSDZrri:
   case X86::VCMPSDZrmi_Int:  case X86::VCMPSDZrri_Int:
-  case X86::VCMPSDZrmik_Int: case X86::VCMPSDZrrik_Int:
-  case X86::VCMPSDZrrib_Int: case X86::VCMPSDZrribk_Int:
+  case X86::VCMPSDZrmik_Int:
+  case X86::VCMPSDZrrik_Int:
+  case X86::VCMPSDZrrib_Int:
+  case X86::VCMPSDZrribk_Int:
     OS << "sd\t";
     break;
   case X86::CMPSSrmi:        case X86::CMPSSrri:
@@ -287,8 +289,10 @@ void X86InstPrinterCommon::printCMPMnemonic(const MCInst *MI, bool IsVCmp,
   case X86::VCMPSSrmi_Int:   case X86::VCMPSSrri_Int:
   case X86::VCMPSSZrmi:      case X86::VCMPSSZrri:
   case X86::VCMPSSZrmi_Int:  case X86::VCMPSSZrri_Int:
-  case X86::VCMPSSZrmik_Int: case X86::VCMPSSZrrik_Int:
-  case X86::VCMPSSZrrib_Int: case X86::VCMPSSZrribk_Int:
+  case X86::VCMPSSZrmik_Int:
+  case X86::VCMPSSZrrik_Int:
+  case X86::VCMPSSZrrib_Int:
+  case X86::VCMPSSZrribk_Int:
     OS << "ss\t";
     break;
   case X86::VCMPPHZ128rmi:  case X86::VCMPPHZ128rri:
@@ -305,8 +309,10 @@ void X86InstPrinterCommon::printCMPMnemonic(const MCInst *MI, bool IsVCmp,
     break;
   case X86::VCMPSHZrmi:      case X86::VCMPSHZrri:
   case X86::VCMPSHZrmi_Int:  case X86::VCMPSHZrri_Int:
-  case X86::VCMPSHZrrib_Int: case X86::VCMPSHZrribk_Int:
-  case X86::VCMPSHZrmik_Int: case X86::VCMPSHZrrik_Int:
+  case X86::VCMPSHZrrib_Int:
+  case X86::VCMPSHZrribk_Int:
+  case X86::VCMPSHZrmik_Int:
+  case X86::VCMPSHZrrik_Int:
     OS << "sh\t";
     break;
   case X86::VCMPPBF16Z128rmi:  case X86::VCMPPBF16Z128rri:
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
index c26dc2ca5a..657e47c62c 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
@@ -119,8 +119,10 @@ bool X86IntelInstPrinter::printVecCompareInstr(const MCInst *MI, raw_ostream &OS
   case X86::VCMPPSZ128rmik:  case X86::VCMPPSZ128rrik:
   case X86::VCMPPSZ256rmik:  case X86::VCMPPSZ256rrik:
   case X86::VCMPPSZrmik:     case X86::VCMPPSZrrik:
-  case X86::VCMPSDZrmik_Int: case X86::VCMPSDZrrik_Int:
-  case X86::VCMPSSZrmik_Int: case X86::VCMPSSZrrik_Int:
+  case X86::VCMPSDZrmik_Int:
+  case X86::VCMPSDZrrik_Int:
+  case X86::VCMPSSZrmik_Int:
+  case X86::VCMPSSZrrik_Int:
   case X86::VCMPPDZ128rmbi:  case X86::VCMPPDZ128rmbik:
   case X86::VCMPPDZ256rmbi:  case X86::VCMPPDZ256rmbik:
   case X86::VCMPPDZrmbi:     case X86::VCMPPDZrmbik:
@@ -129,8 +131,10 @@ bool X86IntelInstPrinter::printVecCompareInstr(const MCInst *MI, raw_ostream &OS
   case X86::VCMPPSZrmbi:     case X86::VCMPPSZrmbik:
   case X86::VCMPPDZrrib:     case X86::VCMPPDZrribk:
   case X86::VCMPPSZrrib:     case X86::VCMPPSZrribk:
-  case X86::VCMPSDZrrib_Int: case X86::VCMPSDZrribk_Int:
-  case X86::VCMPSSZrrib_Int: case X86::VCMPSSZrribk_Int:
+  case X86::VCMPSDZrrib_Int:
+  case X86::VCMPSDZrribk_Int:
+  case X86::VCMPSSZrrib_Int:
+  case X86::VCMPSSZrribk_Int:
   case X86::VCMPPHZ128rmi:   case X86::VCMPPHZ128rri:
   case X86::VCMPPHZ256rmi:   case X86::VCMPPHZ256rri:
   case X86::VCMPPHZrmi:      case X86::VCMPPHZrri:
@@ -139,12 +143,14 @@ bool X86IntelInstPrinter::printVecCompareInstr(const MCInst *MI, raw_ostream &OS
   case X86::VCMPPHZ128rmik:  case X86::VCMPPHZ128rrik:
   case X86::VCMPPHZ256rmik:  case X86::VCMPPHZ256rrik:
   case X86::VCMPPHZrmik:     case X86::VCMPPHZrrik:
-  case X86::VCMPSHZrmik_Int: case X86::VCMPSHZrrik_Int:
+  case X86::VCMPSHZrmik_Int:
+  case X86::VCMPSHZrrik_Int:
   case X86::VCMPPHZ128rmbi:  case X86::VCMPPHZ128rmbik:
   case X86::VCMPPHZ256rmbi:  case X86::VCMPPHZ256rmbik:
   case X86::VCMPPHZrmbi:     case X86::VCMPPHZrmbik:
   case X86::VCMPPHZrrib:     case X86::VCMPPHZrribk:
-  case X86::VCMPSHZrrib_Int: case X86::VCMPSHZrribk_Int:
+  case X86::VCMPSHZrrib_Int:
+  case X86::VCMPSHZrribk_Int:
   case X86::VCMPPBF16Z128rmi:  case X86::VCMPPBF16Z128rri:
   case X86::VCMPPBF16Z256rmi:  case X86::VCMPPBF16Z256rri:
   case X86::VCMPPBF16Zrmi:     case X86::VCMPPBF16Zrri:
diff --git a/llvm/lib/Target/X86/X86InstrFMA3Info.cpp b/llvm/lib/Target/X86/X86InstrFMA3Info.cpp
index 0da4857d66..20cff2af8f 100644
--- a/llvm/lib/Target/X86/X86InstrFMA3Info.cpp
+++ b/llvm/lib/Target/X86/X86InstrFMA3Info.cpp
@@ -27,9 +27,9 @@ using namespace llvm;
   FMA3GROUP(Name, Suf##k, Attrs | X86InstrFMA3Group::KMergeMasked) \
   FMA3GROUP(Name, Suf##kz, Attrs | X86InstrFMA3Group::KZeroMasked)
 
-#define FMA3GROUP_MASKED_INT(Name, Suf, Attrs) \
-  FMA3GROUP(Name, Suf##_Int, Attrs) \
-  FMA3GROUP(Name, Suf##k_Int, Attrs | X86InstrFMA3Group::KMergeMasked) \
+#define FMA3GROUP_MASKED_INT(Name, Suf, Attrs)                                 \
+  FMA3GROUP(Name, Suf##_Int, Attrs)                                            \
+  FMA3GROUP(Name, Suf##k_Int, Attrs | X86InstrFMA3Group::KMergeMasked)         \
   FMA3GROUP(Name, Suf##kz_Int, Attrs | X86InstrFMA3Group::KZeroMasked)
 
 #define FMA3GROUP_PACKED_WIDTHS_Z(Name, Suf, Attrs) \
@@ -55,11 +55,11 @@ using namespace llvm;
 #define FMA3GROUP_PACKED_BF16(Name, Attrs) \
   FMA3GROUP_PACKED_WIDTHS_Z(Name, NEPBF16, Attrs)
 
-#define FMA3GROUP_SCALAR_WIDTHS_Z(Name, Suf, Attrs) \
-  FMA3GROUP(Name, Suf##Zm, Attrs) \
-  FMA3GROUP_MASKED_INT(Name, Suf##Zm, Attrs | X86InstrFMA3Group::Intrinsic) \
-  FMA3GROUP(Name, Suf##Zr, Attrs) \
-  FMA3GROUP_MASKED_INT(Name, Suf##Zr, Attrs | X86InstrFMA3Group::Intrinsic) \
+#define FMA3GROUP_SCALAR_WIDTHS_Z(Name, Suf, Attrs)                            \
+  FMA3GROUP(Name, Suf##Zm, Attrs)                                              \
+  FMA3GROUP_MASKED_INT(Name, Suf##Zm, Attrs | X86InstrFMA3Group::Intrinsic)    \
+  FMA3GROUP(Name, Suf##Zr, Attrs)                                              \
+  FMA3GROUP_MASKED_INT(Name, Suf##Zr, Attrs | X86InstrFMA3Group::Intrinsic)
 
 #define FMA3GROUP_SCALAR_WIDTHS_ALL(Name, Suf, Attrs) \
   FMA3GROUP_SCALAR_WIDTHS_Z(Name, Suf, Attrs) \
@@ -111,12 +111,12 @@ static const X86InstrFMA3Group Groups[] = {
   FMA3GROUP_MASKED(Name, PSZ256##Suf, Attrs)                                   \
   FMA3GROUP_MASKED(Name, PSZ##Suf, Attrs)
 
-#define FMA3GROUP_SCALAR_AVX512_ROUND(Name, Suf, Attrs) \
-  FMA3GROUP(Name, SDZ##Suf, Attrs) \
-  FMA3GROUP_MASKED_INT(Name, SDZ##Suf, Attrs) \
-  FMA3GROUP(Name, SHZ##Suf, Attrs) \
-  FMA3GROUP_MASKED_INT(Name, SHZ##Suf, Attrs) \
-  FMA3GROUP(Name, SSZ##Suf, Attrs) \
+#define FMA3GROUP_SCALAR_AVX512_ROUND(Name, Suf, Attrs)                        \
+  FMA3GROUP(Name, SDZ##Suf, Attrs)                                             \
+  FMA3GROUP_MASKED_INT(Name, SDZ##Suf, Attrs)                                  \
+  FMA3GROUP(Name, SHZ##Suf, Attrs)                                             \
+  FMA3GROUP_MASKED_INT(Name, SHZ##Suf, Attrs)                                  \
+  FMA3GROUP(Name, SSZ##Suf, Attrs)                                             \
   FMA3GROUP_MASKED_INT(Name, SSZ##Suf, Attrs)
 
 static const X86InstrFMA3Group BroadcastGroups[] = {

``````````

</details>


https://github.com/llvm/llvm-project/pull/121450


More information about the llvm-commits mailing list