Use i1 instead of bool

This commit is contained in:
Caleb Zulawski 2023-07-28 09:46:16 -04:00
parent 4709ca2bed
commit ce4a48f41f

View File

@ -2104,9 +2104,16 @@ macro_rules! arith_unary {
);
return Ok(if matches!(name, sym::simd_ctlz | sym::simd_cttz) {
let fn_ty = bx.type_func(&[vec_ty, bx.type_bool()], vec_ty);
let fn_ty = bx.type_func(&[vec_ty, bx.type_i1()], vec_ty);
let f = bx.declare_cfn(llvm_intrinsic, llvm::UnnamedAddr::No, fn_ty);
bx.call(fn_ty, None, None, f, &[args[0].immediate(), bx.const_bool(false)], None)
bx.call(
fn_ty,
None,
None,
f,
&[args[0].immediate(), bx.const_int(bx.type_i1(), 0)],
None,
)
} else {
let fn_ty = bx.type_func(&[vec_ty], vec_ty);
let f = bx.declare_cfn(llvm_intrinsic, llvm::UnnamedAddr::No, fn_ty);