diff options
author | Alon Zakai <azakai@google.com> | 2022-04-01 10:45:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 10:45:41 -0700 |
commit | e6a62de43ef66b1c1ad0d740e3deeeb6365ded1b (patch) | |
tree | 5e39e9f287a54721b07ced96e7fd4a08d0ae0cee /src/passes/RedundantSetElimination.cpp | |
parent | 0102087b59a8ca5178437abc776c0499e16de8c7 (diff) | |
download | binaryen-e6a62de43ef66b1c1ad0d740e3deeeb6365ded1b.tar.gz binaryen-e6a62de43ef66b1c1ad0d740e3deeeb6365ded1b.tar.bz2 binaryen-e6a62de43ef66b1c1ad0d740e3deeeb6365ded1b.zip |
Use LiteralUtils::canMakeZero before calling makeZero (#4568)
Fixes #4562
Fixes #4564
Diffstat (limited to 'src/passes/RedundantSetElimination.cpp')
-rw-r--r-- | src/passes/RedundantSetElimination.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/RedundantSetElimination.cpp b/src/passes/RedundantSetElimination.cpp index 56fca4bee..90925edf2 100644 --- a/src/passes/RedundantSetElimination.cpp +++ b/src/passes/RedundantSetElimination.cpp @@ -175,9 +175,9 @@ struct RedundantSetElimination std::cout << "new param value for " << i << '\n'; #endif start[i] = getUniqueValue(); - } else if (type.isNonNullable()) { + } else if (!LiteralUtils::canMakeZero(type)) { #ifdef RSE_DEBUG - std::cout << "new unique value for non-nullable " << i << '\n'; + std::cout << "new unique value for non-zeroable " << i << '\n'; #endif start[i] = getUniqueValue(); } else { |