[FIX] Do not try to hoist "empty" accesses

  Accesses that have a relative offset (in bytes) that is not divisible
  by the type size (in bytes) will be represented as empty in the SCoP
  description. This is on its own not good but it also crashed the
  invariant load hoisting. This patch will fix the latter problem while
  the former should be addressed too.

  This fixes bug 25236.

llvm-svn: 250664
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 006ea87..ab54696 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -2564,6 +2564,15 @@
         continue;
 
       isl_map *AccessRelation = MA->getAccessRelation();
+
+      // Skip accesses that have an empty access relation. These can be caused
+      // by multiple offsets with a type cast in-between that cause the overall
+      // byte offset to be not divisible by the new types sizes.
+      if (isl_map_is_empty(AccessRelation)) {
+        isl_map_free(AccessRelation);
+        continue;
+      }
+
       if (isl_map_involves_dims(AccessRelation, isl_dim_in, 0,
                                 Stmt.getNumIterators())) {
         isl_map_free(AccessRelation);