- Added code to recognize insertelement on v8i16/v16i8 vectors and transform to use vinserth/vinsertb instructions.
- Added code to recognize extractelement on v8i16/v16i8 vectors, specifically extracting the elements from doubleword element 1 of a VSR, to use vextractuh/vextractub instructions. The normal code-gen requires an extra xxswapd instruction to get the elements into the proper half of the register before a mfvsrd.
- Added LIT tests for above patterns.
@nemanjai @kbarton I believe the code sequences that 'https://reviews.llvm.org/D34032' generate have equal or less than the number of cycles these 'vextractu[h|b] + mfvsrd' sequences. Also, they are more general and can handle more cases. Therefore I don't think the extract portion of this patch is useful anymore. However, the insertelement patterns are still good to have IMO.