Skip to content

Commit a153eff

Browse files
tslnc04Amanieu
authored andcommitted
fix: reversed _mm512_set4_epi64 implementation
Fixes rust-lang#1555 by changing the implementations of _mm512_set4_epi64 and _mm512_setr4_epi64 to use _mm512_set_epi64. This makes these implementations consistent with the other _mm512_set[r]4_* implementations as well as changes their behavior to be in line with what the intrinsics guide describes.
1 parent 495c50d commit a153eff

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: crates/core_arch/src/x86/avx512f.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -28363,8 +28363,7 @@ pub unsafe fn _mm_maskz_set1_epi64(k: __mmask8, a: i64) -> __m128i {
2836328363
#[target_feature(enable = "avx512f")]
2836428364
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
2836528365
pub unsafe fn _mm512_set4_epi64(d: i64, c: i64, b: i64, a: i64) -> __m512i {
28366-
let r = i64x8::new(d, c, b, a, d, c, b, a);
28367-
transmute(r)
28366+
_mm512_set_epi64(d, c, b, a, d, c, b, a)
2836828367
}
2836928368

2837028369
/// Set packed 64-bit integers in dst with the repeated 4 element sequence in reverse order.
@@ -28374,8 +28373,7 @@ pub unsafe fn _mm512_set4_epi64(d: i64, c: i64, b: i64, a: i64) -> __m512i {
2837428373
#[target_feature(enable = "avx512f")]
2837528374
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
2837628375
pub unsafe fn _mm512_setr4_epi64(d: i64, c: i64, b: i64, a: i64) -> __m512i {
28377-
let r = i64x8::new(a, b, c, d, a, b, c, d);
28378-
transmute(r)
28376+
_mm512_set_epi64(a, b, c, d, a, b, c, d)
2837928377
}
2838028378

2838128379
/// Compare packed single-precision (32-bit) floating-point elements in a and b for less-than, and store the results in mask vector k.

0 commit comments

Comments
 (0)