Vectorization rejects bit-precision integer comparisons
Vectorizer now correctly rejects comparisons of _BitInt types, requiring bitfield lowering.
The GCC vectorizer previously failed to reject attempts to vectorize comparisons involving non-mode precision integer types, such as _BitInt. This commit modifies vectorizable_comparison_1 to reject such comparisons, ensuring they are handled by bitfield lowering in ifcvt or through pattern recognition, addressing PR tree-optimization/127390.
In Details
The tree-vect-stmts.cc function vectorizable_comparison_1 previously allowed vectorization of comparisons on types like _BitInt(N) where N is not a standard machine mode. This commit adds a check to reject such types, forcing them to be handled by bitfield lowering or specific pattern matching, aligning with the requirements of PR tree-optimization/127390.
- vectorization
- An optimization technique that allows a single instruction to operate on multiple data elements simultaneously, significantly improving performance for data-parallel operations.
- _BitInt
- A C++ integer type that allows arbitrary bit widths, introduced to support specific hardware or algorithms that require non-standard integer sizes.
- ifcvt
- Instruction-level if-conversion, a technique used by compilers to replace conditional branches with predicated instructions, often enabling better instruction-level parallelism.
- pattern recognition
- A compiler technique where sequences of intermediate representation (IR) or instructions are matched against predefined patterns to identify opportunities for optimization or code generation.