Landing: 2bfd402f8569

Project / Subsystem

gcc / combine

Date

2026-05-11

Author

Stefan Schulze Frielinghaus

Commit

2bfd402f8569511901ec8fe7628f57471e6d240a

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
combine
patch_id
commit_hash
2bfd402f8569511901ec8fe7628f57471e6d240a
source_type
github
headline
Combine pass rejects instructions with hard register constraints.
tldr
This commit prevents the combine pass from merging instructions that use hard register constraints, fixing code generation errors.
author
Stefan Schulze Frielinghaus
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • combine
  • optimization
  • bugfix
  • register allocation
discussion_id_link
bugzilla_pr
date
2026-05-11T00:00:00.000Z

The combine pass in GCC was incorrectly merging instructions that used hard register constraints, leading to errors during code generation, such as the inability to find a register to spill. This commit prevents the combine pass from merging instructions when the resulting instruction would violate hard register constraints. This resolves issues where target-specific machine descriptions impose constraints on register usage.