diff --git a/mlir/unittests/IR/AttributeTest.cpp b/mlir/unittests/IR/AttributeTest.cpp --- a/mlir/unittests/IR/AttributeTest.cpp +++ b/mlir/unittests/IR/AttributeTest.cpp @@ -219,8 +219,8 @@ static void checkNativeAccess(MLIRContext *ctx, ArrayRef data, Type elementType) { auto type = RankedTensorType::get(data.size(), elementType); - auto attr = - AttrT::get(type, "resource", UnmanagedAsmResourceBlob::allocate(data)); + auto attr = AttrT::get(type, "resource", + UnmanagedAsmResourceBlob::allocate(data, alignof(T))); // Check that we can access and iterate the data properly. Optional> attrData = attr.tryGetAsArrayRef();