Landing: 439f966973a7

Project / Subsystem

gcc / combine

Date

2026-05-07

Author

Richard Sandiford

Commit

439f966973a77f97f6c015cde6a9507e3be9f620

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
combine
patch_id
commit_hash
439f966973a77f97f6c015cde6a9507e3be9f620
source_type
github
headline
combine: Improve PLUS/MINUS cases in make_compound_operation.
tldr
The combine pass now uses simplify_gen_binary for PLUS/MINUS in make_compound_operation to improve simplification and operand ordering.
author
Richard Sandiford
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • combine
  • optimization
  • simplification
discussion_id_link
bugzilla_pr
date
2026-05-07T00:00:00.000Z

The make_compound_operation function in the combine pass has been updated to use simplify_gen_binary for handling PLUS and MINUS operations. This resolves issues where simplifications were discarded and operand ordering was incorrect for nested PLUS expressions. This change ensures that expressions are simplified more effectively and that operands are redistributed correctly in nested operations, improving generated code.