[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 27 19:02:24 PDT 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 1fe8e7838bb5118b9e48fa15fa21a4638bae8ae1 fd570cb8d41f5f94b61d515985245fc81aab633e --extensions c,cpp,h -- clang/lib/Headers/amxfp8intrin.h clang/test/CodeGen/X86/amx_fp8.c clang/test/CodeGen/X86/amx_fp8_errors.c clang/test/CodeGen/X86/amx_fp8_inline_asm.c clang/lib/Basic/Targets/X86.cpp clang/lib/Basic/Targets/X86.h clang/lib/Headers/immintrin.h clang/lib/Sema/SemaX86.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/TargetParser/Host.cpp llvm/lib/TargetParser/X86TargetParser.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 5a7313ac3e..a83f392581 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -37509,12 +37509,21 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
   case X86::PTDPHF8PS: {
     const DebugLoc &DL = MI.getDebugLoc();
     unsigned Opc;
-    switch(MI.getOpcode()) {
-      default: llvm_unreachable("Unexpected instruction!");
-      case X86::PTDPBF8PS: Opc = X86::TDPBF8PS; break;
-      case X86::PTDPBHF8PS: Opc = X86::TDPBHF8PS; break;
-      case X86::PTDPHBF8PS: Opc = X86::TDPHBF8PS; break;
-      case X86::PTDPHF8PS: Opc = X86::TDPHF8PS; break;
+    switch (MI.getOpcode()) {
+    default:
+      llvm_unreachable("Unexpected instruction!");
+    case X86::PTDPBF8PS:
+      Opc = X86::TDPBF8PS;
+      break;
+    case X86::PTDPBHF8PS:
+      Opc = X86::TDPBHF8PS;
+      break;
+    case X86::PTDPHBF8PS:
+      Opc = X86::TDPHBF8PS;
+      break;
+    case X86::PTDPHF8PS:
+      Opc = X86::TDPHF8PS;
+      break;
     }
 
     MachineInstrBuilder MIB = BuildMI(*BB, MI, DL, TII->get(Opc));

``````````

</details>


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


More information about the llvm-commits mailing list