[Mlir-commits] [mlir] [mlir] Implement inferResultRanges for vector.step op (PR #151536)
Krzysztof Drewniak
llvmlistbot at llvm.org
Thu Jul 31 08:29:10 PDT 2025
================
@@ -7197,6 +7197,31 @@ Value mlir::vector::makeArithReduction(OpBuilder &b, Location loc,
return selectPassthru(b, mask, result, acc);
}
+//===----------------------------------------------------------------------===//
+// StepOp
+//===----------------------------------------------------------------------===//
+
+void StepOp::inferResultRanges(ArrayRef<ConstantIntRanges> argRanges,
+ SetIntRangeFn setResultRanges) {
+ auto resultType = cast<VectorType>(getType());
+ if (resultType.isScalable()) {
+ return;
+ }
+ std::optional<ConstantIntRanges> result;
+ Type elementType = resultType.getElementType();
+ unsigned bitwidth = elementType.isIndex()
+ ? IndexType::kInternalStorageBitWidth
----------------
krzysz00 wrote:
There is, and there's a utility method for it
https://github.com/llvm/llvm-project/pull/151536
More information about the Mlir-commits
mailing list