Skip to content

Commit 2740648

Browse files
committed
added fp16 madd intrinsic patterns
1 parent 4cca911 commit 2740648

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,6 +1676,12 @@ multiclass HALF_PRECISION_SIMDMADD<Vec vec, bits<32> simdopA, bits<32> simdopS,
16761676
}
16771677
defm "" : HALF_PRECISION_SIMDMADD<F16x8, 0x14e, 0x14f, [HasFP16]>;
16781678

1679+
// TODO: I think separate intrinsics should be introduced for these FP16 operations.
1680+
def : Pat<(v8f16 (int_wasm_relaxed_madd (v8f16 V128:$a), (v8f16 V128:$b), (v8f16 V128:$c))),
1681+
(MADD_F16x8 V128:$a, V128:$b, V128:$c)>;
1682+
def : Pat<(v8f16 (int_wasm_relaxed_nmadd (v8f16 V128:$a), (v8f16 V128:$b), (v8f16 V128:$c))),
1683+
(NMADD_F16x8 V128:$a, V128:$b, V128:$c)>;
1684+
16791685
//===----------------------------------------------------------------------===//
16801686
// Laneselect
16811687
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)