Landing: 14665d8a97e5

Project / Subsystem

gcc / ifcvt

Date

2026-08-31

Author

wangjue

Commit

14665d8a97e566c6fefe38f843c1377338b8cbe1

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
ifcvt
patch_id
—
commit_hash
14665d8a97e566c6fefe38f843c1377338b8cbe1
source_type
github
headline
Handle extended conditional arithmetic in ifcvt.
tldr
Conditional arithmetic with sign/zero extensions now handled correctly.
author
wangjue
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • if-conversion
  • • risc-v
discussion_id_link
—
bugzilla_pr
—
date
2026-08-31T00:00:00.000Z

The ifcvt (if-conversion) pass has been improved to handle conditional arithmetic operations that are wrapped in sign or zero extensions. The compiler now correctly identifies when the unchanged value of such an operation already has the necessary extension. This is achieved by directly querying the promoted lowpart, rather than searching for its definition, leading to more robust code generation for conditional arithmetic, particularly on architectures like RISC-V.