diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-05-28 18:37:09 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-05-28 18:37:09 +0000 |
commit | da897215b28fe4f1f94aa5ce5cfa54c7a757064d (patch) | |
tree | 137564faa62befc071a6123df7d05fc6a5d5e400 /lib/Transforms/Vectorize/LoopVectorize.cpp | |
parent | 1df0680640af28109fdf60d73f56fe8b0520d8fe (diff) |
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
Diffstat (limited to 'lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r-- | lib/Transforms/Vectorize/LoopVectorize.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 4f6f51c9bb..bc420bd6a9 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2308,7 +2308,10 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() { } bool LoopVectorizationLegality::canVectorize() { - assert(TheLoop->getLoopPreheader() && "No preheader!!"); + // We must have a loop in canonical form. Loops with indirectbr in them cannot + // be canonicalized. + if (!TheLoop->getLoopPreheader()) + return false; // We can only vectorize innermost loops. if (TheLoop->getSubLoopsVector().size()) |