Landing: b4198699bb51

Project / Subsystem

gcc / dom

Date

2026-10-04

Author

Aldy Hernandez

Commit

b4198699bb515f098057b0d00a3ca67adbbc4f17

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
dom
patch_id
—
commit_hash
b4198699bb515f098057b0d00a3ca67adbbc4f17
source_type
github
headline
DOM: Remove boolean range special case for conditionals
tldr
Simplifies conditional handling in DOM by removing a special case already covered by simplify_stmt.
author
Aldy Hernandez
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • dom
  • • optimization
  • • cleanup
discussion_id_link
—
bugzilla_pr
—
date
2026-10-04T00:00:00.000Z

The DOM (Dominator Tree) analysis pass no longer includes a special case for optimizing conditional statements based on boolean variable ranges. Previously, optimize_stmt would transform conditions like if (b == 5) into if (0 == 5) when b was known to be in the range [0, 1]. This transformation is now redundant as the simplify_stmt pass already handles such cases effectively. This change simplifies the DOM pass and includes a new test case.