[PATCH] D115234: [M68k] Adopt the new VarLenCodeEmitterGen for arithmetic instructions

Min-Yih Hsu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 18:51:29 PST 2021


myhsu added inline comments.


================
Comment at: llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp:91
+                                          const MCSubtargetInfo &STI) const {
+  assert(Op.isValid());
+
----------------
RKSimon wrote:
> Can this be replaced with (and add an assert message):
> 
> assert(Op.isValid() && (Op.isReg() || (Op.isImm()) && "Unsupported operand type");
I prefer to use `llvm_unreachable` at the final else branch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115234/new/

https://reviews.llvm.org/D115234



More information about the llvm-commits mailing list