summaryrefslogtreecommitdiff
path: root/src/ir/cost.h
diff options
context:
space:
mode:
authorBrendan Dahl <brendan.dahl@gmail.com>2024-08-21 15:03:46 -0700
committerGitHub <noreply@github.com>2024-08-21 22:03:46 +0000
commit99db0d9c7c33bcea7b7730bb5684f41176146f83 (patch)
tree3986c87e5533421be50673710d1acc6edba29dda /src/ir/cost.h
parent21ddb853559bde490b4f02db576d4b8cd48d3106 (diff)
downloadbinaryen-99db0d9c7c33bcea7b7730bb5684f41176146f83.tar.gz
binaryen-99db0d9c7c33bcea7b7730bb5684f41176146f83.tar.bz2
binaryen-99db0d9c7c33bcea7b7730bb5684f41176146f83.zip
[FP16] Implement arithmetic operations. (#6855)
Specified at https://github.com/WebAssembly/half-precision/blob/main/proposals/half-precision/Overview.md
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r--src/ir/cost.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h
index 11370acab..0b2b6315b 100644
--- a/src/ir/cost.h
+++ b/src/ir/cost.h
@@ -475,6 +475,22 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> {
case ExtMulHighSVecI64x2:
case ExtMulLowUVecI64x2:
case ExtMulHighUVecI64x2:
+ case AddVecF16x8:
+ case SubVecF16x8:
+ ret = 1;
+ break;
+ case MulVecF16x8:
+ ret = 2;
+ break;
+ case DivVecF16x8:
+ ret = 3;
+ break;
+ case MinVecF16x8:
+ case MaxVecF16x8:
+ case PMinVecF16x8:
+ case PMaxVecF16x8:
+ ret = 1;
+ break;
case AddVecF32x4:
case SubVecF32x4:
ret = 1;