• Benedikt Meurer's avatar
    Revert "[turbofan][x64] Reduce compare-zero followed by flags-setting binop" · b2dc9468
    Benedikt Meurer authored
    This reverts commit 42334363.
    
    Reason for revert: Seems to lead to floating point exceptions, i.e. with this code:
    
    ```js
    __v_0 = 'x'.repeat();
    var __f_1 = (function __f_0() {
      "use asm";
      function __f_1(__v_5, __v_0) {
        __v_5 = __v_5 | 0;
        __v_0 = __v_0 | 0;
        return ((__v_5 >>> 4) % (__v_0 >>> 1073741824)) | -1073741825;
      }
      return { __f_1: __f_1 };
    })().__f_1;
      for (var __v_5 = 0; __v_5 < 4294967296; __v_5 += 3999773) {__v_5 % __v_0 | 0, __f_1();
      }
    ```
    
    Running with UBSan via `d8-ubsan-vptr-linux-release-v8-component-53134/d8 --random-seed=54105979 --disable-in-process-stack-traces --stress-marking=100 fuzz-02382.js`
    
    Original change's description:
    > [turbofan][x64] Reduce compare-zero followed by flags-setting binop
    > 
    > On IA architecture, arithmetic and shifting operations set the flags
    > according to the computation result.
    > 
    >     subl rsi,0x1
    >     REX.W movq rbx,[rbx+0x17]
    >     cmpl rsi, 0                       <-- TO BE REDUCED
    >     jnz 0x3f54d2dcef0
    > ==>
    >     REX.W movq rbx,[rbx+0x17]
    >     subl rsi,0x1
    >     jnz 0x3f54d2dcef0
    > &
    >     orl rdx,rbx
    >     cmpl rdx,0x0                      <-- TO BE REDUCED
    >     jnz 0x3f54d22b0f5
    > ==>
    >     orl rdx,rbx
    >     jnz 0x3f54d22b0f5
    > 
    > Change-Id: If69c023712212ad7b9fa8b29f4b98274f7885e35
    > Reviewed-on: https://chromium-review.googlesource.com/1051445
    > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    > Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
    > Cr-Commit-Position: refs/heads/master@{#53118}
    
    TBR=bmeurer@chromium.org,kanghua.yu@intel.com
    
    # Not skipping CQ checks because original CL landed > 1 day ago.
    
    Change-Id: I8a177b9268a2fefcd6877d8f33134e7e0c980926
    Reviewed-on: https://chromium-review.googlesource.com/1057067Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53137}
    b2dc9468
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni 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...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython 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...
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...