Skip to content

Commit c4582c8

Browse files
committed
[cg_clif]: Fix codegen of f128 to i128 casts
Correct name for intrinsic that converts f128 to u128 Use `to_signed` instead of `from_signed` to ensure proper intrinsic selected for u128/i128
1 parent 5d22008 commit c4582c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_cranelift/src/codegen_f16_f128.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pub(crate) fn codegen_cast(
208208
let ret_ty = if to_ty.bits() < 32 { types::I32 } else { to_ty };
209209
let name = format!(
210210
"__fix{sign}tf{size}i",
211-
sign = if from_signed { "" } else { "un" },
211+
sign = if to_signed { "" } else { "uns" },
212212
size = match ret_ty {
213213
types::I32 => 's',
214214
types::I64 => 'd',

0 commit comments

Comments
 (0)