VPTMaskValue was using the "instruction" encoding to represent the masks (= the same encoding as the one used by the instructions in an object file), but it is only used to build MCOperands, so it should use the MCOperand encoding of the masks, which is slightly different.
Note that this has gone unnoticed for a long time because the encodings are identical for most masks (T, TT, TTT, etc.). We only noticed this (with the help of @simon_tatham
) while we were working on upgrading the MVE VPT Block insertion pass because incorrect assembly was generated for things like TTET.
(Adding @samparker to the list of reviewers as he added this enum I believe)
Since these mask values are now encoded in the common format used by the MCOperand for both VPT and IT instructions, perhaps they should have a more generic name than VPTMaskValue, and live in the ARM namespace instead of ARMVCC?