We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c9885e commit e4d859fCopy full SHA for e4d859f
mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
@@ -12,6 +12,7 @@
12
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
13
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
14
#include "mlir/IR/BuiltinAttributes.h"
15
+#include <limits>
16
17
namespace mlir {
18
namespace gpu {
@@ -116,7 +117,7 @@ struct OpLowering : public ConvertOpToLLVMPattern<Op> {
116
117
118
if (upperBound && intrType != IntrType::None) {
119
int32_t min = (intrType == IntrType::Dim ? 1 : 0);
- int32_t max = *upperBound == INT_MAX
120
+ int32_t max = *upperBound == std::numeric_limits<int32_t>::max()
121
? *upperBound
122
: *upperBound + (intrType == IntrType::Id ? 0 : 1);
123
newOp->setAttr("range", LLVM::ConstantRangeAttr::get(
0 commit comments