llvm.org GIT mirror llvm / da89721
Merging r182656: ------------------------------------------------------------------------ r182656 | d0k | 2013-05-24 11:05:35 -0700 (Fri, 24 May 2013) | 3 lines LoopVectorize: LoopSimplify can't canonicalize loops with an indirectbr in it, don't assert on those cases. Fixes PR16139. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@182785 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 7 years ago
2 changed file(s) with 15 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
23072307 }
23082308
23092309 bool LoopVectorizationLegality::canVectorize() {
2310 assert(TheLoop->getLoopPreheader() && "No preheader!!");
2310 // We must have a loop in canonical form. Loops with indirectbr in them cannot
2311 // be canonicalized.
2312 if (!TheLoop->getLoopPreheader())
2313 return false;
23112314
23122315 // We can only vectorize innermost loops.
23132316 if (TheLoop->getSubLoopsVector().size())
2626 unreachable
2727 }
2828
29 ; PR16139
30 define void @test2(i8* %x) {
31 entry:
32 indirectbr i8* %x, [ label %L0, label %L1 ]
33
34 L0:
35 br label %L0
36
37 L1:
38 ret void
39 }