[LoopUnroll] Don't update DT for changeToUnreachable.
authorFlorian Hahn <flo@fhahn.com>
Mon, 16 Jan 2023 12:25:34 +0000 (12:25 +0000)
committerFlorian Hahn <flo@fhahn.com>
Mon, 16 Jan 2023 12:25:34 +0000 (12:25 +0000)
commita6549718d9ba2fdcd14fb8651aeb5000840fa337
tree440dce3a6a2e05a01d260abb4436c01e36fcb876
parent75cb138911debe2966d00d9dd09fd621bfae066e
[LoopUnroll] Don't update DT for changeToUnreachable.

There is no need to update the DT here, because there must be a unique
latch. Hence if the latch is not exiting it must directly branch back
to the original loop header and does not dominate any nodes.

Skipping a DT update here simplifies D141487.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D141810
llvm/lib/Transforms/Utils/LoopUnroll.cpp