@@ -763,7 +763,7 @@ multiclass SIMDConditionInt<string name, CondCode cond, bits<32> baseInst> {
763
763
multiclass SIMDConditionFP<string name, CondCode cond, bits<32> baseInst> {
764
764
defm "" : SIMDCondition<F32x4, name, cond, baseInst>;
765
765
defm "" : SIMDCondition<F64x2, name, cond, !add(baseInst, 6)>;
766
- defm "" : HalfPrecisionCondition<F16x8, name, cond, !add(baseInst, 255 )>;
766
+ defm "" : HalfPrecisionCondition<F16x8, name, cond, !add(baseInst, 246 )>;
767
767
}
768
768
769
769
// Equality: eq
@@ -1218,7 +1218,7 @@ multiclass SIMDUnaryFP<SDNode node, string name, bits<32> baseInst> {
1218
1218
// Unlike F32x4 and F64x2 there's not a gap in the opcodes between "neg" and
1219
1219
// "sqrt" so subtract one from the offset.
1220
1220
defm "" : HalfPrecisionUnary<F16x8, node, name,
1221
- !add(baseInst,!if(!eq(name, "sqrt"), 80, 81 ))>;
1221
+ !add(baseInst,!if(!eq(name, "sqrt"), 79, 80 ))>;
1222
1222
}
1223
1223
1224
1224
// Absolute value: abs
@@ -1239,10 +1239,10 @@ defm CEIL : SIMDUnary<F64x2, fceil, "ceil", 0x74>;
1239
1239
defm FLOOR : SIMDUnary<F64x2, ffloor, "floor", 0x75>;
1240
1240
defm TRUNC: SIMDUnary<F64x2, ftrunc, "trunc", 0x7a>;
1241
1241
defm NEAREST: SIMDUnary<F64x2, fnearbyint, "nearest", 0x94>;
1242
- defm CEIL : HalfPrecisionUnary<F16x8, fceil, "ceil", 0x13c >;
1243
- defm FLOOR : HalfPrecisionUnary<F16x8, ffloor, "floor", 0x13d >;
1244
- defm TRUNC : HalfPrecisionUnary<F16x8, ftrunc, "trunc", 0x13e >;
1245
- defm NEAREST : HalfPrecisionUnary<F16x8, fnearbyint, "nearest", 0x13f >;
1242
+ defm CEIL : HalfPrecisionUnary<F16x8, fceil, "ceil", 0x133 >;
1243
+ defm FLOOR : HalfPrecisionUnary<F16x8, ffloor, "floor", 0x134 >;
1244
+ defm TRUNC : HalfPrecisionUnary<F16x8, ftrunc, "trunc", 0x135 >;
1245
+ defm NEAREST : HalfPrecisionUnary<F16x8, fnearbyint, "nearest", 0x136 >;
1246
1246
1247
1247
// WebAssembly doesn't expose inexact exceptions, so map frint to fnearbyint.
1248
1248
def : Pat<(v4f32 (frint (v4f32 V128:$src))), (NEAREST_F32x4 V128:$src)>;
@@ -1261,7 +1261,7 @@ def : Pat<(v8f16 (froundeven (v8f16 V128:$src))), (NEAREST_F16x8 V128:$src)>;
1261
1261
multiclass SIMDBinaryFP<SDPatternOperator node, string name, bits<32> baseInst> {
1262
1262
defm "" : SIMDBinary<F32x4, node, name, baseInst>;
1263
1263
defm "" : SIMDBinary<F64x2, node, name, !add(baseInst, 12)>;
1264
- defm "" : HalfPrecisionBinary<F16x8, node, name, !add(baseInst, 80 )>;
1264
+ defm "" : HalfPrecisionBinary<F16x8, node, name, !add(baseInst, 89 )>;
1265
1265
}
1266
1266
1267
1267
// Addition: add
@@ -1362,8 +1362,8 @@ multiclass HalfPrecisionConvert<Vec vec, Vec arg, SDPatternOperator op,
1362
1362
// Floating point to integer with saturation: trunc_sat
1363
1363
defm "" : SIMDConvert<I32x4, F32x4, fp_to_sint, "trunc_sat_f32x4_s", 248>;
1364
1364
defm "" : SIMDConvert<I32x4, F32x4, fp_to_uint, "trunc_sat_f32x4_u", 249>;
1365
- defm "" : HalfPrecisionConvert<I16x8, F16x8, fp_to_sint, "trunc_sat_f16x8_s", 0x148 >;
1366
- defm "" : HalfPrecisionConvert<I16x8, F16x8, fp_to_uint, "trunc_sat_f16x8_u", 0x149 >;
1365
+ defm "" : HalfPrecisionConvert<I16x8, F16x8, fp_to_sint, "trunc_sat_f16x8_s", 0x145 >;
1366
+ defm "" : HalfPrecisionConvert<I16x8, F16x8, fp_to_uint, "trunc_sat_f16x8_u", 0x146 >;
1367
1367
1368
1368
// Support the saturating variety as well.
1369
1369
def trunc_s_sat32 : PatFrag<(ops node:$x), (fp_to_sint_sat $x, i32)>;
@@ -1394,8 +1394,8 @@ defm "" : SIMDConvert<F32x4, I32x4, sint_to_fp, "convert_i32x4_s", 250>;
1394
1394
defm "" : SIMDConvert<F32x4, I32x4, uint_to_fp, "convert_i32x4_u", 251>;
1395
1395
defm "" : SIMDConvert<F64x2, I32x4, convert_low_s, "convert_low_i32x4_s", 0xfe>;
1396
1396
defm "" : SIMDConvert<F64x2, I32x4, convert_low_u, "convert_low_i32x4_u", 0xff>;
1397
- defm "" : HalfPrecisionConvert<F16x8, I16x8, sint_to_fp, "convert_i16x8_s", 0x14a >;
1398
- defm "" : HalfPrecisionConvert<F16x8, I16x8, uint_to_fp, "convert_i16x8_u", 0x14b >;
1397
+ defm "" : HalfPrecisionConvert<F16x8, I16x8, sint_to_fp, "convert_i16x8_s", 0x147 >;
1398
+ defm "" : HalfPrecisionConvert<F16x8, I16x8, uint_to_fp, "convert_i16x8_u", 0x148 >;
1399
1399
1400
1400
// Extending operations
1401
1401
// TODO: refactor this to be uniform for i64x2 if the numbering is not changed.
@@ -1538,7 +1538,7 @@ multiclass SIMDMADD<Vec vec, bits<32> simdopA, bits<32> simdopS, list<Predicate>
1538
1538
1539
1539
defm "" : SIMDMADD<F32x4, 0x105, 0x106, [HasRelaxedSIMD]>;
1540
1540
defm "" : SIMDMADD<F64x2, 0x107, 0x108, [HasRelaxedSIMD]>;
1541
- defm "" : SIMDMADD<F16x8, 0x146, 0x147 , [HasFP16]>;
1541
+ defm "" : SIMDMADD<F16x8, 0x14e, 0x14f , [HasFP16]>;
1542
1542
1543
1543
//===----------------------------------------------------------------------===//
1544
1544
// Laneselect
0 commit comments