LSR: fix expansion of scaled reg in non-address type formulae.
authorAndrew Trick <atrick@apple.com>
Fri, 15 Jun 2012 20:07:29 +0000 (20:07 +0000)
committerAndrew Trick <atrick@apple.com>
Fri, 15 Jun 2012 20:07:29 +0000 (20:07 +0000)
commitb6b5b7b69113c5c3e49caf78adb1c2c4cf216db3
treeae3cc695c9e446d7622ee49eb8fadaa5fbf7be6d
parent546f2101152f75c8d84115f6a6b2f3c16389b1ac
LSR: fix expansion of scaled reg in non-address type formulae.

For non-address users, Base and Scaled registers are not specially
associated to fit an address mode, so SCEVExpander should apply normal
expansion rules. Otherwise we may sink computation into inner loops
that have already been optimized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158537 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp