• zhengxing.li's avatar
    [turbofan][X64] Movzxbl/Movsxbl/Movzxwl/Movsxwl also zero extend to 64bit. · 3145befb
    zhengxing.li authored
      movzxbl/movsxbl/movzxwl/movsxwl operations implicitly zero-extend to 64-bit on x64, So It's not necessary to generate a "movl" instruction to zero-extend.
    
      For example, movzxbl/movl instruction sequence occurs frequently in v8 interpreter bytecode handler.
      such as:
      kind = BYTECODE_HANDLER
      name = LdaSmi
      compiler = turbofan
      Instructions (size = 76)
      0x184870a3ce40 0 430fbe442601 movsxbl rax,[r14+r12*1+0x1]
      0x184870a3ce46 6 48c1e020 REX.W shlq rax, 32
      0x184870a3ce4a 10 498d5c2402 REX.W leaq rbx,[r12+0x2]
      0x184870a3ce4f 15 420fb61433 movzxbl rdx,[rbx+r14*1]
      0x184870a3ce54 20 8bd2 movl rdx,rdx          <---------------------- here is a redundant "movl"
      0x184870a3ce56 22 4883fa1e REX.W cmpq rdx,0x1e
      0x184870a3ce5a 26 0f8518000000 jnz 56 (0x184870a3ce78)
    
      This CL also referenced to CL #36038 (https://codereview.chromium.org/1950013003 ) for adding test cases.
    
    BUG=
    
    Review-Url: https://codereview.chromium.org/2427483002
    Cr-Commit-Position: refs/heads/master@{#40375}
    3145befb
Name
Last commit
Last update
..
base Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
wasm Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
cancelable-tasks-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
counters-unittest.cc Loading commit data...
eh-frame-iterator-unittest.cc Loading commit data...
eh-frame-writer-unittest.cc Loading commit data...
locked-queue-unittest.cc Loading commit data...
register-configuration-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
source-position-table-unittest.cc Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
unittests.gyp Loading commit data...
unittests.isolate Loading commit data...
unittests.status Loading commit data...
value-serializer-unittest.cc Loading commit data...