• pierre.langlois's avatar
    [arm] Optimize vcmp when lhs operand is #0.0 · d1472d65
    pierre.langlois authored
    This patch checks the type of the lhs operand of a floating point
    comparison for ARM, and commutes the operands if it is #0.0.  It allows
    us to optimize a comparison with zero, as the vcmp instruction
    accepts #0.0 as rhs operand.
    
    Code before for "0.0 < 0.123":
    ------------------------------
    movw ip, #29360
    movt ip, #37224
    movw r9, #31981
    movt r9, #16319
    vmov d0, ip, r9
    mov ip, #0
    vmov d1, ip, ip
    vcmp.f64 d1, d0
    vmrs APSR, FPSCR
    bcc +12
    
    Code after:
    -----------
    movw ip, #29360
    movt ip, #37224
    movw r9, #31981
    movt r9, #16319
    vmov d0, ip, r9
    vcmp.f64 d0, #0.0
    vmrs APSR, FPSCR
    bgt +12
    
    BUG=
    
    Review URL: https://codereview.chromium.org/1361913003
    
    Cr-Commit-Position: refs/heads/master@{#30911}
    d1472d65
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...