[llvm] [X86] Support promoted ENQCMD and USER-MSR instructions (PR #77293)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 02:20:27 PST 2024
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 f5f66e26b5f010218651cab831d5651fe7a71a0a 240accad77746015e670cbd9ed6b957f897dcea1 -- llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp llvm/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/utils/TableGen/X86DisassemblerTables.cpp llvm/utils/TableGen/X86RecognizableInstr.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 80563918b3..60116eb5c7 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -5028,8 +5028,12 @@ void X86DAGToDAGISel::Select(SDNode *Node) {
switch (IntNo) {
default: llvm_unreachable("Impossible intrinsic");
#define GET_EGPR_IF_ENABLED(OPC) Subtarget->hasEGPR() ? OPC##_EVEX : OPC
- case Intrinsic::x86_encodekey128: Opcode = GET_EGPR_IF_ENABLED(X86::ENCODEKEY128); break;
- case Intrinsic::x86_encodekey256: Opcode = GET_EGPR_IF_ENABLED(X86::ENCODEKEY256); break;
+ case Intrinsic::x86_encodekey128:
+ Opcode = GET_EGPR_IF_ENABLED(X86::ENCODEKEY128);
+ break;
+ case Intrinsic::x86_encodekey256:
+ Opcode = GET_EGPR_IF_ENABLED(X86::ENCODEKEY256);
+ break;
#undef GET_EGPR_IF_ENABLED
}
diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp
index c2032e576d..c6dabefd70 100644
--- a/llvm/utils/TableGen/X86RecognizableInstr.cpp
+++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp
@@ -168,10 +168,9 @@ RecognizableInstr::RecognizableInstr(DisassemblerTables &tables,
void RecognizableInstr::processInstr(DisassemblerTables &tables,
const CodeGenInstruction &insn,
InstrUID uid) {
- if (insn.TheDef->getName() == "ENQCMD32_EVEX")
- {
+ if (insn.TheDef->getName() == "ENQCMD32_EVEX") {
if (insn.TheDef->getName() == "yikarus")
- return;
+ return;
}
if (!insn.TheDef->isSubClassOf("X86Inst"))
return;
``````````
</details>
https://github.com/llvm/llvm-project/pull/77293
More information about the llvm-commits
mailing list