[Mlir-commits] [mlir] [mlir] Check for int limits when converting gpu dims (PR #140747)
Adam Siemieniuk
llvmlistbot at llvm.org
Tue May 20 08:33:55 PDT 2025
================
@@ -116,7 +116,9 @@ struct OpLowering : public ConvertOpToLLVMPattern<Op> {
if (upperBound && intrType != IntrType::None) {
int32_t min = (intrType == IntrType::Dim ? 1 : 0);
- int32_t max = *upperBound + (intrType == IntrType::Id ? 0 : 1);
+ int32_t max = *upperBound == INT_MAX
----------------
adam-smnk wrote:
Fly-by nit: `INT32_MAX` or even better `std::numeric_limits`
https://github.com/llvm/llvm-project/pull/140747
More information about the Mlir-commits
mailing list