Reland "[LoopUnswitch] Fix incorrect Modified status"
authorDavid Stenberg <david.stenberg@ericsson.com>
Thu, 20 Aug 2020 06:28:24 +0000 (08:28 +0200)
committerDavid Stenberg <david.stenberg@ericsson.com>
Thu, 20 Aug 2020 09:52:09 +0000 (11:52 +0200)
commit7a1029fd1e415d3e21430fc18ed5cc2e79756e3c
tree49da86156cfd9c9fc1e4a5d1f56363fc20461ce9
parentb43235a76c231cf15d28f073780e868b71c7bab0
Reland "[LoopUnswitch] Fix incorrect Modified status"

Relanded since the buildbot issue was unrelated to this commit.

When hoisting simple values out from a loop, and an optsize attribute, a
convergent call, or an invoke instruction hindered the pass from
unswitching the loop, the pass would return an incorrect Modified
status.

This was caught using the check introduced by D80916.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D86085
llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/test/Transforms/LoopUnswitch/convergent-hoist-modified.ll [new file with mode: 0644]
llvm/test/Transforms/LoopUnswitch/invoke-hoist-modified.ll [new file with mode: 0644]
llvm/test/Transforms/LoopUnswitch/optsize-hoist-modified.ll [new file with mode: 0644]