This patch tries to vectorize the compact pattern, as shown,
for(i=0; i<N; i++){ x = comp[i]; if(x<a) Out_ref[n++]=B[i]; }
It introduces some changes:
- Add a pattern matching in LoopVectorizationLegality to cache specific cases.
- Introduce two new recipes to hande the compact chain: VPCompactPHIRecipe: Handle the entry PHI of compact chain. VPWidenCompactInstructionRecipe: Handle other instructions in compact chain.
- Slightly adapt the cost model for compact pattern.
Overlapped with isLegalMaskedCompressStore?