Landing: bc94521ad8f3

Project / Subsystem

gcc / risc-v

Date

2026-03-26

Author

Robin Dapp

Commit

bc94521ad8f375b5e964a8e79c2dccc106d3322d

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
risc-v
patch_id
commit_hash
bc94521ad8f375b5e964a8e79c2dccc106d3322d
source_type
github
headline
RISC-V: Remove blanket else in riscv_hard_regno_mode_ok
tldr
This commit removes unreachable code in `riscv_hard_regno_mode_ok` function in the RISC-V backend.
author
Robin Dapp
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • risc-v
  • code cleanup
  • compiler
discussion_id_link
bugzilla_pr
date
2026-03-26T00:00:00.000Z

The riscv_hard_regno_mode_ok function in the RISC-V backend had an unnecessary else clause that was effectively unreachable. This commit removes the else clause, simplifying the code. This was found while investigating PR124439.