diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h --- a/mlir/include/mlir/IR/Attributes.h +++ b/mlir/include/mlir/IR/Attributes.h @@ -1699,7 +1699,7 @@ static inline mlir::Attribute getFromVoidPointer(void *ptr) { return mlir::Attribute::getFromOpaquePointer(ptr); } - static constexpr int NumLowBitsAvailable = 3; + static constexpr int NumLowBitsAvailable = alignof(mlir::Attribute) == 4 ? 2 : 3; }; template <>