[Mlir-commits] [mlir] [mlir][vector] Propagate alignment from vector to llvm dialects. (PR #153482)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Aug 27 01:16:25 PDT 2025
================
@@ -299,8 +299,9 @@ class VectorGatherOpConversion
}
// Resolve alignment.
- unsigned align;
- if (failed(getVectorToLLVMAlignment(*this->getTypeConverter(), vType,
+ unsigned align = gather.getAlignment().value_or(0);
+ if (!align &&
+ failed(getVectorToLLVMAlignment(*this->getTypeConverter(), vType,
----------------
banach-space wrote:
Note that this means that explicit alignment takes priority over e.g. `--convert-vector-to-llvm='use-vector-alignment=1`. This feels like the right design decision, but we should make sure that it is documented (perhaps just add a comment here?) and tested (e.g. in "use-vector-alignment.mlir").
Similar comment for scatter. Thanks!
https://github.com/llvm/llvm-project/pull/153482
More information about the Mlir-commits
mailing list