• fedor's avatar
    [machine-operator-reducer] fix float truncation · 64efa2a9
    fedor authored
    Don't replace `TruncateFloat64ToInt32(RoundInt64ToFloat64(value))` with
    `value`. Generally, `value` may have a range bigger than the one that
    could fit into Int32. Replace it with `TruncateInt64ToInt32(value)`
    instead, and only if the `value` fits into Float64 without precision
    loss.
    
    Add missing mjsunit test for 52bit multiplication/division optimization
    that has landed in refs/heads/master@{#31899}.
    
    BUG=
    R=titzer@google.com
    
    Review URL: https://codereview.chromium.org/1433353006
    
    Cr-Commit-Position: refs/heads/master@{#32227}
    64efa2a9
math-52-mul-div.js 2.03 KB