@@ -144,25 +144,21 @@ class AllocLikeOp<string mnemonic,
144
144
145
145
def AssumeAlignmentOp : MemRef_Op<"assume_alignment", [
146
146
DeclareOpInterfaceMethods<OpAsmOpInterface, ["getAsmResultNames"]>,
147
- Pure,
147
+ Pure,
148
148
ViewLikeOpInterface,
149
149
SameOperandsAndResultType
150
150
]> {
151
151
let summary =
152
- "assertion that gives alignment information to the input memref";
152
+ "assumption that gives alignment information to the input memref";
153
153
let description = [{
154
- The `assume_alignment` operation takes a memref and an integer of alignment
154
+ The `assume_alignment` operation takes a memref and an integer alignment
155
155
value. It returns a new SSA value of the same memref type, but associated
156
- with the assertion that the underlying buffer is aligned to the given
156
+ with the assumption that the underlying buffer is aligned to the given
157
157
alignment.
158
158
159
- If the buffer isn't aligned to the given alignment, this operation
160
- itself does not cause undefined behavior. However, subsequent operations
161
- that consume the resulting memref and rely on this asserted alignment for
162
- correctness will produce a poison value if the assertion is false.
163
-
159
+ If the buffer isn't aligned to the given alignment, its result is poison.
164
160
This operation doesn't affect the semantics of a program where the
165
- alignment assertion holds true. It is intended for optimization purposes,
161
+ alignment assumption holds true. It is intended for optimization purposes,
166
162
allowing the compiler to generate more efficient code based on the
167
163
alignment assumption. The optimization is best-effort.
168
164
}];
0 commit comments