Landing: 44c89620f739

Project / Subsystem

gcc / phiopt

Date

2026-08-29

Author

Andrea Pinski

Commit

44c89620f7390687a01045228d263845e6e311aa

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
phiopt
patch_id
—
commit_hash
44c89620f7390687a01045228d263845e6e311aa
source_type
github
headline
Improve factoring and merging of operations involving certain builtins
tldr
PHI optimization pass now correctly handles factoring and merging of operations involving CRC, expect, object_size, clz, ctz, prefetch, and frame address built…
author
Andrea Pinski
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • phiopt
  • • builtins
  • • tree-optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-29T00:00:00.000Z

The PHI optimization pass has been enhanced to correctly factor and merge operations involving several builtins that require constant arguments. Previously, operations like CRC builtins could not be factored out if their third argument differed, leading to errors. This change consolidates logic into a new factor_operation_ok function and extends its checks to cover CRC, expect, object_size, clz, ctz, prefetch, and frame address builtins, enabling better optimization while maintaining correctness.