summaryrefslogtreecommitdiffstats
path: root/tests/codegen/intrinsics/mask.rs
blob: 8f93da2e5da437f616250d863f23d71b8c24c8de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// compile-flags: -Copt-level=0
#![crate_type = "lib"]
#![feature(core_intrinsics)]

// CHECK-LABEL: @mask_ptr
// CHECK-SAME: [[WORD:i[0-9]+]] %mask
#[no_mangle]
pub fn mask_ptr(ptr: *const u16, mask: usize) -> *const u16 {
    // CHECK: call
    // CHECK-SAME: @llvm.ptrmask.{{p0|p0i8}}.[[WORD]]({{ptr|i8\*}} {{%ptr|%1}}, [[WORD]] %mask)
    core::intrinsics::ptr_mask(ptr, mask)
}