@@ -763,7 +763,7 @@ multiclass SIMDConditionInt<string name, CondCode cond, bits<32> baseInst> {
763763multiclass SIMDConditionFP<string name, CondCode cond, bits<32> baseInst> {
764764 defm "" : SIMDCondition<F32x4, name, cond, baseInst>;
765765 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 )>;
767767}
768768
769769// Equality: eq
@@ -1218,7 +1218,7 @@ multiclass SIMDUnaryFP<SDNode node, string name, bits<32> baseInst> {
12181218 // Unlike F32x4 and F64x2 there's not a gap in the opcodes between "neg" and
12191219 // "sqrt" so subtract one from the offset.
12201220 defm "" : HalfPrecisionUnary<F16x8, node, name,
1221- !add(baseInst,!if(!eq(name, "sqrt"), 80, 81 ))>;
1221+ !add(baseInst,!if(!eq(name, "sqrt"), 79, 80 ))>;
12221222}
12231223
12241224// Absolute value: abs
@@ -1239,10 +1239,10 @@ defm CEIL : SIMDUnary<F64x2, fceil, "ceil", 0x74>;
12391239defm FLOOR : SIMDUnary<F64x2, ffloor, "floor", 0x75>;
12401240defm TRUNC: SIMDUnary<F64x2, ftrunc, "trunc", 0x7a>;
12411241defm 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 >;
12461246
12471247// WebAssembly doesn't expose inexact exceptions, so map frint to fnearbyint.
12481248def : 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)>;
12611261multiclass SIMDBinaryFP<SDPatternOperator node, string name, bits<32> baseInst> {
12621262 defm "" : SIMDBinary<F32x4, node, name, baseInst>;
12631263 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 )>;
12651265}
12661266
12671267// Addition: add
@@ -1362,8 +1362,8 @@ multiclass HalfPrecisionConvert<Vec vec, Vec arg, SDPatternOperator op,
13621362// Floating point to integer with saturation: trunc_sat
13631363defm "" : SIMDConvert<I32x4, F32x4, fp_to_sint, "trunc_sat_f32x4_s", 248>;
13641364defm "" : 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 >;
13671367
13681368// Support the saturating variety as well.
13691369def 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>;
13941394defm "" : SIMDConvert<F32x4, I32x4, uint_to_fp, "convert_i32x4_u", 251>;
13951395defm "" : SIMDConvert<F64x2, I32x4, convert_low_s, "convert_low_i32x4_s", 0xfe>;
13961396defm "" : 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 >;
13991399
14001400// Extending operations
14011401// 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>
15381538
15391539defm "" : SIMDMADD<F32x4, 0x105, 0x106, [HasRelaxedSIMD]>;
15401540defm "" : SIMDMADD<F64x2, 0x107, 0x108, [HasRelaxedSIMD]>;
1541- defm "" : SIMDMADD<F16x8, 0x146, 0x147 , [HasFP16]>;
1541+ defm "" : SIMDMADD<F16x8, 0x14e, 0x14f , [HasFP16]>;
15421542
15431543//===----------------------------------------------------------------------===//
15441544// Laneselect
0 commit comments