Skip to content

Commit a5e94d8

Browse files
committed
Make sse4.2 functions const
1 parent 4070bc1 commit a5e94d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/core_arch/src/x86/sse42.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,8 @@ pub fn _mm_crc32_u32(crc: u32, v: u32) -> u32 {
563563
#[target_feature(enable = "sse4.2")]
564564
#[cfg_attr(test, assert_instr(pcmpgtq))]
565565
#[stable(feature = "simd_x86", since = "1.27.0")]
566-
pub fn _mm_cmpgt_epi64(a: __m128i, b: __m128i) -> __m128i {
566+
#[rustc_const_unstable(feature = "stdarch_const_intrinsics", issue = "none")]
567+
pub const fn _mm_cmpgt_epi64(a: __m128i, b: __m128i) -> __m128i {
567568
unsafe { transmute(simd_gt::<_, i64x2>(a.as_i64x2(), b.as_i64x2())) }
568569
}
569570

0 commit comments

Comments
 (0)