Landing: 3a4787033e4b

Project / Subsystem

gcc / tree-optimization

Date

2026-10-05

Author

Richard Biener

Commit

3a4787033e4b5dea2d1f7a6b30d4c85a00b7b91d

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
tree-optimization
patch_id
—
commit_hash
3a4787033e4b5dea2d1f7a6b30d4c85a00b7b91d
source_type
github
headline
FRE optimization improved by avoiding duplicate PHI argument processing
tldr
Fixes a bug in FRE optimization where duplicate PHI arguments caused redundant work and potential failures in alias analysis.
author
Richard Biener
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • loop optimization
  • • alias analysis
discussion_id_link
—
bugzilla_pr
—
date
2026-10-05T00:00:00.000Z

This commit is part of a fix for missed FRE optimizations in loops (PR127693). It addresses an issue where get_continuation_for_phi was called with duplicate PHI arguments when walking a backedge with a translated reference. By sorting PHI arguments and processing only unique ones, this patch avoids redundant work and prevents the abort_on_visited flag from tripping incorrectly, thereby enabling more FRE optimizations.