Extended Description
This function tends to return 4 for just about any instruction. This isn't always the case (see #24608 ).
Looking through AArch64AsmPrinter, it seems STACKMAP and PATCHPOINT may need special handling. The heuristic for inline asm may also need to be brushed up a bit.