Landing: c44d96272181
Project / Subsystem
gcc / risc-v
Date
2026-09-08
Author
Zhongyao Chen
Commit
c44d962721818ba4eaef0e344ca4e123eea8cbb8
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- risc-v
- patch_id
- —
- commit_hash
- c44d962721818ba4eaef0e344ca4e123eea8cbb8
- source_type
- github
- headline
- RISC-V: Rewrite vector FMA patterns using fma rtxes
- tldr
- RISC-V vector FMA patterns are rewritten to use dedicated fma RTXs, improving code generation and fixing a performance regression.
- author
- Zhongyao Chen
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • risc-v
- • vectorization
- • optimization
- • fp-contract
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-08T00:00:00.000Z
The RISC-V vector Floating-Point Fused Multiply-Add (FMA) patterns have been rewritten to use specific fma RTX (Register Transfer language eXpression) forms instead of matching generic multiply-add trees. This change enables the compiler to correctly fuse operations into FMA instructions, even when floating-point contraction is disabled (-ffp-contract=off). The rewrite also addresses several pattern variations and fixes a performance regression in vf-3-f32.c by ensuring proper handling of scalar reuse and widening broadcasts.