GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
rtl

RTL: Allow vector memory operands

RTL now supports vector memory operands, enabling targets like GCN to use vector loads/stores.

This patch introduces the necessary middle-end adjustments in GCC’s RTL to allow memory operands that are vectors of addresses. A new flag, MEM_INDEPENDENT_P, is introduced to indicate that vector addresses can be treated independently, which is crucial for certain backends like GCN. While existing targets are unlikely to be affected due to not yet reporting vector modes as legitimate, this lays the groundwork for future backend support for vector memory operations.

In Details

Introduces MEM_INDEPENDENT_P flag for RTL MEM expressions, signifying that addresses within a vector operand can be treated independently. This is a prerequisite for backends like GCN to implement vector loads/stores using (mem (reg:<vecmode>)). The TARGET_ADDR_SPACE_VALID_POINTER_MODE hook is updated to support this, while TARGET_VALID_POINTER_MODE is left untouched to avoid wider impact. The changes are intended to be minimal and rely on specific backend support for vector modes.

For Context
RTL
Register Transfer Language. An intermediate representation used within GCC, consisting of a set of generic tree-like data structures that represent the flow of data and operations within a program.
vector memory operand
A memory access instruction where the address is specified as a vector, allowing the operation to access multiple memory locations potentially in parallel.
MEM_INDEPENDENT_P
A flag in GCC's RTL that indicates whether the memory addresses within a vector operand can be treated as independent, allowing for certain optimizations.
TARGET_ADDR_SPACE_VALID_POINTER_MODE
A GCC target hook that validates pointer types within specific address spaces, now updated to support vector pointer modes.
GCN
Graphics Core Next. An AMD GPU architecture for which GCC has a specific backend.
Filed Under: rtlvectormemorybackend