[Mlir-commits] [mlir] [mlir] MemRefToSPIRV propagate alignment attributes from MemRef ops. (PR #151723)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Aug 7 08:24:22 PDT 2025
================
@@ -465,7 +466,13 @@ struct MemoryRequirements {
/// Given an accessed SPIR-V pointer, calculates its alignment requirements, if
/// any.
static FailureOr<MemoryRequirements>
-calculateMemoryRequirements(Value accessedPtr, bool isNontemporal) {
+calculateMemoryRequirements(Value accessedPtr, bool isNontemporal,
+ uint64_t preferredAlignment) {
+
+ if (std::numeric_limits<uint32_t>::max() < preferredAlignment) {
----------------
kuhar wrote:
nit: we usually put constants on the RHS of comparisons. (I consider `::max()` a constant)
https://github.com/llvm/llvm-project/pull/151723
More information about the Mlir-commits
mailing list