Skip to content
  • Manman Ren's avatar
    X86: replace SUB with CMP if possible · 9bccb64e
    Manman Ren authored
    This patch will optimize the following
            movq    %rdi, %rax
            subq    %rsi, %rax
            cmovsq  %rsi, %rdi
            movq    %rdi, %rax
    to
            cmpq    %rsi, %rdi
            cmovsq  %rsi, %rdi
            movq    %rdi, %rax
    
    Perform this optimization if the actual result of SUB is not used.
    
    rdar: 11540023
    llvm-svn: 157755
    9bccb64e
Loading