MVE does not have a single sext/zext or trunc instruction that takes the bottom half of a vector and extends to a full width, like NEON has with MOVL. Instead it is expected that this happens through top/bottom instructions. So the MVE equivalent VMOVLT/B instructions take either the even or odd elements of the input and extend them to the larger type, producing a vector with half the number of elements each of double the bitwidth. As there is no simple instruction, we often have to expand sext/zext/trunc into a series of lane moves (or stack loads/stores, which we do not do yet).
This pass takes vector code that starts at truncs, looks for interconnected blobs of operations that end with sext/zext and transforms them by adding shuffles so that the lanes are interleaved and the MVE VMOVL/VMOVN instructions can be used. This is done pre-ISel so that it can work across basic blocks.
This initial version of the pass just handles a limited set of instructions, not handling constants or splats or FP, which can all come as extensions to this base.
Before I do a 2nd and more in depth review, some name bike shedding: Lane Interleaving.
I am wondering if that is the most accurate description. This pass is about more efficient vector (element) extensions, which is achieved by some reshuffling. But lane interleaving is something that is used under the hood so we can use the bottom/top moves, thus it's not about lane interleaving per se or more efficient codegen for lane interleaving. So, would MVEVectorExtends or something like that be a better description?