Skip to content

Commit 8df0b44

Browse files
Fabian-GruenbichlerFabian Grünbichler
authored andcommitted
zlib-rs: properly guard AVX512 tests
the runtime checker returns true if those target features are enabled, so guard the tests which assert on the runtime check being true accordingly. Signed-off-by: Fabian Grünbichler <[email protected]>
1 parent f4bbe67 commit 8df0b44

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

zlib-rs/src/adler32/avx2.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ unsafe fn helper_32_bytes(mut adler0: u32, mut adler1: u32, src: &[__m256i]) ->
145145
}
146146

147147
#[cfg(test)]
148-
#[cfg(target_feature = "avx2")]
148+
#[cfg(all(
149+
target_feature = "avx2",
150+
target_feature = "bmi1",
151+
target_feature = "bmi2"
152+
))]
149153
mod test {
150154
use super::*;
151155

0 commit comments

Comments
 (0)