• pierre.langlois's avatar
    [arm64] Optimize fcmp when lhs operand is #0.0 · e28ae8ca
    pierre.langlois authored
    This patch checks the type of the lhs operand of a floating point
    comparison, and commutes the operands if it is #0.0.  It allows us to
    optimize a comparison with zero, as the fcmp instruction accepts #0.0 as
    rhs operand.
    
    Code before for "0.0 < 0.123":
    ------------------------------
    fmov d1, xzr
    ldr d0, pc+96
    fcmp d1, d0
    b.lo #+0xc
    
    Code after:
    -----------
    ldr d0, pc+92
    fcmp d0, #0.0
    b.gt #+0xc
    
    Before this patch, we used unsigned condition codes for floating point
    comparisons, but the unordered case was not correctly commuted.
    
    Review URL: https://codereview.chromium.org/1356283003
    
    Cr-Commit-Position: refs/heads/master@{#30881}
    e28ae8ca
Name
Last commit
Last update
..
base Loading commit data...
compiler Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
DEPS Loading commit data...
atomic-utils-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
counters-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
unittests.gyp Loading commit data...
unittests.status Loading commit data...