Skip to content
  • Bill Wendling's avatar
    A problem that's exposed when machine LICM is enabled. Consider this code: · c737e463
    Bill Wendling authored
    LBB1_3:   # bb
    ...
            xorl    %ebp, %ebp
            subl    (%ebx), %ebp
    ...
            incl    %ecx
            cmpl    %edi, %ecx
            jl      LBB1_3  # bb
    
    Whe using machine LICM, LLVM converts it into:
    
            xorl %esi, %esi
    LBB1_3: # bb
    ...
            movl    %esi, %ebp
            subl    (%ebx), %ebp
    ...
            incl    %ecx
            cmpl    %edi, %ecx
            jl      LBB1_3  # bb
    
    Two address conversion inserts the copy instruction. However, it's cheaper to
    rematerialize it, and remat helps reduce register pressure.
    
    llvm-svn: 51562
    c737e463
Loading