• Leszek Swirski's avatar
    [maglev] Add more Int32/Float64 arithmetic nodes · 47090774
    Leszek Swirski authored
    Add Int32/Float64 nodes for:
    
      * Subtract
      * Multiply
      * Divide
    
    and additionally Int32 nodes for
    
      * BitwiseOr/And/Xor
      * ShiftLeft/Right/RightLogical
    
    The latter ones don't have Float64 equivalents since they're implicitly
    Int32 operations. In the future we'll add support for Number feedback by
    adding Float64-to-Int32 conversions and using the Int32 nodes.
    
    The divide node does an Int32 division and deopts if there's a remainder
    to the division -- we may want to make it output a Float64 instead if we
    think that's more likely in real-world code. There's also no peephole
    optimisations for constant operations, which would generate much better
    code, especially for shifts.
    
    Bug: v8:7700
    Change-Id: Ief1d24b46557cf4d2b7929ed50956df7b0d25992
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652301
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#80670}
    47090774
shift-right-smi.js 1.67 KB