[polly] 0b39ec8 - [Polly][Isl] Fix -Wsign-compare after D113101
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 11 00:17:56 PST 2021
Author: Fangrui Song
Date: 2021-11-11T00:17:52-08:00
New Revision: 0b39ec835d792a8c0861958d985a356c8595d332
URL: https://github.com/llvm/llvm-project/commit/0b39ec835d792a8c0861958d985a356c8595d332
DIFF: https://github.com/llvm/llvm-project/commit/0b39ec835d792a8c0861958d985a356c8595d332.diff
LOG: [Polly][Isl] Fix -Wsign-compare after D113101
Added:
Modified:
polly/lib/Support/ISLTools.cpp
Removed:
################################################################################
diff --git a/polly/lib/Support/ISLTools.cpp b/polly/lib/Support/ISLTools.cpp
index 4a40df2958416..8b8c51aa202d0 100644
--- a/polly/lib/Support/ISLTools.cpp
+++ b/polly/lib/Support/ISLTools.cpp
@@ -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:
More information about the llvm-commits
mailing list