Skip to content
  • Evan Cheng's avatar
    If a loop termination compare instruction is the only use of its stride, · 133694db
    Evan Cheng authored
    and the compaison is against a constant value, try eliminate the stride
    by moving the compare instruction to another stride and change its
    constant operand accordingly. e.g.
    
    loop:
    ...
    v1 = v1 + 3
    v2 = v2 + 1
    if (v2 < 10) goto loop
    =>
    loop:
    ...
    v1 = v1 + 3
    if (v1 < 30) goto loop
    
    llvm-svn: 43336
    133694db
Loading