GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
tree-optimization Performance Win

Fix vector boolean type precision in pattern recognition

Corrects mask precision calculation for vector boolean types to enable proper vectorization.

This commit addresses an issue where the mask precision for vector boolean types was incorrectly calculated, leading to failed vectorization. By ensuring the original scalar type is used to determine precision, the fix enables correct pattern recognition and improves vectorization for specific operations.

In Details

When VECTOR_BOOLEAN_TYPE_P uses an integer mode, the original scalar type is needed to determine the mask precision. Previously, build_mask_conversion and vect_convert_mask_for_vectype lacked this information, leading to incorrect mask_precision values and hindering vectorization. This change passes the scalar_type_for_mask parameter to these functions to rectify this.

Filed Under: vectorizationoptimizationcompiler