Skip to content

Commit 8c975ef

Browse files
committed
Some fixes as asked by @Amanieu
1 parent 53a290d commit 8c975ef

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

crates/core_arch/src/x86/avx2.rs

+13-9
Original file line numberDiff line numberDiff line change
@@ -3142,15 +3142,6 @@ pub unsafe fn _mm256_srlv_epi64(a: __m256i, count: __m256i) -> __m256i {
31423142
/// minimize caching, the data is flagged as non-temporal (unlikely to be used again soon)
31433143
///
31443144
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_stream_load_si256)
3145-
///
3146-
/// # Safety of non-temporal stores
3147-
///
3148-
/// After using this intrinsic, but before any other access to the memory that this intrinsic
3149-
/// mutates, a call to [`_mm_sfence`] must be performed by the thread that used the intrinsic. In
3150-
/// particular, functions that call this intrinsic should generally call `_mm_sfence` before they
3151-
/// return.
3152-
///
3153-
/// See [`_mm_sfence`] for details.
31543145
#[inline]
31553146
#[target_feature(enable = "avx,avx2")]
31563147
#[cfg_attr(test, assert_instr(vmovntdqa))]
@@ -4226,6 +4217,19 @@ mod tests {
42264217
assert_eq_m256d(res, _mm256_set1_pd(6.88f64));
42274218
}
42284219

4220+
#[simd_test(enable = "avx2")]
4221+
unsafe fn test_mm_broadcastsi128_si256() {
4222+
let a = _mm_setr_epi64x(0x0987654321012334, 0x5678909876543210);
4223+
let res = _mm_broadcastsi128_si256(a);
4224+
let retval = _mm256_setr_epi64x(
4225+
0x0987654321012334,
4226+
0x5678909876543210,
4227+
0x0987654321012334,
4228+
0x5678909876543210,
4229+
);
4230+
assert_eq_m256i(res, retval);
4231+
}
4232+
42294233
#[simd_test(enable = "avx2")]
42304234
unsafe fn test_mm256_broadcastsi128_si256() {
42314235
let a = _mm_setr_epi64x(0x0987654321012334, 0x5678909876543210);

crates/core_arch/src/x86/sse41.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -1142,20 +1142,11 @@ pub unsafe fn _mm_test_mix_ones_zeros(a: __m128i, mask: __m128i) -> i32 {
11421142
_mm_testnzc_si128(a, mask)
11431143
}
11441144

1145-
/// Load 128-bits of integer data from memory into dstt. mem_addr must be aligned on a 16-byte
1145+
/// Load 128-bits of integer data from memory into dst. mem_addr must be aligned on a 16-byte
11461146
/// boundary or a general-protection exception may be generated. To minimize caching, the data
11471147
/// is flagged as non-temporal (unlikely to be used again soon)
11481148
///
11491149
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_stream_load_si128)
1150-
///
1151-
/// # Safety of non-temporal stores
1152-
///
1153-
/// After using this intrinsic, but before any other access to the memory that this intrinsic
1154-
/// mutates, a call to [`_mm_sfence`] must be performed by the thread that used the intrinsic. In
1155-
/// particular, functions that call this intrinsic should generally call `_mm_sfence` before they
1156-
/// return.
1157-
///
1158-
/// See [`_mm_sfence`] for details.
11591150
#[inline]
11601151
#[target_feature(enable = "sse,sse4.1")]
11611152
#[cfg_attr(test, assert_instr(movntdqa))]

crates/stdarch-verify/tests/x86-intel.rs

-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ fn verify_all_signatures() {
273273
"_mm_cvtsi64x_sd",
274274
"_bextr2_u64",
275275
"_mm_tzcnt_64",
276-
"_mm_broadcastsi128_si256",
277276
];
278277
if !skip.contains(&rust.name) {
279278
println!(

0 commit comments

Comments
 (0)