Skip to content

Commit 195e56f

Browse files
waywardmonkeysAmanieu
authored andcommitted
clippy: unnecessary cast warnings on x86.
The full warning is "casting raw pointers to the same type and constness is unnecessary"
1 parent 04cb1fa commit 195e56f

File tree

2 files changed

+54
-54
lines changed

2 files changed

+54
-54
lines changed

crates/core_arch/src/x86/avx512bw.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -9750,7 +9750,7 @@ pub unsafe fn _mm_maskz_alignr_epi8<const IMM8: i32>(
97509750
#[target_feature(enable = "avx512bw")]
97519751
#[cfg_attr(test, assert_instr(vpmovswb))]
97529752
pub unsafe fn _mm512_mask_cvtsepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask32, a: __m512i) {
9753-
vpmovswbmem(mem_addr as *mut i8, a.as_i16x32(), k);
9753+
vpmovswbmem(mem_addr, a.as_i16x32(), k);
97549754
}
97559755

97569756
/// Convert packed signed 16-bit integers in a to packed 8-bit integers with signed saturation, and store the active results (those with their respective bit set in writemask k) to unaligned memory at base_addr.
@@ -9760,7 +9760,7 @@ pub unsafe fn _mm512_mask_cvtsepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask32,
97609760
#[target_feature(enable = "avx512bw,avx512vl")]
97619761
#[cfg_attr(test, assert_instr(vpmovswb))]
97629762
pub unsafe fn _mm256_mask_cvtsepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask16, a: __m256i) {
9763-
vpmovswbmem256(mem_addr as *mut i8, a.as_i16x16(), k);
9763+
vpmovswbmem256(mem_addr, a.as_i16x16(), k);
97649764
}
97659765

97669766
/// Convert packed signed 16-bit integers in a to packed 8-bit integers with signed saturation, and store the active results (those with their respective bit set in writemask k) to unaligned memory at base_addr.
@@ -9770,7 +9770,7 @@ pub unsafe fn _mm256_mask_cvtsepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask16,
97709770
#[target_feature(enable = "avx512bw,avx512vl")]
97719771
#[cfg_attr(test, assert_instr(vpmovswb))]
97729772
pub unsafe fn _mm_mask_cvtsepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask8, a: __m128i) {
9773-
vpmovswbmem128(mem_addr as *mut i8, a.as_i16x8(), k);
9773+
vpmovswbmem128(mem_addr, a.as_i16x8(), k);
97749774
}
97759775

97769776
/// Convert packed 16-bit integers in a to packed 8-bit integers with truncation, and store the active results (those with their respective bit set in writemask k) to unaligned memory at base_addr.
@@ -9780,7 +9780,7 @@ pub unsafe fn _mm_mask_cvtsepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask8, a:
97809780
#[target_feature(enable = "avx512bw")]
97819781
#[cfg_attr(test, assert_instr(vpmovwb))]
97829782
pub unsafe fn _mm512_mask_cvtepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask32, a: __m512i) {
9783-
vpmovwbmem(mem_addr as *mut i8, a.as_i16x32(), k);
9783+
vpmovwbmem(mem_addr, a.as_i16x32(), k);
97849784
}
97859785

97869786
/// Convert packed 16-bit integers in a to packed 8-bit integers with truncation, and store the active results (those with their respective bit set in writemask k) to unaligned memory at base_addr.
@@ -9790,7 +9790,7 @@ pub unsafe fn _mm512_mask_cvtepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask32,
97909790
#[target_feature(enable = "avx512bw,avx512vl")]
97919791
#[cfg_attr(test, assert_instr(vpmovwb))]
97929792
pub unsafe fn _mm256_mask_cvtepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask16, a: __m256i) {
9793-
vpmovwbmem256(mem_addr as *mut i8, a.as_i16x16(), k);
9793+
vpmovwbmem256(mem_addr, a.as_i16x16(), k);
97949794
}
97959795

97969796
/// Convert packed 16-bit integers in a to packed 8-bit integers with truncation, and store the active results (those with their respective bit set in writemask k) to unaligned memory at base_addr.
@@ -9800,7 +9800,7 @@ pub unsafe fn _mm256_mask_cvtepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask16,
98009800
#[target_feature(enable = "avx512bw,avx512vl")]
98019801
#[cfg_attr(test, assert_instr(vpmovwb))]
98029802
pub unsafe fn _mm_mask_cvtepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask8, a: __m128i) {
9803-
vpmovwbmem128(mem_addr as *mut i8, a.as_i16x8(), k);
9803+
vpmovwbmem128(mem_addr, a.as_i16x8(), k);
98049804
}
98059805

98069806
/// Convert packed unsigned 16-bit integers in a to packed unsigned 8-bit integers with unsigned saturation, and store the active results (those with their respective bit set in writemask k) to unaligned memory at base_addr.
@@ -9810,7 +9810,7 @@ pub unsafe fn _mm_mask_cvtepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask8, a: _
98109810
#[target_feature(enable = "avx512bw")]
98119811
#[cfg_attr(test, assert_instr(vpmovuswb))]
98129812
pub unsafe fn _mm512_mask_cvtusepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask32, a: __m512i) {
9813-
vpmovuswbmem(mem_addr as *mut i8, a.as_i16x32(), k);
9813+
vpmovuswbmem(mem_addr, a.as_i16x32(), k);
98149814
}
98159815

98169816
/// Convert packed unsigned 16-bit integers in a to packed unsigned 8-bit integers with unsigned saturation, and store the active results (those with their respective bit set in writemask k) to unaligned memory at base_addr.
@@ -9820,7 +9820,7 @@ pub unsafe fn _mm512_mask_cvtusepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask32
98209820
#[target_feature(enable = "avx512bw,avx512vl")]
98219821
#[cfg_attr(test, assert_instr(vpmovuswb))]
98229822
pub unsafe fn _mm256_mask_cvtusepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask16, a: __m256i) {
9823-
vpmovuswbmem256(mem_addr as *mut i8, a.as_i16x16(), k);
9823+
vpmovuswbmem256(mem_addr, a.as_i16x16(), k);
98249824
}
98259825

98269826
/// Convert packed unsigned 16-bit integers in a to packed unsigned 8-bit integers with unsigned saturation, and store the active results (those with their respective bit set in writemask k) to unaligned memory at base_addr.
@@ -9830,7 +9830,7 @@ pub unsafe fn _mm256_mask_cvtusepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask16
98309830
#[target_feature(enable = "avx512bw,avx512vl")]
98319831
#[cfg_attr(test, assert_instr(vpmovuswb))]
98329832
pub unsafe fn _mm_mask_cvtusepi16_storeu_epi8(mem_addr: *mut i8, k: __mmask8, a: __m128i) {
9833-
vpmovuswbmem128(mem_addr as *mut i8, a.as_i16x8(), k);
9833+
vpmovuswbmem128(mem_addr, a.as_i16x8(), k);
98349834
}
98359835

98369836
#[allow(improper_ctypes)]

0 commit comments

Comments
 (0)