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

Restore cris-elf build after RTL optimization regression.

Fixes a regression impacting the CRIS architecture's build process caused by recent RTL simplification improvements.

A recent RTL simplification improvement introduced a regression that broke the build for the CRIS architecture, specifically for cris-elf. The issue stemmed from cris.md’s cbranch instructions accepting more machine modes than the define_insn it lowered to could handle. This commit resolves the problem by adding the necessary modes to the btst instruction definition, restoring the build.

In Details

This commit addresses PR target/126276, which is a regression on the CRIS target. The issue lies in the interaction between a recent RTL simplification pass and the machine description (.md) file for CRIS. Specifically, cris.md contains *cbranch<mode>4_btstrq1_<CC> definitions that accept a broader set of machine modes than the corresponding *btst<mode> define_insn they lower to. The fix involves ensuring that the *btst<mode> define_insn in config/cris/cris.md also handles the modes accepted by the cbranch patterns, specifically fixing issues for BWD modes beyond SImode.

For Context
CRIS
A family of 16-bit and 32-bit microprocessors originally developed by Axis Communications. GCC supports this architecture.
cris-elf
A target triplet for the CRIS architecture using the ELF (Executable and Linkable Format) object file format, commonly used on embedded systems.
RTL
Register Transfer Language. An intermediate representation used by GCC that more closely resembles machine instructions than GIMPLE, used for instruction selection, scheduling, and target-specific optimizations.
regression
A bug introduced in a new version of software that causes a feature to fail which previously worked correctly.
machine description
A file (with a .md extension) used by GCC to describe the instruction set, addressing modes, and instruction patterns for a specific target architecture.
define_insn
A construct within GCC's machine description files that defines a specific machine instruction, its operands, and how it can be generated or recognized.
Filed Under: crisbuildregressionrtl-optimization