expmed: Vector extraction utilizes permute patterns
The `expmed` component now extracts vectors from vectors using consecutive permute patterns, simplifying the process.
This commit modifies the expmed (expand media) component to handle vector extraction from vectors by constructing a permute pattern. This approach allows the target architecture to process these extractions more uniformly. The function extract_vector_from_vector is updated to permit vector extraction via permute, simplifying the implementation and potentially improving efficiency by relying on a more generic instruction pattern.
In Details
This change in expmed.cc introduces extract_vector_from_vector_perm, a function that builds a vec_perm pattern for extracting a vector from another vector. It replaces or augments the existing extract_vector_from_vector logic, which previously might have used more specific or less optimized methods. By leveraging the permute instruction, this change aims to provide a more consistent and potentially efficient way to handle vector-to-vector data extraction across various target architectures supported by the 'media' (e.g., SIMD) expansion paths.
- expmed
- Likely refers to the 'expand media' or 'expand multimedia' part of the compiler, which handles instructions for SIMD and other media-processing capabilities.
- vector extraction
- The process of retrieving a portion of data from a vector register.
- permute pattern
- An instruction pattern that rearranges elements within a vector register according to a specified order or mask.