Fix a regression from last night, which caused this pass to create invalid
authorChris Lattner <sabre@nondot.org>
Mon, 12 Sep 2005 17:11:27 +0000 (17:11 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 12 Sep 2005 17:11:27 +0000 (17:11 +0000)
commit12b50410cd0a8cd81a7f528f862005e80921cf58
tree4af7934b427b6c8b47a766a2bce5b07bf1aca77b
parente4b56572f9df10ae684069fc51a50a1977e065ba
Fix a regression from last night, which caused this pass to create invalid
code for IV uses outside of loops that are not dominated by the latch block.
We should only convert these uses to use the post-inc value if they ARE
dominated by the latch block.

Also use a new LoopInfo method to simplify some code.

This fixes Transforms/LoopStrengthReduce/2005-09-12-UsesOutOutsideOfLoop.ll

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