From 6486b653083ed2adb27341183e51f01c54e6cff6 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 26 Sep 2017 22:49:09 -0400 Subject: [PATCH] Add assert_instr to the rest of avx.rs --- library/stdarch/src/x86/avx.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/stdarch/src/x86/avx.rs b/library/stdarch/src/x86/avx.rs index b0748a55abe1..d079ae969394 100644 --- a/library/stdarch/src/x86/avx.rs +++ b/library/stdarch/src/x86/avx.rs @@ -7,6 +7,7 @@ use stdsimd_test::assert_instr; /// in `a` and `b`. #[inline(always)] #[target_feature = "+avx"] +#[cfg_attr(test, assert_instr(vaddpd))] pub fn _mm256_add_pd(a: f64x4, b: f64x4) -> f64x4 { a + b } @@ -14,6 +15,7 @@ pub fn _mm256_add_pd(a: f64x4, b: f64x4) -> f64x4 { /// Add packed single-precision (32-bit) floating-point elements in `a` and `b`. #[inline(always)] #[target_feature = "+avx"] +#[cfg_attr(test, assert_instr(vaddps))] pub fn _mm256_add_ps(a: f32x8, b: f32x8) -> f32x8 { a + b } @@ -22,6 +24,7 @@ pub fn _mm256_add_ps(a: f32x8, b: f32x8) -> f32x8 { /// floating-point elements in `a` to/from packed elements in `b`. #[inline(always)] #[target_feature = "+avx"] +#[cfg_attr(test, assert_instr(vaddsubpd))] pub fn _mm256_addsub_pd(a: f64x4, b: f64x4) -> f64x4 { unsafe { addsubpd256(a, b) } }