[llvm] [M68k] allow 16-bit registers for MOVE to/from CCR (PR #107591)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 19 20:40:48 PDT 2024


================
@@ -709,13 +709,27 @@ void M68kInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
   bool ToSR = DstReg == M68k::SR;
 
   if (FromCCR) {
-    assert(M68k::DR8RegClass.contains(DstReg) &&
-           "Need DR8 register to copy CCR");
-    Opc = M68k::MOV8dc;
+    if (M68k::DR8RegClass.contains(DstReg))
----------------
mshockwave wrote:

please add braces when one of the else/else if arms is using braces: https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements

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


More information about the llvm-commits mailing list