]> git.lizzy.rs Git - rust.git/blob - tests/codegen/sse42-implies-crc32.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / codegen / sse42-implies-crc32.rs
1 // only-x86_64
2 // min-llvm-version: 14.0
3 // compile-flags: -Copt-level=3
4
5 #![crate_type = "lib"]
6
7 #[cfg(target_arch = "x86_64")]
8 #[target_feature(enable = "sse4.2")]
9 #[no_mangle]
10 pub unsafe fn crc32sse(v: u8) -> u32 {
11     use std::arch::x86_64::*;
12     let out = !0u32;
13     _mm_crc32_u8(out, v)
14 }
15
16 // CHECK: attributes #0 {{.*"target-features"="\+sse4.2,\+crc32"}}