[Mlir-commits] [mlir] [mlir] ViewLikeInterface - verify ranks in verifyOffsetSizeAndStrideOp (PR #147926)
Matthias Springer
llvmlistbot at llvm.org
Thu Jul 10 05:15:11 PDT 2025
================
@@ -181,12 +181,16 @@ bool isEqualConstantIntOrValueArray(ArrayRef<OpFoldResult> ofrs1,
return true;
}
-/// Return a vector of OpFoldResults with the same size a staticValues, but all
+/// Return a vector of OpFoldResults with the same size as staticValues, but all
/// elements for which ShapedType::isDynamic is true, will be replaced by
/// dynamicValues.
SmallVector<OpFoldResult> getMixedValues(ArrayRef<int64_t> staticValues,
ValueRange dynamicValues,
MLIRContext *context) {
+ assert(dynamicValues.size() ==
+ (unsigned)llvm::count_if(staticValues, ShapedType::isDynamic) &&
----------------
matthias-springer wrote:
Use C++ style static_cast and size_t.
https://github.com/llvm/llvm-project/pull/147926
More information about the Mlir-commits
mailing list