• zhengxing.li's avatar
    X87: Emit memory operands for cmp and test on ia32 and x64 when it makes sense. · e1b9058f
    zhengxing.li authored
      port 0e43ff56 (r34187)
    
      original commit message:
      The InstructionSelector now associates an effect level to every node in a block.
    
      The effect level of a node is the number of non-eliminatable nodes encountered from the beginning of the block to the node itself.
    
      With this change, on ia32 and x64, a load from memory into a register can be replaced by a memory operand if all of the following conditions hold:
    
      1. The only use of the load is in a 32 or 64 bit word comparison.
      2. The user node and the load node belong to the same block.
      3. The values of the operands have the same size (i.e., no need to zero-extend or sign-extend the result of the load).
    
    BUG=
    
    Review URL: https://codereview.chromium.org/1724473004
    
    Cr-Commit-Position: refs/heads/master@{#34204}
    e1b9058f
instruction-selector-x87.cc 47.8 KB