GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
forwprop Performance Win

Forward Prop Allow More Vector Permutations

The forward propagation pass now creates more vector permutation expressions, relying on a later pass to legalize them, improving optimization.

The forward propagation pass (forwprop) now creates more VEC_PERM_EXPR (vector permutation expressions) during vector constructor simplification. Previously, the pass avoided creating unsupported permutations. Now, it creates them if a later vector lowering pass can legalize them. This change can improve optimization by allowing more opportunities for vectorization.

In Details

This change modifies simplify_vector_constructor within the SSA forward propagation pass. It relaxes the conditions under which VEC_PERM_EXPR are created, specifically checking for the PROP_gimple_lvec property to ensure later legalization. This interacts with target-dependent vector lowering passes. Relevant files: tree-ssa-forwprop.cc.

For Context

Forward propagation is an optimization technique in GCC that attempts to determine the value of a variable or expression at compile time and replace its uses with that value. Vector permutation expressions (VEC_PERM_EXPR) rearrange elements within a vector. This change allows the compiler to create more of these expressions, even if they are not directly supported by the target architecture. A later optimization pass will then transform these expressions into a form that the target can handle, potentially leading to better code generation and performance.

Filed Under: optimizationvectorization