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

RTL simplifications improve x86 complex argument passing.

Optimized generation of RTL for passing complex values on x86.

This change introduces RTL simplifications to simplify-rtx.cc to address inefficient passing of complex values on x86. The optimization resolves a bug where the compiler generated spurious instructions for assignments involving complex float types. The new RTL simplifies the code generation, producing more optimal assembly.

In Details

This commit refactors RTL pattern matching in simplify-rtx.cc to better handle vec_concat operations that represent the conceptual equivalent of (subreg_lowpart (reg X)) and (subreg_highpart (reg X)). This directly improves the code generated for passing complex arguments on x86, aligning with ABI expectations by treating the complex type as a pair of real and imaginary parts.

For Context
RTL
Register Transfer Language, an intermediate representation used by GCC to represent code during optimization. It's a low-level representation closely mapping to machine instructions.
vec_concat
An RTL expression representing the concatenation of two smaller vector elements into a larger one. In this context, it's used to reconstruct a complex number from its real and imaginary parts.
x86
A family of instruction set architectures originating from the Intel 8086 microprocessor. It is the dominant architecture for desktop and laptop computers.
ABI
Application Binary Interface. Defines how compiled code is translated into machine code that can be run by a processor, including how functions are called and how data is passed between them.
Filed Under: x86optimizationcompiler