[Mlir-commits] [mlir] [mlir][vector] Add alignment attribute to vector operations. (PR #152507)

Erick Ochoa Lopez llvmlistbot at llvm.org
Mon Aug 25 07:24:14 PDT 2025


================
@@ -2166,6 +2189,11 @@ def Vector_ScatterOp :
     correspond to those of the `llvm.masked.scatter`
     [intrinsic](https://llvm.org/docs/LangRef.html#llvm-masked-scatter-intrinsics).
 
+    An optional `alignment` attribute allows to specify the byte alignment of the
+    scatter operation. It must be a positive power of 2. The operation must access
+    memory at an address aligned to this boundary. Violations may lead to
+    architecture-specific faults or performance penalties.
----------------
amd-eochoalo wrote:

In this particular case, there we some operations defined in this other PR https://github.com/llvm/llvm-project/pull/144344 which used this wording as documentation. I think changing the wording to be undefined behaviour is reasonable. Would something like the following be preferrable?

```
    Violations will result in undefined behaviour and may lead to
    architecture-specific faults or performance penalties.
```

https://github.com/llvm/llvm-project/pull/152507


More information about the Mlir-commits mailing list