Skip to content
  • Evan Cheng's avatar
    Teach LSR to optimize more loop exit compares, i.e. change them to use postinc... · 78a4eb84
    Evan Cheng authored
    Teach LSR to optimize more loop exit compares, i.e. change them to use postinc iv value. Previously LSR would only optimize those which are in the loop latch block. However, if LSR can prove it is safe (and profitable), it's now possible to change those not in the latch blocks to use postinc values.
    
    Also, if the compare is the only use, LSR would place the iv increment instruction before the compare instead in the latch.
    
    llvm-svn: 71485
    78a4eb84
Loading