[X86] Use vptestm/vptestnm for comparisons with zero to avoid creating a zero vector.

We can use the same input for both operands to get a free compare with zero.

We already use this trick in a couple places where we explicitly create PTESTM with the same input twice. This generalizes it.

I'm hoping to remove the ISD opcodes and move this to isel patterns like we do for scalar cmp/test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323605 91177308-0d34-0410-b5e6-96231b3b80d8
30 files changed