diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-12-14 19:30:46 +0100 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-12-14 19:30:46 +0100 |
| commit | 949699931e4370d4a0d65b896bb5d73f35609528 (patch) | |
| tree | 20c124f7a91d207bf24c9594ee42981a7caea325 /compiler/rustc_codegen_cranelift/src/cast.rs | |
| parent | ba64ba8b0dfd57f7d6d7399d0df7ded37d2af18d (diff) | |
| parent | 2bb3996244cf1b89878da9e39841e9f6bf061602 (diff) | |
| download | rust-949699931e4370d4a0d65b896bb5d73f35609528.tar.gz rust-949699931e4370d4a0d65b896bb5d73f35609528.zip | |
Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into sync_cg_clif-2022-12-14
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/cast.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/cast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/cast.rs b/compiler/rustc_codegen_cranelift/src/cast.rs index bad5d1f08a9..5091c5a9fed 100644 --- a/compiler/rustc_codegen_cranelift/src/cast.rs +++ b/compiler/rustc_codegen_cranelift/src/cast.rs @@ -149,7 +149,7 @@ pub(crate) fn clif_int_or_float_cast( } let is_not_nan = fx.bcx.ins().fcmp(FloatCC::Equal, from, from); - let zero = fx.bcx.ins().iconst(to_ty, 0); + let zero = type_zero_value(&mut fx.bcx, to_ty); fx.bcx.ins().select(is_not_nan, val, zero) } else if from_ty.is_float() && to_ty.is_float() { // float -> float |
