[PATCH] D34982: [Polly][WIP] Fully-Indexed static expansion

Bonfante Nicolas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 29 14:03:04 PDT 2017


niosega added inline comments.


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:307-308
+           "The upper bound is not a positive integer.");
+    assert(UpperBound.le(isl::val(CurrentAccessMap.get_ctx(),
+                                  std::numeric_limits<unsigned>::max())) &&
+           "The upper bound overflow a long.");
----------------
Meinersbur wrote:
> This assertion fails on Windows (and 32 bit platforms): The `isl::val` constructor takes a `long`, which is 32 bit this platforms. UINT_MAX exceeds its range.
It's a mistake from my side to compare it with UINT_MAX.

If I replace 
```
std::numeric_limits<unsigned>::max()
```

with 
```
std::numeric_limits<long>::max()
```

it should work on every platform, right ?


https://reviews.llvm.org/D34982





More information about the llvm-commits mailing list