Landing: 8adc3726fe0c

Project / Subsystem

gcc / gcc/gimple-fold

Date

2026-07-24

Author

Andrea Pinski

Commit

8adc3726fe0c256f4ad36ba1c7d978261118e2f5

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/gimple-fold
patch_id
—
commit_hash
8adc3726fe0c256f4ad36ba1c7d978261118e2f5
source_type
github
headline
gimple-fold: Fix undefined overflow handling in follow_outer_ssa_edges
tldr
Fixes incorrect code generation for undefined overflow cases in gimple-fold's SSA edge following logic.
author
Andrea Pinski
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • gcc
  • • gimple
discussion_id_link
—
bugzilla_pr
—
date
2026-07-24T00:00:00.000Z

This commit addresses an issue in GCC’s gimple-fold pass where the follow_outer_ssa_edges function could generate incorrect code when dealing with undefined integer overflows. The problem arose because the function would prematurely return without saving the global range of an SSA name, leading to incorrect range analysis and subsequent optimizations, as demonstrated in PR126313. The fix reorders operations to save the global range before the early return.