[PPCGCodeGeneration] Check that invariant load hoisting succeeded.
authorSiddharth Bhat <siddu.druid@gmail.com>
Fri, 28 Jul 2017 14:48:32 +0000 (14:48 +0000)
committerSiddharth Bhat <siddu.druid@gmail.com>
Fri, 28 Jul 2017 14:48:32 +0000 (14:48 +0000)
If we fail, throw an error for now. We can gracefully handle this later.

llvm-svn: 309387

polly/lib/CodeGen/PPCGCodeGeneration.cpp

index 7f0a03b..2189df3 100644 (file)
@@ -3197,7 +3197,10 @@ public:
 
     // preload invariant loads. Note: This should happen before the RTC
     // because the RTC may depend on values that are invariant load hoisted.
-    NodeBuilder.preloadInvariantLoads();
+    if (!NodeBuilder.preloadInvariantLoads())
+      report_fatal_error("preloading invariant loads failed in function: " +
+                         S->getFunction().getName() +
+                         " | Scop Region: " + S->getNameStr());
 
     Value *RTC = NodeBuilder.createRTC(Condition);
     Builder.GetInsertBlock()->getTerminator()->setOperand(0, RTC);