Update various Loop optimization passes to cope with the possibility that
[oota-llvm.git] / lib / Transforms / IPO / LoopExtractor.cpp
index fd69aeb00c13a5a50f95a68e4572f26028d2d22e..cb813303facb9de95a7df8b993d63bfddbfcc96d 100644 (file)
@@ -75,6 +75,10 @@ bool LoopExtractor::runOnLoop(Loop *L, LPPassManager &LPM) {
   if (L->getParentLoop())
     return false;
 
+  // If LoopSimplify form is not available, stay out of trouble.
+  if (!L->isLoopSimplifyForm())
+    return false;
+
   DominatorTree &DT = getAnalysis<DominatorTree>();
   bool Changed = false;