Fix two significant bugs in LSR:

1. When rewriting code in outer loops, sometimes we would insert code into
   inner loops that is invariant in that loop.
2. Notice that 4*(2+x) is 8+4*x and use that to simplify expressions.

This is a performance neutral change.

llvm-svn: 25964
1 file changed
tree: e63b92aee65a5d67638b152e4aea99bdce2e4eaf
  1. llvm/