Skip to content

Commit f47fdc1

Browse files
authored
Unrolled build for #144341
Rollup merge of #144341 - CaiWeiran:const-vector_test, r=wesleywiser Enable const-vector.rs test on RISC-V (riscv64) This PR replaces [#144283](#144283) to resolve merge conflicts. This PR adds support for running the `tests/codegen/const-vector.rs` test on the RISC-V (riscv64) architecture. Previously, this test would fail on RISC-V targets due to architecture-specific code generation issues. This patch modifies the test to ensure compatibility while preserving its intent. The change has been tested locally using `./x test` on a riscv64 target, and the test now passes as expected. ### Notes: - This change is scoped specifically to improve RISC-V compatibility. - It does not affect behavior or test results on other architectures.
2 parents f32b232 + 2e49c52 commit f47fdc1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/codegen-llvm/const-vector.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#![feature(arm_target_feature)]
1616
#![feature(mips_target_feature)]
1717
#![allow(non_camel_case_types)]
18+
#![feature(riscv_target_feature)]
1819

1920
#[path = "../auxiliary/minisimd.rs"]
2021
mod minisimd;
@@ -42,6 +43,7 @@ extern "unadjusted" {
4243
#[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
4344
#[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
4445
#[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
46+
#[cfg_attr(target_arch = "riscv64", target_feature(enable = "v"))]
4547
pub fn do_call() {
4648
unsafe {
4749
// CHECK: call void @test_i8x2(<2 x i8> <i8 32, i8 64>

0 commit comments

Comments
 (0)