Use all available range information for parameters

  In the following even full-range information will help to avoid
  runtime checks for wrapping integers, hence we enable it now.

llvm-svn: 235823
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 2caab15..6f8de70 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -311,18 +311,18 @@
   isl_val *V;
   isl_ctx *ctx = isl_set_get_ctx(S);
 
-  bool isWrapping = Range.isSignWrappedSet();
-  const auto LB = isWrapping ? Range.getLower() : Range.getSignedMin();
+  bool useLowerUpperBound = Range.isSignWrappedSet() && !Range.isFullSet();
+  const auto LB = useLowerUpperBound ? Range.getLower() : Range.getSignedMin();
   V = isl_valFromAPInt(ctx, LB, true);
   isl_set *SLB = isl_set_lower_bound_val(isl_set_copy(S), type, dim, V);
 
-  const auto UB = isWrapping ? Range.getUpper() : Range.getSignedMax();
+  const auto UB = useLowerUpperBound ? Range.getUpper() : Range.getSignedMax();
   V = isl_valFromAPInt(ctx, UB, true);
-  if (isWrapping)
+  if (useLowerUpperBound)
     V = isl_val_sub_ui(V, 1);
   isl_set *SUB = isl_set_upper_bound_val(S, type, dim, V);
 
-  if (isWrapping)
+  if (useLowerUpperBound)
     return isl_set_union(SLB, SUB);
   else
     return isl_set_intersect(SLB, SUB);
@@ -1345,10 +1345,6 @@
 
     ConstantRange SRange = SE->getSignedRange(ParamID.first);
 
-    // TODO: Find a case where the full set is actually helpful.
-    if (SRange.isFullSet())
-      continue;
-
     Context = addRangeBoundsToSet(Context, SRange, dim, isl_dim_param);
   }
 }