[all-commits] [llvm/llvm-project] e138c9: [mlir] ViewLikeInterface - verify ranks in verifyO...

Maya Amrami via All-commits all-commits at lists.llvm.org
Sun Jul 20 04:20:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e138c951550779143551b9bd3f66183f6ad5b3df
      https://github.com/llvm/llvm-project/commit/e138c951550779143551b9bd3f66183f6ad5b3df
  Author: Maya Amrami <62667278+amrami at users.noreply.github.com>
  Date:   2025-07-20 (Sun, 20 Jul 2025)

  Changed paths:
    M mlir/lib/Dialect/Utils/StaticValueUtils.cpp
    M mlir/lib/Interfaces/ViewLikeInterface.cpp
    M mlir/test/Dialect/MemRef/invalid.mlir

  Log Message:
  -----------
  [mlir] ViewLikeInterface - verify ranks in verifyOffsetSizeAndStrideOp (#147926)

getMixedOffsets() calls getMixedValues() with `static_offsets` and
`offsets`. It is assumed that the number of dynamic offsets in
`static_offsets` equals the rank of `offsets`. Otherwise, we fail on
assert when trying to access an array out of its bounds.
The same applies to getMixedStrides() and getMixedOffsets().

A verification of this assumption is added to
verifyOffsetSizeAndStrideOp() and a clear assert is added in
getMixedValues().



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list