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

aarch64: Handle subregister operands for negvti3

Fixes a crash in negvti3 when operands are subregisters by introducing a new predicate.

The negvti3 instruction on aarch64 previously crashed when given subregister operands because the gen_highpart function does not support them. This change introduces a new predicate, pure_register_operand, and uses it in negvti3 to prevent subregister operands, thus avoiding the crash.

In Details

The aarch64 backend's negvti3 instruction needs to avoid operands that are subregisters. The gen_highpart helper function used internally would abort on such inputs. This commit adds a new predicate pure_register_operand to the pattern matching in aarch64.md to explicitly reject SUBREGs, ensuring that gen_highpart is only called with valid register operands.

For Context
negvti3
A GCC internal function name representing the negation of a vector integer type with an arbitrary bit width. It's part of the compiler's internal representation of operations.
subregister
A smaller part of a larger machine register. Compilers use subregisters to access parts of registers, for example, the lower 32 bits of a 64-bit register.
predicate
In machine description files (like those for GCC backends), a predicate is a condition that must be true for a particular instruction pattern to match. It defines constraints on operands.
Filed Under: aarch64codegenbugfix