Author here, happy to answer any questions or for any feedback!
I mean, if you are going to zero the register, the real optimization would be to completely skip emitting any instructions for the operation you are going to perform, since it probably isn't going to do anything if the mask is cleared.