• bmeurer's avatar
    [turbofan] Introduce dedicated NumberToBoolean operator. · c071a8f0
    bmeurer authored
    Previously we always lowered JSToBoolean(x:Number) to the subgraph
    NumberLessThan(0.0, NumberAbs(x)), which deals with both 0, -0 and
    NaNs appropriately. However this doesn't always generate the best,
    especially when we can later derive from feedback that x is always
    an Integral32 value, where the ideal code would be just a single
    comparison to 0 w/o the absolute value computation.
    
    R=mvstanton@chromium.org
    BUG=v8:5267,v8:5270
    
    Review-Url: https://codereview.chromium.org/2309953002
    Cr-Commit-Position: refs/heads/master@{#39194}
    c071a8f0
typer.cc 50.6 KB