[LoopRotate] processLoop should return true even if it just simplified the loop latch...
authorCraig Topper <craig.topper@intel.com>
Wed, 15 Nov 2017 00:22:42 +0000 (00:22 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 15 Nov 2017 00:22:42 +0000 (00:22 +0000)
commitbf6495fbcbc29527c799d320d1f36a256798a095
treed5a16f71bb8362bc0c7bf933bb074b0ea662174e
parentcff19ee2330f86e3f3cc320b89e928c97437b932
[LoopRotate] processLoop should return true even if it just simplified the loop latch without making any other changes

Simplifying a loop latch changes the IR and we need to make sure the pass manager knows to invalidate analysis passes if that happened.

PR35210 discovered a case where we failed to invalidate the post dominator tree after this simplification because we no changes other than simplifying the loop latch.

Fixes PR35210.

Differential Revision: https://reviews.llvm.org/D40035

llvm-svn: 318237
llvm/lib/Transforms/Scalar/LoopRotation.cpp
llvm/test/Transforms/LoopRotate/pr35210.ll [new file with mode: 0644]