Skip to content

Commit b4a6aeb

Browse files
committed
Try disabling div intrinsic on RISC-V
1 parent 029ec05 commit b4a6aeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/core_simd/src/ops.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ macro_rules! int_divrem_guard {
9999

100100
// aarch64 div fails for arbitrary `v % 0`, mod fails when rhs is MIN, for non-powers-of-two
101101
// these operations aren't vectorized on aarch64 anyway
102-
#[cfg(target_arch = "aarch64")]
102+
#[cfg(any(target_arch = "aarch64", target_arch = "riscv32", target_arch = "riscv64"))]
103103
{
104104
let mut out = Simd::splat(0 as _);
105105
for i in 0..Self::LEN {
@@ -108,7 +108,7 @@ macro_rules! int_divrem_guard {
108108
out
109109
}
110110

111-
#[cfg(not(target_arch = "aarch64"))]
111+
#[cfg(not(any(target_arch = "aarch64", target_arch = "riscv32", target_arch = "riscv64")))]
112112
{
113113
// Safety: $lhs and rhs are vectors
114114
unsafe { core::intrinsics::simd::$simd_call($lhs, rhs) }

0 commit comments

Comments
 (0)