• bmeurer's avatar
    Revert of binary-operator-reducer: reduce mul+div(shift) (patchset #11... · 5d18e93b
    bmeurer authored
    Revert of binary-operator-reducer: reduce mul+div(shift) (patchset #11 id:200001 of https://codereview.chromium.org/1350223006/ )
    
    Reason for revert:
    This is also unsound for the reasons outlined in
    https://codereview.chromium.org/1473073004/
    Will help Fedor to implement a solution based on simplified operators.
    
    Original issue's description:
    > binary-operator-reducer: reduce mul+div(shift)
    >
    > Reduction Input:
    >
    >     ChangeInt32ToFloat64=>          TruncateFloat64ToInt32
    >                          Float64Mul=>
    >     ChangeInt32ToFloat64=>          Float64Div=>TruncateFloat64ToInt32
    >
    > Output:
    >
    >          =>  TruncateInt64ToInt32
    > Int64Mul
    >          =>  Int64Shr => TruncateInt64ToInt32
    >
    > Test code:
    >
    >     function mul(a, b) {
    >       var l = a & 0x3ffffff;
    >       var h = b & 0x3ffffff;
    >       var m = l * h;
    >
    >       var rl = m & 0x3ffffff;
    >       var rh = (m / 0x4000000) | 0;
    >
    >       return rl | rh;
    >     }
    >
    >     mul(1, 2);
    >     var a0 = mul(0x3ffffff, 0x3ffffff);
    >     mul(0x0, 0x0);
    >     %OptimizeFunctionOnNextCall(mul);
    >     var a1 = mul(0x3ffffff, 0x3ffffff);
    >
    >     print(a0 + ' == ' + a1);
    >
    > BUG=
    > R=mstarzinger@chromium.org
    >
    > Committed: https://crrev.com/461e5b49d022335a7fc4e9d172397a4bd48b93d4
    > Cr-Commit-Position: refs/heads/master@{#31899}
    
    TBR=mstarzinger@chromium.org,danno@chromium.org,titzer@chromium.org,fedor@indutny.com
    NOPRESUBMIT=true
    NOTREECHECKS=true
    NOTRY=true
    BUG=
    
    Review URL: https://codereview.chromium.org/1478923002
    
    Cr-Commit-Position: refs/heads/master@{#32313}
    5d18e93b
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
docs 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/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE 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...
Makefile.nacl 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...