diff --git a/mlir/include/mlir/IR/BuiltinTypeInterfaces.td b/mlir/include/mlir/IR/BuiltinTypeInterfaces.td --- a/mlir/include/mlir/IR/BuiltinTypeInterfaces.td +++ b/mlir/include/mlir/IR/BuiltinTypeInterfaces.td @@ -87,7 +87,8 @@ // TODO: merge these two special values in a single one used everywhere. // Unfortunately, uses of `-1` have crept deep into the codebase now and are // hard to track. - static constexpr int64_t kDynamicSize = -1; + static constexpr int64_t kDynamicSize = + std::numeric_limits::min(); static constexpr int64_t kDynamicStrideOrOffset = std::numeric_limits::min(); diff --git a/mlir/test/Dialect/Linalg/transform-op-split.mlir b/mlir/test/Dialect/Linalg/transform-op-split.mlir --- a/mlir/test/Dialect/Linalg/transform-op-split.mlir +++ b/mlir/test/Dialect/Linalg/transform-op-split.mlir @@ -179,7 +179,7 @@ transform.sequence failures(propagate) { ^bb1(%arg1: !pdl.operation): // expected-error @below {{expects either a dynamic or a static split point to be provided}} - %0:2 = "transform.structured.split"(%arg1) { dimension = 1, static_split_point = -1 } : (!pdl.operation) -> (!pdl.operation, !pdl.operation) + %0:2 = "transform.structured.split"(%arg1) { dimension = 1, static_split_point = -9223372036854775808 } : (!pdl.operation) -> (!pdl.operation, !pdl.operation) } // ----- diff --git a/mlir/test/Dialect/Shape/canonicalize.mlir b/mlir/test/Dialect/Shape/canonicalize.mlir --- a/mlir/test/Dialect/Shape/canonicalize.mlir +++ b/mlir/test/Dialect/Shape/canonicalize.mlir @@ -815,7 +815,7 @@ // CHECK-NEXT: consume.witness // CHECK-NEXT: return %cs0 = shape.const_shape [8, 1] : !shape.shape - %cs1 = shape.const_shape [1, -1] : !shape.shape + %cs1 = shape.const_shape [1, -9223372036854775808] : !shape.shape %0 = shape.cstr_broadcastable %cs0, %cs0, %cs1 : !shape.shape, !shape.shape, !shape.shape "consume.witness"(%0) : (!shape.witness) -> () return @@ -830,7 +830,7 @@ // CHECK-NEXT: return %cs0 = shape.const_shape [8, 1] : !shape.shape %cs1 = shape.const_shape [1, 8] : !shape.shape - %cs2 = shape.const_shape [1, -1] : !shape.shape + %cs2 = shape.const_shape [1, -9223372036854775808] : !shape.shape %0 = shape.cstr_broadcastable %cs0, %cs1, %cs2 : !shape.shape, !shape.shape, !shape.shape "consume.witness"(%0) : (!shape.witness) -> () return @@ -844,8 +844,8 @@ // CHECK-NEXT: consume.witness // CHECK-NEXT: return %cs0 = shape.const_shape [8, 1] : !shape.shape - %cs1 = shape.const_shape [1, -1] : !shape.shape - %cs2 = shape.const_shape [8, -1] : !shape.shape + %cs1 = shape.const_shape [1, -9223372036854775808] : !shape.shape + %cs2 = shape.const_shape [8, -9223372036854775808] : !shape.shape %0 = shape.cstr_broadcastable %cs0, %cs1, %cs2 : !shape.shape, !shape.shape, !shape.shape "consume.witness"(%0) : (!shape.witness) -> () return