Teach LoopUnswitch not to perform non-trivial unswitching on loops containing converg...
authorOwen Anderson <resistor@mac.com>
Fri, 9 Oct 2015 18:40:20 +0000 (18:40 +0000)
committerOwen Anderson <resistor@mac.com>
Fri, 9 Oct 2015 18:40:20 +0000 (18:40 +0000)
commit2f10e78ad197bfe97c8fbe35758bd0a925dc8e03
tree6b38b3e5bb648e5e966b9235e1b961d1d0047ce7
parent9f41a7cdc282ff9e9b4d66df7bdf541287816420
Teach LoopUnswitch not to perform non-trivial unswitching on loops containing convergent operations.

Doing so could cause the post-unswitching convergent ops to be
control-dependent on the unswitch condition where they were not before.
This check could be refined to allow unswitching where the convergent
operation was already control-dependent on the unswitch condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249874 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnswitch.cpp
test/Transforms/LoopUnswitch/basictest.ll