diff --git a/polly/lib/Transform/ZoneAlgo.cpp b/polly/lib/Transform/ZoneAlgo.cpp index a114a241d87a..ce90bb901ebc 100644 --- a/polly/lib/Transform/ZoneAlgo.cpp +++ b/polly/lib/Transform/ZoneAlgo.cpp @@ -855,7 +855,10 @@ static isl::union_map normalizeValInst(isl::union_map Input, // Instructions within the SCoP are always wrapped. Non-wrapped tuples // are therefore invariant in the SCoP and don't need normalization. - if (!RangeSpace.is_wrapping()) { + auto IsWrapping = RangeSpace.is_wrapping(); + if (IsWrapping.is_error()) + return {}; + if (!IsWrapping) { Result = Result.unite(Map); continue; }