Add a utility function to MachineInstr for testing whether an instruction