Translate WASM iTxN.gt_s to CLIF

This commit is contained in:
Andrew Brown
2019-10-24 17:13:29 -07:00
parent c454c3c771
commit f053595748

View File

@@ -1176,9 +1176,18 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
let bitcast_b = optionally_bitcast_vector(b, type_of(op), builder);
state.push1(builder.ins().icmp(IntCC::NotEqual, bitcast_a, bitcast_b))
}
Operator::I8x16GtS | Operator::I16x8GtS | Operator::I32x4GtS => {
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::SignedGreaterThan, bitcast_a, bitcast_b),
)
}
Operator::I8x16LtS
| Operator::I8x16LtU
| Operator::I8x16GtS
| Operator::I8x16GtU
| Operator::I8x16LeS
| Operator::I8x16LeU
@@ -1186,7 +1195,6 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
| Operator::I8x16GeU
| Operator::I16x8LtS
| Operator::I16x8LtU
| Operator::I16x8GtS
| Operator::I16x8GtU
| Operator::I16x8LeS
| Operator::I16x8LeU
@@ -1194,7 +1202,6 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
| Operator::I16x8GeU
| Operator::I32x4LtS
| Operator::I32x4LtU
| Operator::I32x4GtS
| Operator::I32x4GtU
| Operator::I32x4LeS
| Operator::I32x4LeU