diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 77d35373a4..df1912e231 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1170,8 +1170,13 @@ pub fn translate_operator( let bitcast_b = optionally_bitcast_vector(b, type_of(op), builder); state.push1(builder.ins().icmp(IntCC::Equal, bitcast_a, bitcast_b)) } - Operator::I8x16Ne - | Operator::I8x16LtS + Operator::I8x16Ne | Operator::I16x8Ne | Operator::I32x4Ne => { + let (a, b) = state.pop2(); + let bitcast_a = optionally_bitcast_vector(a, type_of(op), builder); + let bitcast_b = optionally_bitcast_vector(b, type_of(op), builder); + state.push1(builder.ins().icmp(IntCC::NotEqual, bitcast_a, bitcast_b)) + } + Operator::I8x16LtS | Operator::I8x16LtU | Operator::I8x16GtS | Operator::I8x16GtU @@ -1179,7 +1184,6 @@ pub fn translate_operator( | Operator::I8x16LeU | Operator::I8x16GeS | Operator::I8x16GeU - | Operator::I16x8Ne | Operator::I16x8LtS | Operator::I16x8LtU | Operator::I16x8GtS @@ -1188,7 +1192,6 @@ pub fn translate_operator( | Operator::I16x8LeU | Operator::I16x8GeS | Operator::I16x8GeU - | Operator::I32x4Ne | Operator::I32x4LtS | Operator::I32x4LtU | Operator::I32x4GtS