Meta instructions have a size of 0. Use isMetaInstruction instead of
listing them explicitly.
Differential Revision: https://reviews.llvm.org/D106043
}
switch (Opc) {
- case TargetOpcode::IMPLICIT_DEF:
- case TargetOpcode::KILL:
- case TargetOpcode::DBG_VALUE:
- case TargetOpcode::EH_LABEL:
- return 0;
case TargetOpcode::BUNDLE:
return getInstBundleSize(MI);
case TargetOpcode::INLINEASM:
return getInlineAsmLength(AsmStr, *MF->getTarget().getMCAsmInfo(), &ST);
}
default:
+ if (MI.isMetaInstruction())
+ return 0;
return DescSize;
}
}