[llvm] [X86][MC][CodeGen] Support encoding/decoding and pattern match for APX variant ADD instructions (PR #76319)

via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 23 22:47:05 PST 2023


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 17ff25a58ee4f29816d932fdb75f0d305718069f a2c5cb3ea4a8a12f416186e84336cf963eaba133 -- llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp llvm/utils/TableGen/X86DisassemblerTables.cpp llvm/utils/TableGen/X86FoldTablesEmitter.cpp llvm/utils/TableGen/X86RecognizableInstr.cpp llvm/utils/TableGen/X86RecognizableInstr.h
``````````

</details>

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

``````````diff
diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp
index cc84e2ccca..9ee1472bdf 100644
--- a/llvm/utils/TableGen/X86DisassemblerTables.cpp
+++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp
@@ -907,8 +907,8 @@ void DisassemblerTables::emitContextTable(raw_ostream &o, unsigned &i) const {
         o << "_B";
 
       o << "_NF";
-    }
-    else if ((index & ATTR_EVEX) || (index & ATTR_VEX) || (index & ATTR_VEXL)) {
+    } else if ((index & ATTR_EVEX) || (index & ATTR_VEX) ||
+               (index & ATTR_VEXL)) {
       if (index & ATTR_EVEX)
         o << "IC_EVEX";
       else
diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp
index 04724c81b8..1b3c97c4d6 100644
--- a/llvm/utils/TableGen/X86RecognizableInstr.cpp
+++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp
@@ -186,8 +186,8 @@ void RecognizableInstr::processInstr(DisassemblerTables &tables,
               : (HasEVEX_KZ ? n##_KZ                                           \
                             : (HasEVEX_K ? n##_K : (HasEVEX_B ? n##_B : n)))))
 
-#define EVEX_NF(n) (HasEVEX_NF ? n##_NF: n)
-#define EVEX_B_NF(n) (HasEVEX_B ? EVEX_NF(n##_B): EVEX_NF(n))
+#define EVEX_NF(n) (HasEVEX_NF ? n##_NF : n)
+#define EVEX_B_NF(n) (HasEVEX_B ? EVEX_NF(n##_B) : EVEX_NF(n))
 
 InstructionContext RecognizableInstr::insnContext() const {
   InstructionContext insnContext;

``````````

</details>


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


More information about the llvm-commits mailing list