• Seth Brenith's avatar
    Check for zero-extended phi inputs during instruction selection · 5c0f7219
    Seth Brenith authored
    The 64-bit instruction selectors check whether the input value to
    a ChangeUint32ToUint64 node was produced by a node that sets the upper
    32 bits to zero, and if so, they avoid emitting an extra instruction to
    clear the upper bits. This change:
    
    1. Extends that existing mechanism to also include phi values: if all of
       the inputs to a phi value guarantee that the upper 32 bits are zero,
       then the phi value does too.
    2. Updates x64 to include non-negative int32 constants in the list of
       nodes that always clear the upper bits. I didn't add this to any
       other architecture because I'm less certain of how they resolve moves
       from constants.
    
    This change improves the speed of the Mono interpreter on x64 by about
    5%.
    
    Bug: v8:10606
    Change-Id: Ife8ce9c7330524e0b2fad836209a81180b4870e8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2382509Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#69706}
    5c0f7219
instruction-selector-mips64.cc 117 KB