Used InstCombine to enable VMLAV and Add instructions to generate VMLAVA instead with regression tests.
This seems good to me.
The part I am a little unsure about is that it is converting add(vmlav) into a new vmlava, but we are starting at the vmlav to do it. So need to set the insertion point and use replaceAllUsesWith/eraseInstFromFunction. I couldn't find anything else that worked like that in instcombine, but maybe just missed it. It seems to work just fine like this, but it might be cause potential problems with the way instcombine iterates? It hasn't caused any problems we have seen though.
I think this is good, but give it a day or two before committing in case anyone knows that this will be a problem.
Yes, this is not the typical code construct for instcombine. But given that we've (finally!) moved the target-specific combines out of the generic code files, I think this is the only way to match this kind of pattern.
There are similar constructs for generic patterns with phi ops and load/store, so this should be good too.