Skip to content
  • Evan Cheng's avatar
    Loosen up iv reuse to allow reuse of the same stride but a larger type when... · 7f3d0247
    Evan Cheng authored
    Loosen up iv reuse to allow reuse of the same stride but a larger type when truncating from the larger type to smaller type is free.
    e.g.
    Turns this loop:
    LBB1_1: # entry.bb_crit_edge
            xorl    %ecx, %ecx
            xorw    %dx, %dx
            movw    %dx, %si
    LBB1_2: # bb
            movl    L_X$non_lazy_ptr, %edi
            movw    %si, (%edi)
            movl    L_Y$non_lazy_ptr, %edi
            movw    %dx, (%edi)
    		addw    $4, %dx
    		incw    %si
    		incl    %ecx
    		cmpl    %eax, %ecx
    		jne     LBB1_2  # bb
    	
    into
    
    LBB1_1: # entry.bb_crit_edge
            xorl    %ecx, %ecx
            xorw    %dx, %dx
    LBB1_2: # bb
            movl    L_X$non_lazy_ptr, %esi
            movw    %cx, (%esi)
            movl    L_Y$non_lazy_ptr, %esi
            movw    %dx, (%esi)
            addw    $4, %dx
    		incl    %ecx
            cmpl    %eax, %ecx
            jne     LBB1_2  # bb
    
    llvm-svn: 43375
    7f3d0247
Loading