rust/tests/codegen/intrinsics/mask.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
374 B
Rust
Raw Normal View History

2022-12-30 14:11:30 -06:00
// compile-flags: -Copt-level=0
#![crate_type = "lib"]
#![feature(core_intrinsics)]
// CHECK-LABEL: @mask_ptr
2022-12-30 14:11:30 -06:00
// CHECK-SAME: [[WORD:i[0-9]+]] %mask
#[no_mangle]
pub fn mask_ptr(ptr: *const u16, mask: usize) -> *const u16 {
// CHECK: call
2023-07-27 16:44:13 -05:00
// CHECK-SAME: @llvm.ptrmask.{{p0|p0i8}}.[[WORD]](ptr {{%ptr|%1}}, [[WORD]] %mask)
core::intrinsics::ptr_mask(ptr, mask)
}