• jarin's avatar
    [turbofan] Propagate minus-zero truncation in representation inference. · 18f169d4
    jarin authored
    This introduces a new truncation bit for truncation of minus-zero to zero.
    
    At the moment it is only used to handle the limit cases of deopt, such as the
    one in the Google maps workload (see simplified version below), where the -q
    (which is desugared to q * -1.0) currently deoptimizes because the result would
    produce minus zero. To handle this situation, we exploit the knowledge that
    righthand side of + cannot be -0, so even if lefthand side was -0, the result
    would still be 0 (so the + operation cannot distinguish between left hand side
    0 and -0).
    
    function f(q) {
      q -= 4;
      return (-q) + q;
    }
    
    f(10);
    f(10);
    %OptimizeFunctionOnNextCall(f);
    f(4);
    
    Review-Url: https://codereview.chromium.org/2734253002
    Cr-Commit-Position: refs/heads/master@{#43661}
    18f169d4
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...