Description[turbofan] Introduce dedicated NumberToBoolean operator.
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
Committed: https://crrev.com/c071a8f0ca096c28a1c6bf7a5d1304f121d027ff
Cr-Commit-Position: refs/heads/master@{#39194}
Patch Set 1 #Patch Set 2 : Fix unittest. #
Messages
Total messages: 16 (10 generated)
|