Skip to content

Commit 4872334

Browse files
committed
Translate Wasm's f32x4.convert_i32x4s to Cranelift's fcvt_from_sint
1 parent b1fad28 commit 4872334

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cranelift/wasm/src/code_translator.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
14671467
let a = pop1_with_bitcast(state, type_of(op), builder);
14681468
state.push1(builder.ins().fabs(a))
14691469
}
1470+
Operator::F32x4ConvertI32x4S => {
1471+
let a = pop1_with_bitcast(state, I32X4, builder);
1472+
state.push1(builder.ins().fcvt_from_sint(F32X4, a))
1473+
}
14701474
Operator::I8x16Shl
14711475
| Operator::I8x16ShrS
14721476
| Operator::I8x16ShrU
@@ -1477,7 +1481,6 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
14771481
| Operator::I32x4TruncSatF32x4U
14781482
| Operator::I64x2TruncSatF64x2S
14791483
| Operator::I64x2TruncSatF64x2U
1480-
| Operator::F32x4ConvertI32x4S
14811484
| Operator::F32x4ConvertI32x4U
14821485
| Operator::F64x2ConvertI64x2S
14831486
| Operator::F64x2ConvertI64x2U { .. }

0 commit comments

Comments
 (0)