Landing: 2b3402f56531

Project / Subsystem

gcc / gcc/riscv

Date

2026-06-10

Author

Jeff Law

Commit

2b3402f56531e384e90f5a4228bb3bc0ed8e1250

Source

github

Perf win

No

Breaking

Yes

All attributes

project
gcc
subsystem
gcc/riscv
patch_id
commit_hash
2b3402f56531e384e90f5a4228bb3bc0ed8e1250
source_type
github
headline
RISC-V combined sCC splitters generate new RTL nodes instead of modifying existing ones.
tldr
GCC's RISC-V backend now generates new RTL nodes for combined comparison splitters rather than modifying existing ones, preventing miscompilations.
author
Jeff Law
outcome
committed
performance_win
false
breaking_change
true
series_id
series_parts
[]
tags
  • risc-v
  • code generation
  • bugfix
  • rtl
discussion_id_link
bugzilla_pr
date
2026-06-10T00:00:00.000Z

This commit fixes a miscompilation issue on RISC-V, particularly impacting programs like omnet from spec2017. Previously, the combined comparison code (sCC) splitters would sometimes modify existing Register Transfer Language (RTL) nodes using PUT_MODE or PUT_CODE when splitting instructions. This approach proved problematic if the split was not fully applied, leading to incorrect modifications of the Instruction-Level (IL) representation. The updated strategy involves generating entirely new RTL nodes during the splitting process, ensuring that the original IL remains untouched and preventing unintended side-effects and miscompilations.