diff options
| author | Caleb Zulawski <caleb.zulawski@gmail.com> | 2023-07-28 09:46:16 -0400 |
|---|---|---|
| committer | Caleb Zulawski <caleb.zulawski@gmail.com> | 2023-07-28 09:46:16 -0400 |
| commit | ce4a48f41f4555ad56be404e2e28c86ed4fea4c6 (patch) | |
| tree | 43d9c8d0d1a325b6d01d67e4c257499047bf662c /compiler/rustc_codegen_llvm/src | |
| parent | 4709ca2bed491523c06e5b674822a965e3649fea (diff) | |
| download | rust-ce4a48f41f4555ad56be404e2e28c86ed4fea4c6.tar.gz rust-ce4a48f41f4555ad56be404e2e28c86ed4fea4c6.zip | |
Use i1 instead of bool
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/intrinsic.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index 187214a93dd..623c08ce86b 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -2104,9 +2104,16 @@ fn generic_simd_intrinsic<'ll, 'tcx>( ); 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); |
