Skip to content

Commit e4d859f

Browse files
committed
address comment
Signed-off-by: Max Dawkins <[email protected]>
1 parent 6c9885e commit e4d859f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
1313
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
1414
#include "mlir/IR/BuiltinAttributes.h"
15+
#include <limits>
1516

1617
namespace mlir {
1718
namespace gpu {
@@ -116,7 +117,7 @@ struct OpLowering : public ConvertOpToLLVMPattern<Op> {
116117

117118
if (upperBound && intrType != IntrType::None) {
118119
int32_t min = (intrType == IntrType::Dim ? 1 : 0);
119-
int32_t max = *upperBound == INT_MAX
120+
int32_t max = *upperBound == std::numeric_limits<int32_t>::max()
120121
? *upperBound
121122
: *upperBound + (intrType == IntrType::Id ? 0 : 1);
122123
newOp->setAttr("range", LLVM::ConstantRangeAttr::get(

0 commit comments

Comments
 (0)