GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/vectorizer

Cleanup vectorizable_conversion related code.

Vectorizer simplifies handling of scalar operands in vectorizable conversions.

This commit refactors parts of the GCC vectorizer, specifically the vectorizable_conversion function. It elides requirements for scalar operands op0 and op1 when they are fed by SLP permutations, which cannot be computed in that context. A new overload for vect_is_simple_use is introduced to ease this transition, and an unused scalar operand argument is removed from supportable_indirect_convert_operation.

In Details

The vectorizable_conversion function in tree-vect-stmts.cc now elides requirements for scalar operands op0/op1 when originating from SLP permutations. A new overload vect_is_simple_use simplifies operand checking, and supportable_indirect_convert_operation has its optional scalar op argument removed as it was unused. These changes streamline the vectorizer's handling of certain conversion patterns.

For Context
Vectorizer
A compiler component that transforms code to utilize vector instructions, performing multiple operations in parallel on data elements packed into wider registers.
SLP (Superword-Level Parallelism)
A compiler optimization technique that identifies independent scalar operations that can be executed in parallel using vector instructions.
Scalar operand
A basic data value, as opposed to a vector containing multiple data elements.
Machine mode
A representation of data types and sizes within the GCC internal representation (tree) that corresponds to hardware capabilities.
Filed Under: vectorizeroptimization