Landing: 001b3a711d88
Project / Subsystem
gcc / risc-v
Date
2026-05-05
Author
Pan Li
Commit
001b3a711d88850d046a59ca8aa38e845cb6747c
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- risc-v
- patch_id
- —
- commit_hash
- 001b3a711d88850d046a59ca8aa38e845cb6747c
- source_type
- github
- headline
- RISC-V: Combine vec_duplicate + vmsgt.vv to vmsgt.vx
- tldr
- The compiler now combines `vec_duplicate` with `vmsgt.vv` into `vmsgt.vx` on RISC-V when the cost of GR2VR is zero.
- author
- Pan Li
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • risc-v
- • vectorization
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-05T00:00:00.000Z
The RISC-V backend now combines vec_duplicate followed by vmsgt.vv instructions into a single vmsgt.vx instruction when the cost of transferring data from a general-purpose register to a vector register (GR2VR) is zero. This optimization reduces the number of instructions and can improve performance. The change modifies the predicate matching and RTL generation to enable this combination.