"Generating new index expressions to indirect arrays not working");
auto Schedule = isl_ast_build_get_schedule(Build);
+
+#ifndef NDEBUG
+ auto Dom = Stmt->getDomain();
+ auto SchedDom = isl_set_from_union_set(
+ isl_union_map_domain(isl_union_map_copy(Schedule)));
+ auto AccDom = isl_map_domain(MA->getAccessRelation());
+ Dom = isl_set_intersect_params(Dom, Stmt->getParent()->getContext());
+ SchedDom =
+ isl_set_intersect_params(SchedDom, Stmt->getParent()->getContext());
+ assert(isl_set_is_subset(SchedDom, AccDom) &&
+ "Access relation not defined on full schedule domain");
+ assert(isl_set_is_subset(Dom, AccDom) &&
+ "Access relation not defined on full domain");
+ isl_set_free(AccDom);
+ isl_set_free(SchedDom);
+ isl_set_free(Dom);
+#endif
+
auto PWAccRel = MA->applyScheduleToAccessRelation(Schedule);
auto AccessExpr = isl_ast_build_access_from_pw_multi_aff(Build, PWAccRel);