Skip to content
  • Manman Ren's avatar
    X86: peephole optimization to remove cmp instruction · 879ca9d4
    Manman Ren authored
    This patch will optimize the following:
      sub r1, r3
      cmp r3, r1 or cmp r1, r3
      bge L1
    TO
      sub r1, r3
      bge L1 or ble L1
    
    If the branch instruction can use flag from "sub", then we can eliminate
    the "cmp" instruction.
    
    llvm-svn: 157831
    879ca9d4
Loading