Landing: 20ee88e64f70

Project / Subsystem

gcc / risc-v

Date

2026-05-18

Author

Christoph Müllner

Commit

20ee88e64f705c42a52f74e46322c20a617b85c5

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
risc-v
patch_id
commit_hash
20ee88e64f705c42a52f74e46322c20a617b85c5
source_type
github
headline
Adds Zilsd alignment control options for RISC-V.
tldr
Introduces `-mzilsd-word-align` and `-mzilsd-strict-align` options to control alignment policies for RISC-V Zilsd/Zclsd doubleword memory accesses.
author
Christoph Müllner
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • riscv
  • zilsd
  • alignment
  • optimization
discussion_id_link
bugzilla_pr
date
2026-05-18T00:00:00.000Z

This commit introduces new command-line options to control the alignment policies for RISC-V’s Zilsd/Zclsd extensions, which provide doubleword memory access instructions. The new options, -mzilsd-word-align and -mzilsd-strict-align, allow users to explicitly select between word-aligned and naturally aligned variants. If the selected alignment policy does not permit a 2 * XLEN access, the compiler will expand the access using scalar bit-field helpers instead of using Zilsd load or store instructions.