Landing: 7ae96151ed91

Project / Subsystem

gcc / middle-end

Date

2026-09-03

Author

Kyrylo Tkachov

Commit

7ae96151ed91609c331d7199e71cf14072c120fd

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
middle-end
patch_id
—
commit_hash
7ae96151ed91609c331d7199e71cf14072c120fd
source_type
github
headline
Check GIMPLE memory LHSs as stores
tldr
Correctly identifies GIMPLE memory LHSs as stores for exception analysis, improving safety.
author
Kyrylo Tkachov
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • middle-end
  • • exceptions
discussion_id_link
—
bugzilla_pr
—
date
2026-09-03T00:00:00.000Z

This commit corrects the handling of memory Left-Hand Sides (LHSs) in GIMPLE (GCC’s Intermediate Representation) within the exception analysis. Previously, gimple_could_trap_p_1 incorrectly used tree_could_trap_p for memory LHSs when store checks were requested, potentially misclassifying them as non-trapping loads. The changes ensure that memory LHSs are now checked using gimple_store_p and lhs_could_trap_p, correctly identifying them as stores and preserving non-call exception information for constructs like GIMPLE_CALL results.