How to see MCInst and MachineInstr generated by llvm?

Is there a way to get MCInst and MachineInstr generated by
llvm?

MachineInstr: use -stop-after flag with llc to print out the MIR after a certain codegen Pass. For instance, the most common one is:

llc -stop-after=finalize-isel input.ll -o output.mir

MCInst: use -show-inst with llvm-mc. Another related llvm-mc flag is -show-inst-operands