[llvm] Handle moves of non-16 size to/from CCR (PR #108581)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 26 07:43:49 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 c320df4a2c9d7be10caea9a423d2bfbdcaae6a39 bfaa06cdea593f12bc6d74a2d4b719923dd616c9 --extensions cpp -- llvm/lib/Target/M68k/M68kExpandPseudo.cpp llvm/lib/Target/M68k/M68kInstrInfo.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/M68k/M68kInstrInfo.cpp b/llvm/lib/Target/M68k/M68kInstrInfo.cpp
index 80febbde4d..0341ba0bb4 100644
--- a/llvm/lib/Target/M68k/M68kInstrInfo.cpp
+++ b/llvm/lib/Target/M68k/M68kInstrInfo.cpp
@@ -764,9 +764,9 @@ void M68kInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
     else if (M68k::DR32RegClass.contains(DstReg))
       Opc = M68k::MOV32dc;
     else {
-    LLVM_DEBUG(dbgs() << "Cannot copy CCR to " << RI.getName(DstReg) 
-                << "(" << RI.getRegClass(DstReg) << ')\n');
-    llvm_unreachable("Invalid register for MOVE from CCR");
+      LLVM_DEBUG(dbgs() << "Cannot copy CCR to " << RI.getName(DstReg) << "("
+                        << RI.getRegClass(DstReg) << ')\n');
+      llvm_unreachable("Invalid register for MOVE from CCR");
     }
   } else if (ToCCR) {
     if (M68k::DR8RegClass.contains(SrcReg))
@@ -776,7 +776,8 @@ void M68kInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
     else if (M68k::DR32RegClass.contains(SrcReg))
       Opc = M68k::MOV32cd;
     else {
-      LLVM_DEBUG(dbgs() << "Cannot copy " << RI.getName(SrcReg) << " to CCR" << '\n');
+      LLVM_DEBUG(dbgs() << "Cannot copy " << RI.getName(SrcReg) << " to CCR"
+                        << '\n');
       llvm_unreachable("Invalid register for MOVE to CCR");
     }
   } else if (FromSR || ToSR)

``````````

</details>


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


More information about the llvm-commits mailing list