Do not use void pointer for ptr_mask intrinsic

I couldn't find where exactly it's documented, but apperantly pointers to void
type are invalid in llvm - void is only allowed as a return type of functions.
This commit is contained in:
Maybe Waffle 2022-08-18 22:21:53 +04:00
parent 55ba58cadb
commit 92b05db761
2 changed files with 3 additions and 4 deletions

View file

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