[Mlir-commits] [mlir] Added Memory Effect to assume_alignment (PR #139521)
Shay Kleiman
llvmlistbot at llvm.org
Wed May 14 07:07:57 PDT 2025
================
@@ -142,22 +142,34 @@ class AllocLikeOp<string mnemonic,
// AssumeAlignmentOp
//===----------------------------------------------------------------------===//
-def AssumeAlignmentOp : MemRef_Op<"assume_alignment"> {
+def AssumeAlignmentOp : MemRef_Op<"assume_alignment", [
+ NoMemoryEffect,
+ ViewLikeOpInterface,
+ SameOperandsAndResultType
+ ]> {
let summary =
"assertion that gives alignment information to the input memref";
let description = [{
- The `assume_alignment` operation takes a memref and an integer of alignment
- value, and internally annotates the buffer with the given alignment. If
- the buffer isn't aligned to the given alignment, the behavior is undefined.
+ The `assume_alignment` operation takes a memref and an integer of alignment
+ value. It returns a new SSA value of the same memref type, but associated
+ with the assertion that the underlying buffer is aligned to the given
+ alignment. If the buffer isn't aligned to the given alignment, the
+ behavior is undefined.
----------------
shay-kl wrote:
I am not sure.
https://github.com/llvm/llvm-project/pull/139521
More information about the Mlir-commits
mailing list