Fix 12513: Loop unrolling breaks with indirect branches.
authorAndrew Trick <atrick@apple.com>
Tue, 10 Apr 2012 05:14:42 +0000 (05:14 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 10 Apr 2012 05:14:42 +0000 (05:14 +0000)
commitd9fc1ce8096f7138c60edc3a6655583bf209780e
treef03561dfeb2555e6e05b5a4ed8ce54f6c618ce96
parent64c0748eb34272a6548980b3277aedebb6e6d265
Fix 12513: Loop unrolling breaks with indirect branches.

Take this opportunity to generalize the indirectbr bailout logic for
loop transformations. CFG transformations will never get indirectbr
right, and there's no point trying.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154386 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/LoopInfo.h
lib/Analysis/LoopInfo.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Utils/LoopUnroll.cpp
test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll [new file with mode: 0644]
test/Transforms/LoopUnswitch/2012-04-02-IndirectBr.ll