diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2018-12-04 10:30:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 10:30:35 -0800 |
commit | bebbeb54f177bdc2cfdff71d6a256a35f2f2057b (patch) | |
tree | 80609eb177ddab4edae30323d42152e9ab59ba9b /src/ir/cost.h | |
parent | b4badb815ec844e438a05d501eafb6bb99383bc6 (diff) | |
download | binaryen-bebbeb54f177bdc2cfdff71d6a256a35f2f2057b.tar.gz binaryen-bebbeb54f177bdc2cfdff71d6a256a35f2f2057b.tar.bz2 binaryen-bebbeb54f177bdc2cfdff71d6a256a35f2f2057b.zip |
Implement nontrapping float-to-int instructions (#1780)
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r-- | src/ir/cost.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h index 6dabf2fcb..e28f535e7 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -141,7 +141,15 @@ struct CostAnalyzer : public Visitor<CostAnalyzer, Index> { case ExtendS16Int32: case ExtendS8Int64: case ExtendS16Int64: - case ExtendS32Int64: ret = 1; break; + case ExtendS32Int64: + case TruncSatSFloat32ToInt32: + case TruncSatUFloat32ToInt32: + case TruncSatSFloat64ToInt32: + case TruncSatUFloat64ToInt32: + case TruncSatSFloat32ToInt64: + case TruncSatUFloat32ToInt64: + case TruncSatSFloat64ToInt64: + case TruncSatUFloat64ToInt64: ret = 1; break; case SqrtFloat32: case SqrtFloat64: ret = 2; break; case InvalidUnary: WASM_UNREACHABLE(); |