diff options
author | Max Graey <maxgraey@gmail.com> | 2022-09-15 23:17:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 13:17:51 -0700 |
commit | 2fdb22bc26185e94ccd775bbfe8ea271be03df45 (patch) | |
tree | 7c9935698de035f905eafc247f547af6acd3aea1 /src/ir | |
parent | 0d8aff6d85850a5f05ed6f5dc359f1b93120769d (diff) | |
download | binaryen-2fdb22bc26185e94ccd775bbfe8ea271be03df45.tar.gz binaryen-2fdb22bc26185e94ccd775bbfe8ea271be03df45.tar.bz2 binaryen-2fdb22bc26185e94ccd775bbfe8ea271be03df45.zip |
[OptimizeInstructions] More canonizations for floating points (#5033)
x - C -> x + (-C)
min(C, x) -> min(x, C)
max(C, x) -> max(x, C)
And remove redundant rules
Diffstat (limited to 'src/ir')
-rw-r--r-- | src/ir/properties.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/properties.h b/src/ir/properties.h index 1d2937d81..a32a737ef 100644 --- a/src/ir/properties.h +++ b/src/ir/properties.h @@ -42,8 +42,12 @@ inline bool isSymmetric(Binary* binary) { case EqInt64: case NeInt64: + case MinFloat32: + case MaxFloat32: case EqFloat32: case NeFloat32: + case MinFloat64: + case MaxFloat64: case EqFloat64: case NeFloat64: return true; |