Landing: d3481fc3f874

Project / Subsystem

gcc / match

Date

2026-08-17

Author

Andrea Pinski

Commit

d3481fc3f8746f823d9d4bc1fd0e5d4384d0fc37

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
match
patch_id
—
commit_hash
d3481fc3f8746f823d9d4bc1fd0e5d4384d0fc37
source_type
github
headline
match: Allow C variable for result code/operation in simplify expressions
tldr
Generated code for match patterns is reduced by allowing C variables to define result codes, aiding ARM builds at -O0.
author
Andrea Pinski
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • match
  • • code generation
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-17T00:00:00.000Z

The GCC match system now allows a C variable to define the result code or operation within simplify expressions. This change significantly reduces the size of generated code by eliminating redundant for loops, achieving up to a six-fold reduction in some cases. This is particularly beneficial for enabling ARM builds with the -O0 optimization level, which previously encountered issues due to excessive code size. The new syntax uses an optional with clause to define a C identifier for the result code.