[Mlir-commits] [mlir] [mlir][scf] Fix trip count signedness and overflow in SCF Utils (PR #178782)
Mehdi Amini
llvmlistbot at llvm.org
Fri Jan 30 07:19:23 PST 2026
================
@@ -251,8 +251,7 @@ FailureOr<scf::ParallelOp> parallelLoopUnrollByFactors(
/// Get constant trip counts for each of the induction variables of the given
/// loop operation. If any of the loop's trip counts is not constant, return an
/// empty vector.
-/// TODO(#178506): Should return SmallVector<uint64_t> for correct signedness.
-llvm::SmallVector<int64_t>
+llvm::SmallVector<uint64_t>
----------------
joker-eph wrote:
If we expect to need the full 64 bits range, then that could be a case for uint64_t, however at this point we could ask if 64 bits is enough or is it valid to have larger numbers using i128 for example?
Also: regardless of the choice, the implementation should detect overflows anyway right?
https://github.com/llvm/llvm-project/pull/178782
More information about the Mlir-commits
mailing list