[mlir][memref] Clarify the documentation for memref.clone [NFC]

The wording was wrong and suggested that operands to memref.clone may not be mutated.

Differential Revision: https://reviews.llvm.org/D106258
This commit is contained in:
Stephan Herhut 2021-07-19 12:12:36 +02:00
parent 156b431c66
commit eda46404cd
1 changed files with 4 additions and 2 deletions

View File

@ -425,8 +425,10 @@ def CloneOp : MemRef_Op<"clone", [
%arg1 = memref.clone %arg0 : memref<?xf32> to memref<?xf32>
```
Note, that mutating the source or result of the clone operation leads to
undefined behavior.
Valid implementations of this operation may alias the input and output
views or create an actual copy. Mutating the source or result
of the clone operation after the clone operation thus leads to undefined
behavior.
}];
let arguments = (ins Arg<AnyRankedOrUnrankedMemRef, "", []>:$input);