Landing: 6f8fff34e8d8

Project / Subsystem

gcc / out-of-ssa

Date

2026-07-26

Author

Kyrylo Tkachov

Commit

6f8fff34e8d854c3f66b2b7c9c64e973a71661cb

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
out-of-ssa
patch_id
commit_hash
6f8fff34e8d854c3f66b2b7c9c64e973a71661cb
source_type
github
headline
out-of-SSA: Use all partition names to find decl
tldr
Fixes out-of-SSA to correctly identify the declaration for splitting partitions, preventing miscompilations.
author
Kyrylo Tkachov
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • out-of-ssa
  • optimization
  • memory-aliasing
  • cfgexpand
discussion_id_link
bugzilla_pr
date
2026-07-26T00:00:00.000Z

This commit modifies the out-of-SSA pass to correctly identify the declaration associated with a partition, resolving a miscompilation issue. The split_overlapping_partition_decls function previously relied on a partition’s representative name to determine its associated variable. If this representative had no base variable (e.g., an anonymous temporary), the function might select the wrong variable, leading to incorrect partitioning and the fusion of memory accesses. The fix ensures that all names within a partition are considered to find the correct declaration, preventing situations where distinct stack slots share a MEM_EXPR and cause fused stores.