[Polly][Isl] Fix -Wsign-compare after D113101

This commit is contained in:
Fangrui Song 2021-11-11 00:17:51 -08:00
parent a77d1f68a0
commit 0b39ec835d

View File

@ -217,7 +217,7 @@ isl::set polly::shiftDim(isl::set Set, int Pos, int Amount) {
unsigned NumDims = unsignedFromIslSize(Set.tuple_dim());
if (Pos < 0)
Pos = NumDims + Pos;
assert(Pos < NumDims && "Dimension index must be in range");
assert(unsigned(Pos) < NumDims && "Dimension index must be in range");
isl::space Space = Set.get_space();
Space = Space.map_from_domain_and_range(Space);
isl::multi_aff Translator = makeShiftDimAff(Space, Pos, Amount);
@ -238,7 +238,7 @@ isl::map polly::shiftDim(isl::map Map, isl::dim Dim, int Pos, int Amount) {
unsigned NumDims = unsignedFromIslSize(Map.dim(Dim));
if (Pos < 0)
Pos = NumDims + Pos;
assert(Pos < NumDims && "Dimension index must be in range");
assert(unsigned(Pos) < NumDims && "Dimension index must be in range");
isl::space Space = Map.get_space();
switch (Dim) {
case isl::dim::in: