Skip to content

Commit f05c320

Browse files
committed
Moving an intrinsic to the right place
1 parent a8458fa commit f05c320

File tree

2 files changed

+14
-0
lines changed
  • testable-simd-models/src/core_arch/x86

2 files changed

+14
-0
lines changed

testable-simd-models/src/core_arch/x86/models/avx.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,19 @@ pub fn _mm256_set_epi64x(a: i64, b: i64, c: i64, d: i64) -> __m256i {
338338
BitVec::from_i64x4(i64x4::from_fn(|i| vec[i as usize]))
339339
}
340340

341+
/// Broadcasts 8-bit integer `a` to all elements of returned vector.
342+
/// This intrinsic may generate the `vpbroadcastw`.
343+
///
344+
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_set1_epi16)
345+
346+
//
347+
348+
// This intrinsic has no corresponding instruction.
349+
350+
pub fn _mm256_set1_epi8(val: i8) -> BitVec<256> {
351+
BitVec::from_i8x32(i8x32::from_fn(|_| val))
352+
}
353+
341354
/// Broadcasts 16-bit integer `a` to all elements of returned vector.
342355
/// This intrinsic may generate the `vpbroadcastw`.
343356
///

testable-simd-models/src/core_arch/x86/tests/avx.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,6 @@ mk!(_mm256_set_epi32(
128128
e7: i32
129129
));
130130
mk!(_mm256_set_epi64x(a: i64, b: i64, c: i64, d: i64));
131+
mk!(_mm256_set1_epi8(a: i8));
131132
mk!(_mm256_set1_epi16(a: i16));
132133
mk!(_mm256_set1_epi32(a: i32));

0 commit comments

Comments
 (0)