Landing: b1987874feea

Project / Subsystem

gcc / risc-v

Date

2026-05-05

Author

Pan Li

Commit

b1987874feead5e98f1ea005bd1ce5ff515eda7a

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
risc-v
patch_id
commit_hash
b1987874feead5e98f1ea005bd1ce5ff515eda7a
source_type
github
headline
RISC-V: Add test for vec_duplicate and vmsgt.vv combine
tldr
This commit adds a new test case to verify the combining of vec_duplicate and vmsgt.vv instructions into vmsgt.vx on RISC-V.
author
Pan Li
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • risc-v
  • vectorization
  • optimization
  • testing
discussion_id_link
bugzilla_pr
date
2026-05-05T00:00:00.000Z

This commit adds a new test case for the RISC-V vector extension to verify the combination of vec_duplicate and vmsgt.vv instructions into a single vmsgt.vx instruction. The test checks the generated assembly code when the cost of moving data from a general-purpose register to a vector register (GR2VR) is 0, 1, and 15. This ensures that the compiler correctly performs this optimization under different cost scenarios.