[Mlir-commits] [mlir] [mlir][vector] Add alignment attribute to vector operations. (PR #152507)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Aug 25 07:36:40 PDT 2025
================
@@ -1919,7 +1922,6 @@ def Vector_MaskedLoadOp :
load 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.
- A value of 0 indicates no specific alignment requirement.
----------------
banach-space wrote:
> What exactly do you propose as a predicate here?
Basically, something like:
```mlir
def IntPositivePowerOf2 : AllAttrOf<[IntPositive, IntPowerOf2]>;
class IntValidAlignment<Attr attr>: ConfinedAttr<attr, [IntPositivePowerOf2]>;
```
You are right that `IntPositive` and `IntPowerOf2` are self descriptive on their own, but IMHO using `IntValidAlignment` would create a global definition of what constitutes a valid alignment. This is a nice-to-have.
https://github.com/llvm/llvm-project/pull/152507
More information about the Mlir-commits
mailing list