• bmeurer's avatar
    [turbofan][x64] Improve code generation for Float64LessThan with Float64Abs. · cdf9a406
    bmeurer authored
    During instruction selection, match the pattern
    
      Float64LessThan(#0.0, Float64Abs(x))
    
    which TurboFan generates for NumberToBoolean in the general case,
    and which evaluates to false if x is 0, -0 or NaN, and compile this
    to a simple (v)ucomisd using not_equal flags condition, which avoids
    the costly Float64Abs.
    
    Also consistently generate this pattern in TurboFan and the code
    stubs/interpreter for ToBoolean.
    
    R=mstarzinger@chromium.org
    BUG=v8:5267
    
    Review-Url: https://codereview.chromium.org/2473923003
    Cr-Commit-Position: refs/heads/master@{#40740}
    cdf9a406
instruction-selector-x64.cc 80.4 KB