Avoid re-evaluating MI.getNumOperands() every iteration of the loop.