Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d628444

Browse files
committed
Remove workaround for bytecodealliance/wasmtime#3963
1 parent e97e40d commit d628444

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/cast.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,8 @@ pub(crate) fn clif_int_or_float_cast(
149149
}
150150

151151
let is_not_nan = fx.bcx.ins().fcmp(FloatCC::Equal, from, from);
152-
if to_ty == types::I128 {
153-
// FIXME(bytecodealliance/wasmtime#3963): select.i128 on fcmp eq miscompiles
154-
let (lsb, msb) = fx.bcx.ins().isplit(val);
155-
let zero = fx.bcx.ins().iconst(types::I64, 0);
156-
let lsb = fx.bcx.ins().select(is_not_nan, lsb, zero);
157-
let msb = fx.bcx.ins().select(is_not_nan, msb, zero);
158-
fx.bcx.ins().iconcat(lsb, msb)
159-
} else {
160-
let zero = fx.bcx.ins().iconst(to_ty, 0);
161-
fx.bcx.ins().select(is_not_nan, val, zero)
162-
}
152+
let zero = fx.bcx.ins().iconst(to_ty, 0);
153+
fx.bcx.ins().select(is_not_nan, val, zero)
163154
} else if from_ty.is_float() && to_ty.is_float() {
164155
// float -> float
165156
match (from_ty, to_ty) {

0 commit comments

Comments
 (0)