This patch creates predicated add and sub SVE instructions when the second operand of the add or sub LLVM instruction is a zext or a sext instruction.
I have already attempted to do that with two other patches by canonicalising zext and sext to a vselect instruction.
Patches:
This first patch is currently on the main branch but I noted that the tests for sub are wrong (the zext is the first operand instead of the second one, for add it doesn't matter because of the commutative property)
This patch is currently in review. Also, this patch needed more changes than the previous one, and it can be difficult in future to maintain it.
However, there is a simpler way to generate these predicated instructions by using the TableGen patterns proposed in this patch.
If you agree, I propose to revert the first patch, pre-commit the tests, and then commit these patterns and the updated tests.
This likely wants to be HasSVEorSME.