svn commit: r250997 - head/contrib/llvm/lib/Transforms/Vectorize
Dimitry Andric
dim at FreeBSD.org
Sun May 26 14:14:42 UTC 2013
Author: dim
Date: Sun May 26 14:14:42 2013
New Revision: 250997
URL: http://svnweb.freebsd.org/changeset/base/250997
Log:
Pull in r182656 from upstream llvm trunk:
LoopVectorize: LoopSimplify can't canonicalize loops with an
indirectbr in it, don't assert on those cases.
Fixes PR16139.
This should fix clang assertion failures when optimizing at -O3, similar
to:
Assertion failed: (TheLoop->getLoopPreheader() && "No preheader!!"),
function canVectorize, file
contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp, line 2171.
Reported by: O. Hartmann <ohartman at zedat.fu-berlin.de>
PR: ports/178332, ports/178977
MFC after: 3 days
Modified:
head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
==============================================================================
--- head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Sun May 26 12:36:56 2013 (r250996)
+++ head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Sun May 26 14:14:42 2013 (r250997)
@@ -2169,7 +2169,10 @@ bool LoopVectorizationLegality::canVecto
}
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())
More information about the svn-src-head
mailing list