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

Fix bogus INTEGER_INDUC_COND_REDUCTION detection

Correctly handle integer conditional reductions after adding new induction kinds.

The compiler incorrectly identified integer conditional reductions after new induction kinds were introduced. This change ensures that these reductions are unaffected by the new induction types. A new test case is added to verify the fix.

In Details

This commit fixes a bug in the vectorization pass where the introduction of additional induction kinds interfered with the correct detection of INTEGER_INDUC_COND_REDUCTION. The fix explicitly initializes loop evolution types and causes the pass to bail out for alternate induction types, preventing misidentification of valid reductions. This ensures loop vectorization remains correct for code involving conditional reductions.

For Context
INTEGER_INDUC_COND_REDUCTION
A compiler optimization that identifies and optimizes conditional arithmetic reductions within loops, where the reduction operation's operands depend on the loop counter.
induction kinds
Refers to different ways loop induction variables (variables that are incremented or decremented in a loop) can be represented or evolved. New types of induction can increase optimization opportunities but also introduce complexity.
vectorization
An optimization technique where the compiler transforms a loop to operate on multiple data elements simultaneously using SIMD (Single Instruction, Multiple Data) instructions.
Filed Under: optimizationvectorization