diff --git a/polly/lib/Transform/FlattenAlgo.cpp b/polly/lib/Transform/FlattenAlgo.cpp index bd1ce4d24ee7..03d337d81c98 100644 --- a/polly/lib/Transform/FlattenAlgo.cpp +++ b/polly/lib/Transform/FlattenAlgo.cpp @@ -227,7 +227,8 @@ IslPtr tryFlattenSequence(IslPtr Schedule) { auto ScatterSet = give(isl_set_from_union_set(isl_union_map_range(Schedule.copy()))); - auto ParamSpace = give(isl_union_map_get_space(Schedule.keep())); + auto ParamSpace = + give(isl_space_params(isl_union_map_get_space(Schedule.keep()))); auto Dims = isl_set_dim(ScatterSet.keep(), isl_dim_set); assert(Dims >= 2);