[all-commits] [llvm/llvm-project] 889b67: [mlir] [memref] add more checks to the memref.rein...
donald chen via All-commits
all-commits at lists.llvm.org
Fri Oct 25 17:08:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 889b67c9d30e3024a1317431d66c22599f6c2011
https://github.com/llvm/llvm-project/commit/889b67c9d30e3024a1317431d66c22599f6c2011
Author: donald chen <chenxunyu1993 at gmail.com>
Date: 2024-10-26 (Sat, 26 Oct 2024)
Changed paths:
M mlir/lib/Dialect/GPU/Transforms/DecomposeMemRefs.cpp
M mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
M mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp
M mlir/lib/Dialect/MemRef/Transforms/ExpandStridedMetadata.cpp
M mlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir
M mlir/test/Dialect/GPU/decompose-memrefs.mlir
M mlir/test/Dialect/MemRef/expand-ops.mlir
M mlir/test/Dialect/MemRef/expand-strided-metadata.mlir
M mlir/test/Dialect/MemRef/invalid.mlir
Log Message:
-----------
[mlir] [memref] add more checks to the memref.reinterpret_cast (#112669)
Operation memref.reinterpret_cast was accept input like:
%out = memref.reinterpret_cast %in to offset: [%offset], sizes: [10],
strides: [1]
: memref<?xf32> to memref<10xf32>
A problem arises: while lowering, the true offset of %out is %offset,
but its data type indicates an offset of 0. Permitting this
inconsistency can result in incorrect outcomes, as certain pass might
erroneously extract the offset from the data type of %out.
This patch fixes this by enforcing that the return value's data type
aligns
with the input parameter.
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