1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: ArmSMEIntrinsicOps.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#ifdef GET_OP_LIST
11#undef GET_OP_LIST
12
13::mlir::arm_sme::aarch64_sme_cntsd,
14::mlir::arm_sme::aarch64_sme_ld1b_horiz,
15::mlir::arm_sme::aarch64_sme_ld1b_vert,
16::mlir::arm_sme::aarch64_sme_ld1d_horiz,
17::mlir::arm_sme::aarch64_sme_ld1d_vert,
18::mlir::arm_sme::aarch64_sme_ld1h_horiz,
19::mlir::arm_sme::aarch64_sme_ld1h_vert,
20::mlir::arm_sme::aarch64_sme_ld1q_horiz,
21::mlir::arm_sme::aarch64_sme_ld1q_vert,
22::mlir::arm_sme::aarch64_sme_ld1w_horiz,
23::mlir::arm_sme::aarch64_sme_ld1w_vert,
24::mlir::arm_sme::aarch64_sme_mopa,
25::mlir::arm_sme::aarch64_sme_mopa_wide,
26::mlir::arm_sme::aarch64_sme_mops,
27::mlir::arm_sme::aarch64_sme_mops_wide,
28::mlir::arm_sme::aarch64_sme_read_horiz,
29::mlir::arm_sme::aarch64_sme_read_vert,
30::mlir::arm_sme::aarch64_sme_smopa_wide,
31::mlir::arm_sme::aarch64_sme_smopa_za32,
32::mlir::arm_sme::aarch64_sme_smops_wide,
33::mlir::arm_sme::aarch64_sme_smops_za32,
34::mlir::arm_sme::aarch64_sme_st1b_horiz,
35::mlir::arm_sme::aarch64_sme_st1b_vert,
36::mlir::arm_sme::aarch64_sme_st1d_horiz,
37::mlir::arm_sme::aarch64_sme_st1d_vert,
38::mlir::arm_sme::aarch64_sme_st1h_horiz,
39::mlir::arm_sme::aarch64_sme_st1h_vert,
40::mlir::arm_sme::aarch64_sme_st1q_horiz,
41::mlir::arm_sme::aarch64_sme_st1q_vert,
42::mlir::arm_sme::aarch64_sme_st1w_horiz,
43::mlir::arm_sme::aarch64_sme_st1w_vert,
44::mlir::arm_sme::aarch64_sme_str,
45::mlir::arm_sme::aarch64_sme_sumopa_wide,
46::mlir::arm_sme::aarch64_sme_sumops_wide,
47::mlir::arm_sme::aarch64_sme_umopa_wide,
48::mlir::arm_sme::aarch64_sme_umopa_za32,
49::mlir::arm_sme::aarch64_sme_umops_wide,
50::mlir::arm_sme::aarch64_sme_umops_za32,
51::mlir::arm_sme::aarch64_sme_usmopa_wide,
52::mlir::arm_sme::aarch64_sme_usmops_wide,
53::mlir::arm_sme::aarch64_sme_write_horiz,
54::mlir::arm_sme::aarch64_sme_write_vert,
55::mlir::arm_sme::aarch64_sme_zero
56#endif // GET_OP_LIST
57
58#ifdef GET_OP_CLASSES
59#undef GET_OP_CLASSES
60
61#include "mlir/IR/Builders.h"
62#include "mlir/IR/BuiltinAttributes.h"
63#include "mlir/IR/BuiltinTypes.h"
64#include "mlir/IR/OpImplementation.h"
65
66
67//===----------------------------------------------------------------------===//
68// Local Utility Method Definitions
69//===----------------------------------------------------------------------===//
70
71
72static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps1(
73 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
74 unsigned valueIndex) {
75 if (!((::mlir::LLVM::isCompatibleOuterType(type)))) {
76 return op->emitOpError(message: valueKind) << " #" << valueIndex
77 << " must be LLVM dialect-compatible type, but got " << type;
78 }
79 return ::mlir::success();
80}
81
82static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(
83 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
84 unsigned valueIndex) {
85 if (!((((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && ((::llvm::cast<::mlir::VectorType>(Val&: type).getRank()
86 == 1))) && (((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && ([](::mlir::Type elementType) { return (elementType.isSignlessInteger(width: 1)); }(::llvm::cast<::mlir::ShapedType>(Val&: type).getElementType()))) && (((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && (((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
87 == 16)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
88 == 8)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
89 == 4)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
90 == 2)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
91 == 1)))))) {
92 return op->emitOpError(message: valueKind) << " #" << valueIndex
93 << " must be a vector type that matches the size of a SVE predicate, but got " << type;
94 }
95 return ::mlir::success();
96}
97
98static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(
99 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
100 unsigned valueIndex) {
101 if (!((::llvm::isa<::mlir::LLVM::LLVMPointerType>(Val: type)))) {
102 return op->emitOpError(message: valueKind) << " #" << valueIndex
103 << " must be LLVM pointer type, but got " << type;
104 }
105 return ::mlir::success();
106}
107
108static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(
109 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
110 unsigned valueIndex) {
111 if (!((type.isSignlessInteger(width: 32)))) {
112 return op->emitOpError(message: valueKind) << " #" << valueIndex
113 << " must be 32-bit signless integer, but got " << type;
114 }
115 return ::mlir::success();
116}
117
118static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(
119 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
120 unsigned valueIndex) {
121 if (!((((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && ((::llvm::cast<::mlir::VectorType>(Val&: type).getRank()
122 == 1))) && (((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && ([](::mlir::Type elementType) { return (elementType.isSignlessInteger(width: 1)); }(::llvm::cast<::mlir::ShapedType>(Val&: type).getElementType()))) && (((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && (((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
123 == 16)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
124 == 8)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
125 == 4)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
126 == 2)))))) {
127 return op->emitOpError(message: valueKind) << " #" << valueIndex
128 << " must be a vector type that is a supported predicate for the SME MOP instructions, but got " << type;
129 }
130 return ::mlir::success();
131}
132
133static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(
134 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
135 unsigned valueIndex) {
136 if (!((((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && ((::llvm::cast<::mlir::VectorType>(Val&: type).getRank()
137 == 1))) && (((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && ([](::mlir::Type elementType) { return ((elementType.isSignlessInteger(width: 8))) || ((elementType.isSignlessInteger(width: 16))) || ((::llvm::isa<::mlir::BFloat16Type>(Val: elementType))) || ((elementType.isF16())) || ((elementType.isF32())) || ((elementType.isF64())); }(::llvm::cast<::mlir::ShapedType>(Val&: type).getElementType()))) && (((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && (((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
138 == 16)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
139 == 8)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
140 == 4)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
141 == 2)))))) {
142 return op->emitOpError(message: valueKind) << " #" << valueIndex
143 << " must be a vector type that is a supported input for the SME MOP instructions, but got " << type;
144 }
145 return ::mlir::success();
146}
147
148static ::llvm::LogicalResult __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps7(
149 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
150 unsigned valueIndex) {
151 if (!((((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && ((::llvm::cast<::mlir::VectorType>(Val&: type).getRank()
152 == 1))) && (((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && ([](::mlir::Type elementType) { return ((elementType.isSignlessInteger(width: 8))) || ((elementType.isSignlessInteger(width: 16))) || ((elementType.isSignlessInteger(width: 32))) || ((elementType.isSignlessInteger(width: 64))) || ((elementType.isSignlessInteger(width: 128))) || ((elementType.isF16())) || ((::llvm::isa<::mlir::BFloat16Type>(Val: elementType))) || ((elementType.isF32())) || ((elementType.isF64())); }(::llvm::cast<::mlir::ShapedType>(Val&: type).getElementType()))) && (((::llvm::isa<::mlir::ScalableVectorType>(Val: type))) && (((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
153 == 16)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
154 == 8)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
155 == 4)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
156 == 2)) || ((::llvm::cast<::mlir::VectorType>(Val&: type).getNumElements()
157 == 1)))))) {
158 return op->emitOpError(message: valueKind) << " #" << valueIndex
159 << " must be a vector type that matches the size of a SVE vector, but got " << type;
160 }
161 return ::mlir::success();
162}
163
164static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(
165 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
166 if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(Val: attr))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: attr).getType().isSignlessInteger(width: 32)))))
167 return emitError() << "attribute '" << attrName
168 << "' failed to satisfy constraint: 32-bit signless integer attribute";
169 return ::mlir::success();
170}
171static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(
172 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
173 return __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName, emitError: [op]() {
174 return op->emitOpError();
175 });
176}
177namespace mlir::arm_sme {
178
179
180//===----------------------------------------------------------------------===//
181// ::mlir::arm_sme::aarch64_sme_cntsd definitions
182//===----------------------------------------------------------------------===//
183
184namespace detail {
185
186aarch64_sme_cntsdGenericAdaptorBase::aarch64_sme_cntsdGenericAdaptorBase(aarch64_sme_cntsd op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
187
188
189} // namespace detail
190aarch64_sme_cntsdAdaptor::aarch64_sme_cntsdAdaptor(aarch64_sme_cntsd op) : aarch64_sme_cntsdGenericAdaptor(op->getOperands(), op) {}
191
192::llvm::LogicalResult aarch64_sme_cntsdAdaptor::verify(::mlir::Location loc) {
193 return ::mlir::success();
194}
195
196::llvm::LogicalResult aarch64_sme_cntsd::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
197 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
198 if (!dict) {
199 emitError() << "expected DictionaryAttr to set properties";
200 return ::mlir::failure();
201 }
202 return ::mlir::success();
203}
204
205::mlir::Attribute aarch64_sme_cntsd::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
206 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
207 ::mlir::Builder odsBuilder{ctx};
208
209 if (!attrs.empty())
210 return odsBuilder.getDictionaryAttr(value: attrs);
211 return {};
212}
213
214llvm::hash_code aarch64_sme_cntsd::computePropertiesHash(const Properties &prop) {
215 using llvm::hash_value;
216 return llvm::hash_combine();
217}
218
219std::optional<mlir::Attribute> aarch64_sme_cntsd::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
220 return std::nullopt;
221}
222
223void aarch64_sme_cntsd::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
224}
225
226void aarch64_sme_cntsd::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
227}
228
229::llvm::LogicalResult aarch64_sme_cntsd::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
230 return ::mlir::success();
231}
232
233void aarch64_sme_cntsd::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res) {
234 odsState.addTypes(newTypes: res);
235}
236
237aarch64_sme_cntsd aarch64_sme_cntsd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res) {
238 ::mlir::OperationState __state__(location, getOperationName());
239 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res));
240 auto __res__ = builder.create(state: __state__);
241 assert((::llvm::isa<aarch64_sme_cntsd>(__res__)) && "builder didn't return the right type");
242 return ::llvm::cast<aarch64_sme_cntsd>(Val: __res__);
243}
244
245aarch64_sme_cntsd aarch64_sme_cntsd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res) {
246 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res));
247}
248
249void aarch64_sme_cntsd::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
250 assert(resultTypes.size() == 1u && "mismatched number of results");
251 odsState.addTypes(newTypes&: resultTypes);
252}
253
254aarch64_sme_cntsd aarch64_sme_cntsd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
255 ::mlir::OperationState __state__(location, getOperationName());
256 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes));
257 auto __res__ = builder.create(state: __state__);
258 assert((::llvm::isa<aarch64_sme_cntsd>(__res__)) && "builder didn't return the right type");
259 return ::llvm::cast<aarch64_sme_cntsd>(Val: __res__);
260}
261
262aarch64_sme_cntsd aarch64_sme_cntsd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
263 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes));
264}
265
266void aarch64_sme_cntsd::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
267 assert(operands.size() == 0u && "mismatched number of parameters");
268 odsState.addOperands(newOperands: operands);
269 odsState.addAttributes(newAttributes: attributes);
270 assert(resultTypes.size() == 1u && "mismatched number of return types");
271 odsState.addTypes(newTypes&: resultTypes);
272}
273
274aarch64_sme_cntsd aarch64_sme_cntsd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
275 ::mlir::OperationState __state__(location, getOperationName());
276 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
277 auto __res__ = builder.create(state: __state__);
278 assert((::llvm::isa<aarch64_sme_cntsd>(__res__)) && "builder didn't return the right type");
279 return ::llvm::cast<aarch64_sme_cntsd>(Val: __res__);
280}
281
282aarch64_sme_cntsd aarch64_sme_cntsd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
283 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
284}
285
286void aarch64_sme_cntsd::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
287 assert(operands.size() == 0u && "mismatched number of parameters");
288 odsState.addOperands(newOperands: operands);
289 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
290 odsState.addAttributes(newAttributes: discardableAttributes);
291 assert(resultTypes.size() == 1u && "mismatched number of return types");
292 odsState.addTypes(newTypes&: resultTypes);
293}
294
295aarch64_sme_cntsd aarch64_sme_cntsd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
296 ::mlir::OperationState __state__(location, getOperationName());
297 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
298 auto __res__ = builder.create(state: __state__);
299 assert((::llvm::isa<aarch64_sme_cntsd>(__res__)) && "builder didn't return the right type");
300 return ::llvm::cast<aarch64_sme_cntsd>(Val: __res__);
301}
302
303aarch64_sme_cntsd aarch64_sme_cntsd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
304 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
305}
306
307::llvm::LogicalResult aarch64_sme_cntsd::verifyInvariantsImpl() {
308 {
309 unsigned index = 0; (void)index;
310 auto valueGroup0 = getODSResults(index: 0);
311
312 for (auto v : valueGroup0) {
313 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps1(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
314 return ::mlir::failure();
315 }
316 }
317 if (!(((*this->getODSResults(index: 0).begin()).getType().isSignlessInteger(width: 64))))
318 return emitOpError(message: "failed to verify that `res` is i64");
319 return ::mlir::success();
320}
321
322::llvm::LogicalResult aarch64_sme_cntsd::verifyInvariants() {
323 return verifyInvariantsImpl();
324}
325
326::llvm::LogicalResult aarch64_sme_cntsd::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
327 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
328 if (!dict) {
329 emitError() << "expected DictionaryAttr to set properties";
330 return ::mlir::failure();
331 }
332 // keep track of used keys in the input dictionary to be able to error out
333 // if there are some unknown ones.
334 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
335 ::mlir::MLIRContext *ctx = dict.getContext();
336 (void)ctx;
337
338 for (::mlir::NamedAttribute attr : dict) {
339 if (!usedKeys.contains(V: attr.getName()))
340 return emitError() << "unknown key '" << attr.getName() <<
341 "' when parsing properties dictionary";
342 }
343 return ::mlir::success();
344}
345
346
347} // namespace mlir::arm_sme
348MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_cntsd)
349
350namespace mlir::arm_sme {
351
352
353//===----------------------------------------------------------------------===//
354// ::mlir::arm_sme::aarch64_sme_ld1b_horiz definitions
355//===----------------------------------------------------------------------===//
356
357namespace detail {
358
359aarch64_sme_ld1b_horizGenericAdaptorBase::aarch64_sme_ld1b_horizGenericAdaptorBase(aarch64_sme_ld1b_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
360
361uint32_t aarch64_sme_ld1b_horizGenericAdaptorBase::getTileId() {
362 auto attr = getTileIdAttr();
363 return attr.getValue().getZExtValue();
364}
365
366
367} // namespace detail
368aarch64_sme_ld1b_horizAdaptor::aarch64_sme_ld1b_horizAdaptor(aarch64_sme_ld1b_horiz op) : aarch64_sme_ld1b_horizGenericAdaptor(op->getOperands(), op) {}
369
370::llvm::LogicalResult aarch64_sme_ld1b_horizAdaptor::verify(::mlir::Location loc) {
371 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
372 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1b.horiz' op requires attribute 'tile_id'");
373
374 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
375 return emitError(loc, message: "'arm_sme.intr.ld1b.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
376 return ::mlir::success();
377}
378
379::llvm::LogicalResult aarch64_sme_ld1b_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
380 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
381 if (!dict) {
382 emitError() << "expected DictionaryAttr to set properties";
383 return ::mlir::failure();
384 }
385
386 {
387 auto attr = dict.get(name: "tile_id");
388 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
389 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
390 return ::mlir::failure();
391 }
392 return ::mlir::success();
393}
394
395::mlir::Attribute aarch64_sme_ld1b_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
396 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
397 ::mlir::Builder odsBuilder{ctx};
398 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
399
400 if (!attrs.empty())
401 return odsBuilder.getDictionaryAttr(value: attrs);
402 return {};
403}
404
405llvm::hash_code aarch64_sme_ld1b_horiz::computePropertiesHash(const Properties &prop) {
406 using llvm::hash_value;
407 return llvm::hash_combine(
408 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
409}
410
411std::optional<mlir::Attribute> aarch64_sme_ld1b_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
412 if (name == "tile_id")
413 return prop.tile_id;
414 return std::nullopt;
415}
416
417void aarch64_sme_ld1b_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
418 if (name == "tile_id") {
419 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
420 return;
421 }
422}
423
424void aarch64_sme_ld1b_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
425 if (prop.tile_id) {
426 ::mlir::Attribute value = prop.tile_id;
427 ::mlir::Attribute originalValue = value;
428 visitor("tile_id", value);
429 if (value != originalValue)
430 setInherentAttr(prop, name: "tile_id", value);
431 }
432}
433
434::llvm::LogicalResult aarch64_sme_ld1b_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
435 {
436 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
437 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
438 return ::mlir::failure();
439 }
440 return ::mlir::success();
441}
442
443::llvm::LogicalResult aarch64_sme_ld1b_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
444 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
445 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
446 return ::mlir::failure();
447 return ::mlir::success();
448}
449
450void aarch64_sme_ld1b_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
451 auto &prop = getProperties(); (void)prop;
452 writer.writeAttribute(attr: prop.tile_id);
453}
454
455uint32_t aarch64_sme_ld1b_horiz::getTileId() {
456 auto attr = getTileIdAttr();
457 return attr.getValue().getZExtValue();
458}
459
460void aarch64_sme_ld1b_horiz::setTileId(uint32_t attrValue) {
461 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
462}
463
464void aarch64_sme_ld1b_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
465 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
466}
467
468aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
469 ::mlir::OperationState __state__(location, getOperationName());
470 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
471 auto __res__ = builder.create(state: __state__);
472 assert((::llvm::isa<aarch64_sme_ld1b_horiz>(__res__)) && "builder didn't return the right type");
473 return ::llvm::cast<aarch64_sme_ld1b_horiz>(Val: __res__);
474}
475
476aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
477 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
478}
479
480void aarch64_sme_ld1b_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
481 auto &odsProperties = odsState.getOrAddProperties<Properties>();
482 odsState.addOperands(newOperands: predicate);
483 odsState.addOperands(newOperands: load_address);
484 odsState.addOperands(newOperands: tile_slice_index);
485 odsProperties.tile_id = tile_id;
486 assert(resultTypes.size() == 0u && "mismatched number of results");
487 odsState.addTypes(newTypes&: resultTypes);
488}
489
490aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
491 ::mlir::OperationState __state__(location, getOperationName());
492 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
493 auto __res__ = builder.create(state: __state__);
494 assert((::llvm::isa<aarch64_sme_ld1b_horiz>(__res__)) && "builder didn't return the right type");
495 return ::llvm::cast<aarch64_sme_ld1b_horiz>(Val: __res__);
496}
497
498aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
499 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
500}
501
502void aarch64_sme_ld1b_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
503 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
504}
505
506aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
507 ::mlir::OperationState __state__(location, getOperationName());
508 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
509 auto __res__ = builder.create(state: __state__);
510 assert((::llvm::isa<aarch64_sme_ld1b_horiz>(__res__)) && "builder didn't return the right type");
511 return ::llvm::cast<aarch64_sme_ld1b_horiz>(Val: __res__);
512}
513
514aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
515 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
516}
517
518void aarch64_sme_ld1b_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
519 auto &odsProperties = odsState.getOrAddProperties<Properties>();
520 odsState.addOperands(newOperands: predicate);
521 odsState.addOperands(newOperands: load_address);
522 odsState.addOperands(newOperands: tile_slice_index);
523 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
524 assert(resultTypes.size() == 0u && "mismatched number of results");
525 odsState.addTypes(newTypes&: resultTypes);
526}
527
528aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
529 ::mlir::OperationState __state__(location, getOperationName());
530 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
531 auto __res__ = builder.create(state: __state__);
532 assert((::llvm::isa<aarch64_sme_ld1b_horiz>(__res__)) && "builder didn't return the right type");
533 return ::llvm::cast<aarch64_sme_ld1b_horiz>(Val: __res__);
534}
535
536aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
537 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
538}
539
540void aarch64_sme_ld1b_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
541 assert(operands.size() == 3u && "mismatched number of parameters");
542 odsState.addOperands(newOperands: operands);
543 buildPropertiesAndDiscardableAttributes(odsState, attributes);
544 assert(resultTypes.size() == 0u && "mismatched number of return types");
545 odsState.addTypes(newTypes&: resultTypes);
546}
547
548aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
549LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
550
551 ::mlir::OperationState __state__(location, getOperationName());
552 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
553 auto __res__ = builder.create(state: __state__);
554 assert((::llvm::isa<aarch64_sme_ld1b_horiz>(__res__)) && "builder didn't return the right type");
555 return ::llvm::cast<aarch64_sme_ld1b_horiz>(Val: __res__);
556LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
557}
558
559aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
560LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
561
562 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
563LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
564}
565
566void aarch64_sme_ld1b_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
567 assert(operands.size() == 3u && "mismatched number of parameters");
568 odsState.addOperands(newOperands: operands);
569 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
570 odsState.addAttributes(newAttributes: discardableAttributes);
571 assert(resultTypes.size() == 0u && "mismatched number of return types");
572 odsState.addTypes(newTypes&: resultTypes);
573}
574
575aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
576 ::mlir::OperationState __state__(location, getOperationName());
577 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
578 auto __res__ = builder.create(state: __state__);
579 assert((::llvm::isa<aarch64_sme_ld1b_horiz>(__res__)) && "builder didn't return the right type");
580 return ::llvm::cast<aarch64_sme_ld1b_horiz>(Val: __res__);
581}
582
583aarch64_sme_ld1b_horiz aarch64_sme_ld1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
584 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
585}
586
587::llvm::LogicalResult aarch64_sme_ld1b_horiz::verifyInvariantsImpl() {
588 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
589 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
590
591 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
592 return ::mlir::failure();
593 {
594 unsigned index = 0; (void)index;
595 auto valueGroup0 = getODSOperands(index: 0);
596
597 for (auto v : valueGroup0) {
598 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
599 return ::mlir::failure();
600 }
601 auto valueGroup1 = getODSOperands(index: 1);
602
603 for (auto v : valueGroup1) {
604 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
605 return ::mlir::failure();
606 }
607 auto valueGroup2 = getODSOperands(index: 2);
608
609 for (auto v : valueGroup2) {
610 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
611 return ::mlir::failure();
612 }
613 }
614 return ::mlir::success();
615}
616
617::llvm::LogicalResult aarch64_sme_ld1b_horiz::verifyInvariants() {
618 return verifyInvariantsImpl();
619}
620
621::llvm::LogicalResult aarch64_sme_ld1b_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
622 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
623 if (!dict) {
624 emitError() << "expected DictionaryAttr to set properties";
625 return ::mlir::failure();
626 }
627 // keep track of used keys in the input dictionary to be able to error out
628 // if there are some unknown ones.
629 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
630 ::mlir::MLIRContext *ctx = dict.getContext();
631 (void)ctx;
632 {
633
634 auto &propStorage = prop.tile_id;
635 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
636 auto attr = dict.get(name: tile_idAttrName);
637 usedKeys.insert(V: tile_idAttrName);
638 if (attr || /*isRequired=*/true) {
639 if (!attr) {
640 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
641 "Properties.";
642 return ::mlir::failure();
643 }
644 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
645 if (convertedAttr) {
646 propStorage = convertedAttr;
647 } else {
648 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
649 return ::mlir::failure();
650 }
651 }
652 }
653
654 for (::mlir::NamedAttribute attr : dict) {
655 if (!usedKeys.contains(V: attr.getName()))
656 return emitError() << "unknown key '" << attr.getName() <<
657 "' when parsing properties dictionary";
658 }
659 return ::mlir::success();
660}
661
662void aarch64_sme_ld1b_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
663 Properties &properties = odsState.getOrAddProperties<Properties>();
664 populateDefaultProperties(opName: odsState.name, properties);
665 const ::llvm::StringRef inherentNames[] = {"tile_id"};
666 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
667 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
668 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
669 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
670 });
671}
672
673
674} // namespace mlir::arm_sme
675MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1b_horiz)
676MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1b_horizGenericAdaptorBase::Properties)
677
678namespace mlir::arm_sme {
679
680
681//===----------------------------------------------------------------------===//
682// ::mlir::arm_sme::aarch64_sme_ld1b_vert definitions
683//===----------------------------------------------------------------------===//
684
685namespace detail {
686
687aarch64_sme_ld1b_vertGenericAdaptorBase::aarch64_sme_ld1b_vertGenericAdaptorBase(aarch64_sme_ld1b_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
688
689uint32_t aarch64_sme_ld1b_vertGenericAdaptorBase::getTileId() {
690 auto attr = getTileIdAttr();
691 return attr.getValue().getZExtValue();
692}
693
694
695} // namespace detail
696aarch64_sme_ld1b_vertAdaptor::aarch64_sme_ld1b_vertAdaptor(aarch64_sme_ld1b_vert op) : aarch64_sme_ld1b_vertGenericAdaptor(op->getOperands(), op) {}
697
698::llvm::LogicalResult aarch64_sme_ld1b_vertAdaptor::verify(::mlir::Location loc) {
699 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
700 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1b.vert' op requires attribute 'tile_id'");
701
702 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
703 return emitError(loc, message: "'arm_sme.intr.ld1b.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
704 return ::mlir::success();
705}
706
707::llvm::LogicalResult aarch64_sme_ld1b_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
708 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
709 if (!dict) {
710 emitError() << "expected DictionaryAttr to set properties";
711 return ::mlir::failure();
712 }
713
714 {
715 auto attr = dict.get(name: "tile_id");
716 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
717 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
718 return ::mlir::failure();
719 }
720 return ::mlir::success();
721}
722
723::mlir::Attribute aarch64_sme_ld1b_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
724 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
725 ::mlir::Builder odsBuilder{ctx};
726 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
727
728 if (!attrs.empty())
729 return odsBuilder.getDictionaryAttr(value: attrs);
730 return {};
731}
732
733llvm::hash_code aarch64_sme_ld1b_vert::computePropertiesHash(const Properties &prop) {
734 using llvm::hash_value;
735 return llvm::hash_combine(
736 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
737}
738
739std::optional<mlir::Attribute> aarch64_sme_ld1b_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
740 if (name == "tile_id")
741 return prop.tile_id;
742 return std::nullopt;
743}
744
745void aarch64_sme_ld1b_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
746 if (name == "tile_id") {
747 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
748 return;
749 }
750}
751
752void aarch64_sme_ld1b_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
753 if (prop.tile_id) {
754 ::mlir::Attribute value = prop.tile_id;
755 ::mlir::Attribute originalValue = value;
756 visitor("tile_id", value);
757 if (value != originalValue)
758 setInherentAttr(prop, name: "tile_id", value);
759 }
760}
761
762::llvm::LogicalResult aarch64_sme_ld1b_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
763 {
764 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
765 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
766 return ::mlir::failure();
767 }
768 return ::mlir::success();
769}
770
771::llvm::LogicalResult aarch64_sme_ld1b_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
772 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
773 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
774 return ::mlir::failure();
775 return ::mlir::success();
776}
777
778void aarch64_sme_ld1b_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
779 auto &prop = getProperties(); (void)prop;
780 writer.writeAttribute(attr: prop.tile_id);
781}
782
783uint32_t aarch64_sme_ld1b_vert::getTileId() {
784 auto attr = getTileIdAttr();
785 return attr.getValue().getZExtValue();
786}
787
788void aarch64_sme_ld1b_vert::setTileId(uint32_t attrValue) {
789 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
790}
791
792void aarch64_sme_ld1b_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
793 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
794}
795
796aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
797 ::mlir::OperationState __state__(location, getOperationName());
798 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
799 auto __res__ = builder.create(state: __state__);
800 assert((::llvm::isa<aarch64_sme_ld1b_vert>(__res__)) && "builder didn't return the right type");
801 return ::llvm::cast<aarch64_sme_ld1b_vert>(Val: __res__);
802}
803
804aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
805 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
806}
807
808void aarch64_sme_ld1b_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
809 auto &odsProperties = odsState.getOrAddProperties<Properties>();
810 odsState.addOperands(newOperands: predicate);
811 odsState.addOperands(newOperands: load_address);
812 odsState.addOperands(newOperands: tile_slice_index);
813 odsProperties.tile_id = tile_id;
814 assert(resultTypes.size() == 0u && "mismatched number of results");
815 odsState.addTypes(newTypes&: resultTypes);
816}
817
818aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
819 ::mlir::OperationState __state__(location, getOperationName());
820 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
821 auto __res__ = builder.create(state: __state__);
822 assert((::llvm::isa<aarch64_sme_ld1b_vert>(__res__)) && "builder didn't return the right type");
823 return ::llvm::cast<aarch64_sme_ld1b_vert>(Val: __res__);
824}
825
826aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
827 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
828}
829
830void aarch64_sme_ld1b_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
831 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
832}
833
834aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
835 ::mlir::OperationState __state__(location, getOperationName());
836 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
837 auto __res__ = builder.create(state: __state__);
838 assert((::llvm::isa<aarch64_sme_ld1b_vert>(__res__)) && "builder didn't return the right type");
839 return ::llvm::cast<aarch64_sme_ld1b_vert>(Val: __res__);
840}
841
842aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
843 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
844}
845
846void aarch64_sme_ld1b_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
847 auto &odsProperties = odsState.getOrAddProperties<Properties>();
848 odsState.addOperands(newOperands: predicate);
849 odsState.addOperands(newOperands: load_address);
850 odsState.addOperands(newOperands: tile_slice_index);
851 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
852 assert(resultTypes.size() == 0u && "mismatched number of results");
853 odsState.addTypes(newTypes&: resultTypes);
854}
855
856aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
857 ::mlir::OperationState __state__(location, getOperationName());
858 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
859 auto __res__ = builder.create(state: __state__);
860 assert((::llvm::isa<aarch64_sme_ld1b_vert>(__res__)) && "builder didn't return the right type");
861 return ::llvm::cast<aarch64_sme_ld1b_vert>(Val: __res__);
862}
863
864aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
865 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
866}
867
868void aarch64_sme_ld1b_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
869 assert(operands.size() == 3u && "mismatched number of parameters");
870 odsState.addOperands(newOperands: operands);
871 buildPropertiesAndDiscardableAttributes(odsState, attributes);
872 assert(resultTypes.size() == 0u && "mismatched number of return types");
873 odsState.addTypes(newTypes&: resultTypes);
874}
875
876aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
877LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
878
879 ::mlir::OperationState __state__(location, getOperationName());
880 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
881 auto __res__ = builder.create(state: __state__);
882 assert((::llvm::isa<aarch64_sme_ld1b_vert>(__res__)) && "builder didn't return the right type");
883 return ::llvm::cast<aarch64_sme_ld1b_vert>(Val: __res__);
884LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
885}
886
887aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
888LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
889
890 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
891LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
892}
893
894void aarch64_sme_ld1b_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
895 assert(operands.size() == 3u && "mismatched number of parameters");
896 odsState.addOperands(newOperands: operands);
897 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
898 odsState.addAttributes(newAttributes: discardableAttributes);
899 assert(resultTypes.size() == 0u && "mismatched number of return types");
900 odsState.addTypes(newTypes&: resultTypes);
901}
902
903aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
904 ::mlir::OperationState __state__(location, getOperationName());
905 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
906 auto __res__ = builder.create(state: __state__);
907 assert((::llvm::isa<aarch64_sme_ld1b_vert>(__res__)) && "builder didn't return the right type");
908 return ::llvm::cast<aarch64_sme_ld1b_vert>(Val: __res__);
909}
910
911aarch64_sme_ld1b_vert aarch64_sme_ld1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
912 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
913}
914
915::llvm::LogicalResult aarch64_sme_ld1b_vert::verifyInvariantsImpl() {
916 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
917 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
918
919 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
920 return ::mlir::failure();
921 {
922 unsigned index = 0; (void)index;
923 auto valueGroup0 = getODSOperands(index: 0);
924
925 for (auto v : valueGroup0) {
926 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
927 return ::mlir::failure();
928 }
929 auto valueGroup1 = getODSOperands(index: 1);
930
931 for (auto v : valueGroup1) {
932 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
933 return ::mlir::failure();
934 }
935 auto valueGroup2 = getODSOperands(index: 2);
936
937 for (auto v : valueGroup2) {
938 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
939 return ::mlir::failure();
940 }
941 }
942 return ::mlir::success();
943}
944
945::llvm::LogicalResult aarch64_sme_ld1b_vert::verifyInvariants() {
946 return verifyInvariantsImpl();
947}
948
949::llvm::LogicalResult aarch64_sme_ld1b_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
950 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
951 if (!dict) {
952 emitError() << "expected DictionaryAttr to set properties";
953 return ::mlir::failure();
954 }
955 // keep track of used keys in the input dictionary to be able to error out
956 // if there are some unknown ones.
957 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
958 ::mlir::MLIRContext *ctx = dict.getContext();
959 (void)ctx;
960 {
961
962 auto &propStorage = prop.tile_id;
963 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
964 auto attr = dict.get(name: tile_idAttrName);
965 usedKeys.insert(V: tile_idAttrName);
966 if (attr || /*isRequired=*/true) {
967 if (!attr) {
968 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
969 "Properties.";
970 return ::mlir::failure();
971 }
972 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
973 if (convertedAttr) {
974 propStorage = convertedAttr;
975 } else {
976 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
977 return ::mlir::failure();
978 }
979 }
980 }
981
982 for (::mlir::NamedAttribute attr : dict) {
983 if (!usedKeys.contains(V: attr.getName()))
984 return emitError() << "unknown key '" << attr.getName() <<
985 "' when parsing properties dictionary";
986 }
987 return ::mlir::success();
988}
989
990void aarch64_sme_ld1b_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
991 Properties &properties = odsState.getOrAddProperties<Properties>();
992 populateDefaultProperties(opName: odsState.name, properties);
993 const ::llvm::StringRef inherentNames[] = {"tile_id"};
994 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
995 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
996 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
997 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
998 });
999}
1000
1001
1002} // namespace mlir::arm_sme
1003MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1b_vert)
1004MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1b_vertGenericAdaptorBase::Properties)
1005
1006namespace mlir::arm_sme {
1007
1008
1009//===----------------------------------------------------------------------===//
1010// ::mlir::arm_sme::aarch64_sme_ld1d_horiz definitions
1011//===----------------------------------------------------------------------===//
1012
1013namespace detail {
1014
1015aarch64_sme_ld1d_horizGenericAdaptorBase::aarch64_sme_ld1d_horizGenericAdaptorBase(aarch64_sme_ld1d_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
1016
1017uint32_t aarch64_sme_ld1d_horizGenericAdaptorBase::getTileId() {
1018 auto attr = getTileIdAttr();
1019 return attr.getValue().getZExtValue();
1020}
1021
1022
1023} // namespace detail
1024aarch64_sme_ld1d_horizAdaptor::aarch64_sme_ld1d_horizAdaptor(aarch64_sme_ld1d_horiz op) : aarch64_sme_ld1d_horizGenericAdaptor(op->getOperands(), op) {}
1025
1026::llvm::LogicalResult aarch64_sme_ld1d_horizAdaptor::verify(::mlir::Location loc) {
1027 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
1028 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1d.horiz' op requires attribute 'tile_id'");
1029
1030 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
1031 return emitError(loc, message: "'arm_sme.intr.ld1d.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
1032 return ::mlir::success();
1033}
1034
1035::llvm::LogicalResult aarch64_sme_ld1d_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1036 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
1037 if (!dict) {
1038 emitError() << "expected DictionaryAttr to set properties";
1039 return ::mlir::failure();
1040 }
1041
1042 {
1043 auto attr = dict.get(name: "tile_id");
1044 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1045 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
1046 return ::mlir::failure();
1047 }
1048 return ::mlir::success();
1049}
1050
1051::mlir::Attribute aarch64_sme_ld1d_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1052 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1053 ::mlir::Builder odsBuilder{ctx};
1054 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
1055
1056 if (!attrs.empty())
1057 return odsBuilder.getDictionaryAttr(value: attrs);
1058 return {};
1059}
1060
1061llvm::hash_code aarch64_sme_ld1d_horiz::computePropertiesHash(const Properties &prop) {
1062 using llvm::hash_value;
1063 return llvm::hash_combine(
1064 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
1065}
1066
1067std::optional<mlir::Attribute> aarch64_sme_ld1d_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1068 if (name == "tile_id")
1069 return prop.tile_id;
1070 return std::nullopt;
1071}
1072
1073void aarch64_sme_ld1d_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1074 if (name == "tile_id") {
1075 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
1076 return;
1077 }
1078}
1079
1080void aarch64_sme_ld1d_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
1081 if (prop.tile_id) {
1082 ::mlir::Attribute value = prop.tile_id;
1083 ::mlir::Attribute originalValue = value;
1084 visitor("tile_id", value);
1085 if (value != originalValue)
1086 setInherentAttr(prop, name: "tile_id", value);
1087 }
1088}
1089
1090::llvm::LogicalResult aarch64_sme_ld1d_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1091 {
1092 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
1093 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
1094 return ::mlir::failure();
1095 }
1096 return ::mlir::success();
1097}
1098
1099::llvm::LogicalResult aarch64_sme_ld1d_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
1100 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
1101 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
1102 return ::mlir::failure();
1103 return ::mlir::success();
1104}
1105
1106void aarch64_sme_ld1d_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
1107 auto &prop = getProperties(); (void)prop;
1108 writer.writeAttribute(attr: prop.tile_id);
1109}
1110
1111uint32_t aarch64_sme_ld1d_horiz::getTileId() {
1112 auto attr = getTileIdAttr();
1113 return attr.getValue().getZExtValue();
1114}
1115
1116void aarch64_sme_ld1d_horiz::setTileId(uint32_t attrValue) {
1117 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
1118}
1119
1120void aarch64_sme_ld1d_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1121 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
1122}
1123
1124aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1125 ::mlir::OperationState __state__(location, getOperationName());
1126 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1127 auto __res__ = builder.create(state: __state__);
1128 assert((::llvm::isa<aarch64_sme_ld1d_horiz>(__res__)) && "builder didn't return the right type");
1129 return ::llvm::cast<aarch64_sme_ld1d_horiz>(Val: __res__);
1130}
1131
1132aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1133 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1134}
1135
1136void aarch64_sme_ld1d_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1137 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1138 odsState.addOperands(newOperands: predicate);
1139 odsState.addOperands(newOperands: load_address);
1140 odsState.addOperands(newOperands: tile_slice_index);
1141 odsProperties.tile_id = tile_id;
1142 assert(resultTypes.size() == 0u && "mismatched number of results");
1143 odsState.addTypes(newTypes&: resultTypes);
1144}
1145
1146aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1147 ::mlir::OperationState __state__(location, getOperationName());
1148 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1149 auto __res__ = builder.create(state: __state__);
1150 assert((::llvm::isa<aarch64_sme_ld1d_horiz>(__res__)) && "builder didn't return the right type");
1151 return ::llvm::cast<aarch64_sme_ld1d_horiz>(Val: __res__);
1152}
1153
1154aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1155 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1156}
1157
1158void aarch64_sme_ld1d_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1159 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
1160}
1161
1162aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1163 ::mlir::OperationState __state__(location, getOperationName());
1164 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1165 auto __res__ = builder.create(state: __state__);
1166 assert((::llvm::isa<aarch64_sme_ld1d_horiz>(__res__)) && "builder didn't return the right type");
1167 return ::llvm::cast<aarch64_sme_ld1d_horiz>(Val: __res__);
1168}
1169
1170aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1171 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1172}
1173
1174void aarch64_sme_ld1d_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1175 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1176 odsState.addOperands(newOperands: predicate);
1177 odsState.addOperands(newOperands: load_address);
1178 odsState.addOperands(newOperands: tile_slice_index);
1179 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
1180 assert(resultTypes.size() == 0u && "mismatched number of results");
1181 odsState.addTypes(newTypes&: resultTypes);
1182}
1183
1184aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1185 ::mlir::OperationState __state__(location, getOperationName());
1186 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1187 auto __res__ = builder.create(state: __state__);
1188 assert((::llvm::isa<aarch64_sme_ld1d_horiz>(__res__)) && "builder didn't return the right type");
1189 return ::llvm::cast<aarch64_sme_ld1d_horiz>(Val: __res__);
1190}
1191
1192aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1193 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1194}
1195
1196void aarch64_sme_ld1d_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1197 assert(operands.size() == 3u && "mismatched number of parameters");
1198 odsState.addOperands(newOperands: operands);
1199 buildPropertiesAndDiscardableAttributes(odsState, attributes);
1200 assert(resultTypes.size() == 0u && "mismatched number of return types");
1201 odsState.addTypes(newTypes&: resultTypes);
1202}
1203
1204aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1205LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
1206
1207 ::mlir::OperationState __state__(location, getOperationName());
1208 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
1209 auto __res__ = builder.create(state: __state__);
1210 assert((::llvm::isa<aarch64_sme_ld1d_horiz>(__res__)) && "builder didn't return the right type");
1211 return ::llvm::cast<aarch64_sme_ld1d_horiz>(Val: __res__);
1212LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
1213}
1214
1215aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1216LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
1217
1218 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
1219LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
1220}
1221
1222void aarch64_sme_ld1d_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1223 assert(operands.size() == 3u && "mismatched number of parameters");
1224 odsState.addOperands(newOperands: operands);
1225 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
1226 odsState.addAttributes(newAttributes: discardableAttributes);
1227 assert(resultTypes.size() == 0u && "mismatched number of return types");
1228 odsState.addTypes(newTypes&: resultTypes);
1229}
1230
1231aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1232 ::mlir::OperationState __state__(location, getOperationName());
1233 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
1234 auto __res__ = builder.create(state: __state__);
1235 assert((::llvm::isa<aarch64_sme_ld1d_horiz>(__res__)) && "builder didn't return the right type");
1236 return ::llvm::cast<aarch64_sme_ld1d_horiz>(Val: __res__);
1237}
1238
1239aarch64_sme_ld1d_horiz aarch64_sme_ld1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1240 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
1241}
1242
1243::llvm::LogicalResult aarch64_sme_ld1d_horiz::verifyInvariantsImpl() {
1244 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
1245 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
1246
1247 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
1248 return ::mlir::failure();
1249 {
1250 unsigned index = 0; (void)index;
1251 auto valueGroup0 = getODSOperands(index: 0);
1252
1253 for (auto v : valueGroup0) {
1254 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1255 return ::mlir::failure();
1256 }
1257 auto valueGroup1 = getODSOperands(index: 1);
1258
1259 for (auto v : valueGroup1) {
1260 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1261 return ::mlir::failure();
1262 }
1263 auto valueGroup2 = getODSOperands(index: 2);
1264
1265 for (auto v : valueGroup2) {
1266 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1267 return ::mlir::failure();
1268 }
1269 }
1270 return ::mlir::success();
1271}
1272
1273::llvm::LogicalResult aarch64_sme_ld1d_horiz::verifyInvariants() {
1274 return verifyInvariantsImpl();
1275}
1276
1277::llvm::LogicalResult aarch64_sme_ld1d_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1278 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
1279 if (!dict) {
1280 emitError() << "expected DictionaryAttr to set properties";
1281 return ::mlir::failure();
1282 }
1283 // keep track of used keys in the input dictionary to be able to error out
1284 // if there are some unknown ones.
1285 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
1286 ::mlir::MLIRContext *ctx = dict.getContext();
1287 (void)ctx;
1288 {
1289
1290 auto &propStorage = prop.tile_id;
1291 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
1292 auto attr = dict.get(name: tile_idAttrName);
1293 usedKeys.insert(V: tile_idAttrName);
1294 if (attr || /*isRequired=*/true) {
1295 if (!attr) {
1296 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
1297 "Properties.";
1298 return ::mlir::failure();
1299 }
1300 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
1301 if (convertedAttr) {
1302 propStorage = convertedAttr;
1303 } else {
1304 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
1305 return ::mlir::failure();
1306 }
1307 }
1308 }
1309
1310 for (::mlir::NamedAttribute attr : dict) {
1311 if (!usedKeys.contains(V: attr.getName()))
1312 return emitError() << "unknown key '" << attr.getName() <<
1313 "' when parsing properties dictionary";
1314 }
1315 return ::mlir::success();
1316}
1317
1318void aarch64_sme_ld1d_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1319 Properties &properties = odsState.getOrAddProperties<Properties>();
1320 populateDefaultProperties(opName: odsState.name, properties);
1321 const ::llvm::StringRef inherentNames[] = {"tile_id"};
1322 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
1323 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
1324 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
1325 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
1326 });
1327}
1328
1329
1330} // namespace mlir::arm_sme
1331MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1d_horiz)
1332MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1d_horizGenericAdaptorBase::Properties)
1333
1334namespace mlir::arm_sme {
1335
1336
1337//===----------------------------------------------------------------------===//
1338// ::mlir::arm_sme::aarch64_sme_ld1d_vert definitions
1339//===----------------------------------------------------------------------===//
1340
1341namespace detail {
1342
1343aarch64_sme_ld1d_vertGenericAdaptorBase::aarch64_sme_ld1d_vertGenericAdaptorBase(aarch64_sme_ld1d_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
1344
1345uint32_t aarch64_sme_ld1d_vertGenericAdaptorBase::getTileId() {
1346 auto attr = getTileIdAttr();
1347 return attr.getValue().getZExtValue();
1348}
1349
1350
1351} // namespace detail
1352aarch64_sme_ld1d_vertAdaptor::aarch64_sme_ld1d_vertAdaptor(aarch64_sme_ld1d_vert op) : aarch64_sme_ld1d_vertGenericAdaptor(op->getOperands(), op) {}
1353
1354::llvm::LogicalResult aarch64_sme_ld1d_vertAdaptor::verify(::mlir::Location loc) {
1355 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
1356 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1d.vert' op requires attribute 'tile_id'");
1357
1358 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
1359 return emitError(loc, message: "'arm_sme.intr.ld1d.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
1360 return ::mlir::success();
1361}
1362
1363::llvm::LogicalResult aarch64_sme_ld1d_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1364 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
1365 if (!dict) {
1366 emitError() << "expected DictionaryAttr to set properties";
1367 return ::mlir::failure();
1368 }
1369
1370 {
1371 auto attr = dict.get(name: "tile_id");
1372 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1373 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
1374 return ::mlir::failure();
1375 }
1376 return ::mlir::success();
1377}
1378
1379::mlir::Attribute aarch64_sme_ld1d_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1380 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1381 ::mlir::Builder odsBuilder{ctx};
1382 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
1383
1384 if (!attrs.empty())
1385 return odsBuilder.getDictionaryAttr(value: attrs);
1386 return {};
1387}
1388
1389llvm::hash_code aarch64_sme_ld1d_vert::computePropertiesHash(const Properties &prop) {
1390 using llvm::hash_value;
1391 return llvm::hash_combine(
1392 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
1393}
1394
1395std::optional<mlir::Attribute> aarch64_sme_ld1d_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1396 if (name == "tile_id")
1397 return prop.tile_id;
1398 return std::nullopt;
1399}
1400
1401void aarch64_sme_ld1d_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1402 if (name == "tile_id") {
1403 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
1404 return;
1405 }
1406}
1407
1408void aarch64_sme_ld1d_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
1409 if (prop.tile_id) {
1410 ::mlir::Attribute value = prop.tile_id;
1411 ::mlir::Attribute originalValue = value;
1412 visitor("tile_id", value);
1413 if (value != originalValue)
1414 setInherentAttr(prop, name: "tile_id", value);
1415 }
1416}
1417
1418::llvm::LogicalResult aarch64_sme_ld1d_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1419 {
1420 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
1421 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
1422 return ::mlir::failure();
1423 }
1424 return ::mlir::success();
1425}
1426
1427::llvm::LogicalResult aarch64_sme_ld1d_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
1428 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
1429 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
1430 return ::mlir::failure();
1431 return ::mlir::success();
1432}
1433
1434void aarch64_sme_ld1d_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
1435 auto &prop = getProperties(); (void)prop;
1436 writer.writeAttribute(attr: prop.tile_id);
1437}
1438
1439uint32_t aarch64_sme_ld1d_vert::getTileId() {
1440 auto attr = getTileIdAttr();
1441 return attr.getValue().getZExtValue();
1442}
1443
1444void aarch64_sme_ld1d_vert::setTileId(uint32_t attrValue) {
1445 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
1446}
1447
1448void aarch64_sme_ld1d_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1449 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
1450}
1451
1452aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1453 ::mlir::OperationState __state__(location, getOperationName());
1454 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1455 auto __res__ = builder.create(state: __state__);
1456 assert((::llvm::isa<aarch64_sme_ld1d_vert>(__res__)) && "builder didn't return the right type");
1457 return ::llvm::cast<aarch64_sme_ld1d_vert>(Val: __res__);
1458}
1459
1460aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1461 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1462}
1463
1464void aarch64_sme_ld1d_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1465 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1466 odsState.addOperands(newOperands: predicate);
1467 odsState.addOperands(newOperands: load_address);
1468 odsState.addOperands(newOperands: tile_slice_index);
1469 odsProperties.tile_id = tile_id;
1470 assert(resultTypes.size() == 0u && "mismatched number of results");
1471 odsState.addTypes(newTypes&: resultTypes);
1472}
1473
1474aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1475 ::mlir::OperationState __state__(location, getOperationName());
1476 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1477 auto __res__ = builder.create(state: __state__);
1478 assert((::llvm::isa<aarch64_sme_ld1d_vert>(__res__)) && "builder didn't return the right type");
1479 return ::llvm::cast<aarch64_sme_ld1d_vert>(Val: __res__);
1480}
1481
1482aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1483 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1484}
1485
1486void aarch64_sme_ld1d_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1487 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
1488}
1489
1490aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1491 ::mlir::OperationState __state__(location, getOperationName());
1492 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1493 auto __res__ = builder.create(state: __state__);
1494 assert((::llvm::isa<aarch64_sme_ld1d_vert>(__res__)) && "builder didn't return the right type");
1495 return ::llvm::cast<aarch64_sme_ld1d_vert>(Val: __res__);
1496}
1497
1498aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1499 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1500}
1501
1502void aarch64_sme_ld1d_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1503 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1504 odsState.addOperands(newOperands: predicate);
1505 odsState.addOperands(newOperands: load_address);
1506 odsState.addOperands(newOperands: tile_slice_index);
1507 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
1508 assert(resultTypes.size() == 0u && "mismatched number of results");
1509 odsState.addTypes(newTypes&: resultTypes);
1510}
1511
1512aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1513 ::mlir::OperationState __state__(location, getOperationName());
1514 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1515 auto __res__ = builder.create(state: __state__);
1516 assert((::llvm::isa<aarch64_sme_ld1d_vert>(__res__)) && "builder didn't return the right type");
1517 return ::llvm::cast<aarch64_sme_ld1d_vert>(Val: __res__);
1518}
1519
1520aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1521 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1522}
1523
1524void aarch64_sme_ld1d_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1525 assert(operands.size() == 3u && "mismatched number of parameters");
1526 odsState.addOperands(newOperands: operands);
1527 buildPropertiesAndDiscardableAttributes(odsState, attributes);
1528 assert(resultTypes.size() == 0u && "mismatched number of return types");
1529 odsState.addTypes(newTypes&: resultTypes);
1530}
1531
1532aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1533LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
1534
1535 ::mlir::OperationState __state__(location, getOperationName());
1536 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
1537 auto __res__ = builder.create(state: __state__);
1538 assert((::llvm::isa<aarch64_sme_ld1d_vert>(__res__)) && "builder didn't return the right type");
1539 return ::llvm::cast<aarch64_sme_ld1d_vert>(Val: __res__);
1540LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
1541}
1542
1543aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1544LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
1545
1546 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
1547LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
1548}
1549
1550void aarch64_sme_ld1d_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1551 assert(operands.size() == 3u && "mismatched number of parameters");
1552 odsState.addOperands(newOperands: operands);
1553 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
1554 odsState.addAttributes(newAttributes: discardableAttributes);
1555 assert(resultTypes.size() == 0u && "mismatched number of return types");
1556 odsState.addTypes(newTypes&: resultTypes);
1557}
1558
1559aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1560 ::mlir::OperationState __state__(location, getOperationName());
1561 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
1562 auto __res__ = builder.create(state: __state__);
1563 assert((::llvm::isa<aarch64_sme_ld1d_vert>(__res__)) && "builder didn't return the right type");
1564 return ::llvm::cast<aarch64_sme_ld1d_vert>(Val: __res__);
1565}
1566
1567aarch64_sme_ld1d_vert aarch64_sme_ld1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1568 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
1569}
1570
1571::llvm::LogicalResult aarch64_sme_ld1d_vert::verifyInvariantsImpl() {
1572 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
1573 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
1574
1575 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
1576 return ::mlir::failure();
1577 {
1578 unsigned index = 0; (void)index;
1579 auto valueGroup0 = getODSOperands(index: 0);
1580
1581 for (auto v : valueGroup0) {
1582 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1583 return ::mlir::failure();
1584 }
1585 auto valueGroup1 = getODSOperands(index: 1);
1586
1587 for (auto v : valueGroup1) {
1588 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1589 return ::mlir::failure();
1590 }
1591 auto valueGroup2 = getODSOperands(index: 2);
1592
1593 for (auto v : valueGroup2) {
1594 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1595 return ::mlir::failure();
1596 }
1597 }
1598 return ::mlir::success();
1599}
1600
1601::llvm::LogicalResult aarch64_sme_ld1d_vert::verifyInvariants() {
1602 return verifyInvariantsImpl();
1603}
1604
1605::llvm::LogicalResult aarch64_sme_ld1d_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1606 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
1607 if (!dict) {
1608 emitError() << "expected DictionaryAttr to set properties";
1609 return ::mlir::failure();
1610 }
1611 // keep track of used keys in the input dictionary to be able to error out
1612 // if there are some unknown ones.
1613 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
1614 ::mlir::MLIRContext *ctx = dict.getContext();
1615 (void)ctx;
1616 {
1617
1618 auto &propStorage = prop.tile_id;
1619 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
1620 auto attr = dict.get(name: tile_idAttrName);
1621 usedKeys.insert(V: tile_idAttrName);
1622 if (attr || /*isRequired=*/true) {
1623 if (!attr) {
1624 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
1625 "Properties.";
1626 return ::mlir::failure();
1627 }
1628 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
1629 if (convertedAttr) {
1630 propStorage = convertedAttr;
1631 } else {
1632 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
1633 return ::mlir::failure();
1634 }
1635 }
1636 }
1637
1638 for (::mlir::NamedAttribute attr : dict) {
1639 if (!usedKeys.contains(V: attr.getName()))
1640 return emitError() << "unknown key '" << attr.getName() <<
1641 "' when parsing properties dictionary";
1642 }
1643 return ::mlir::success();
1644}
1645
1646void aarch64_sme_ld1d_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1647 Properties &properties = odsState.getOrAddProperties<Properties>();
1648 populateDefaultProperties(opName: odsState.name, properties);
1649 const ::llvm::StringRef inherentNames[] = {"tile_id"};
1650 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
1651 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
1652 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
1653 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
1654 });
1655}
1656
1657
1658} // namespace mlir::arm_sme
1659MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1d_vert)
1660MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1d_vertGenericAdaptorBase::Properties)
1661
1662namespace mlir::arm_sme {
1663
1664
1665//===----------------------------------------------------------------------===//
1666// ::mlir::arm_sme::aarch64_sme_ld1h_horiz definitions
1667//===----------------------------------------------------------------------===//
1668
1669namespace detail {
1670
1671aarch64_sme_ld1h_horizGenericAdaptorBase::aarch64_sme_ld1h_horizGenericAdaptorBase(aarch64_sme_ld1h_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
1672
1673uint32_t aarch64_sme_ld1h_horizGenericAdaptorBase::getTileId() {
1674 auto attr = getTileIdAttr();
1675 return attr.getValue().getZExtValue();
1676}
1677
1678
1679} // namespace detail
1680aarch64_sme_ld1h_horizAdaptor::aarch64_sme_ld1h_horizAdaptor(aarch64_sme_ld1h_horiz op) : aarch64_sme_ld1h_horizGenericAdaptor(op->getOperands(), op) {}
1681
1682::llvm::LogicalResult aarch64_sme_ld1h_horizAdaptor::verify(::mlir::Location loc) {
1683 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
1684 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1h.horiz' op requires attribute 'tile_id'");
1685
1686 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
1687 return emitError(loc, message: "'arm_sme.intr.ld1h.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
1688 return ::mlir::success();
1689}
1690
1691::llvm::LogicalResult aarch64_sme_ld1h_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1692 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
1693 if (!dict) {
1694 emitError() << "expected DictionaryAttr to set properties";
1695 return ::mlir::failure();
1696 }
1697
1698 {
1699 auto attr = dict.get(name: "tile_id");
1700 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1701 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
1702 return ::mlir::failure();
1703 }
1704 return ::mlir::success();
1705}
1706
1707::mlir::Attribute aarch64_sme_ld1h_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1708 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1709 ::mlir::Builder odsBuilder{ctx};
1710 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
1711
1712 if (!attrs.empty())
1713 return odsBuilder.getDictionaryAttr(value: attrs);
1714 return {};
1715}
1716
1717llvm::hash_code aarch64_sme_ld1h_horiz::computePropertiesHash(const Properties &prop) {
1718 using llvm::hash_value;
1719 return llvm::hash_combine(
1720 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
1721}
1722
1723std::optional<mlir::Attribute> aarch64_sme_ld1h_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1724 if (name == "tile_id")
1725 return prop.tile_id;
1726 return std::nullopt;
1727}
1728
1729void aarch64_sme_ld1h_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1730 if (name == "tile_id") {
1731 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
1732 return;
1733 }
1734}
1735
1736void aarch64_sme_ld1h_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
1737 if (prop.tile_id) {
1738 ::mlir::Attribute value = prop.tile_id;
1739 ::mlir::Attribute originalValue = value;
1740 visitor("tile_id", value);
1741 if (value != originalValue)
1742 setInherentAttr(prop, name: "tile_id", value);
1743 }
1744}
1745
1746::llvm::LogicalResult aarch64_sme_ld1h_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1747 {
1748 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
1749 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
1750 return ::mlir::failure();
1751 }
1752 return ::mlir::success();
1753}
1754
1755::llvm::LogicalResult aarch64_sme_ld1h_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
1756 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
1757 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
1758 return ::mlir::failure();
1759 return ::mlir::success();
1760}
1761
1762void aarch64_sme_ld1h_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
1763 auto &prop = getProperties(); (void)prop;
1764 writer.writeAttribute(attr: prop.tile_id);
1765}
1766
1767uint32_t aarch64_sme_ld1h_horiz::getTileId() {
1768 auto attr = getTileIdAttr();
1769 return attr.getValue().getZExtValue();
1770}
1771
1772void aarch64_sme_ld1h_horiz::setTileId(uint32_t attrValue) {
1773 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
1774}
1775
1776void aarch64_sme_ld1h_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1777 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
1778}
1779
1780aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1781 ::mlir::OperationState __state__(location, getOperationName());
1782 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1783 auto __res__ = builder.create(state: __state__);
1784 assert((::llvm::isa<aarch64_sme_ld1h_horiz>(__res__)) && "builder didn't return the right type");
1785 return ::llvm::cast<aarch64_sme_ld1h_horiz>(Val: __res__);
1786}
1787
1788aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1789 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1790}
1791
1792void aarch64_sme_ld1h_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1793 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1794 odsState.addOperands(newOperands: predicate);
1795 odsState.addOperands(newOperands: load_address);
1796 odsState.addOperands(newOperands: tile_slice_index);
1797 odsProperties.tile_id = tile_id;
1798 assert(resultTypes.size() == 0u && "mismatched number of results");
1799 odsState.addTypes(newTypes&: resultTypes);
1800}
1801
1802aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1803 ::mlir::OperationState __state__(location, getOperationName());
1804 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1805 auto __res__ = builder.create(state: __state__);
1806 assert((::llvm::isa<aarch64_sme_ld1h_horiz>(__res__)) && "builder didn't return the right type");
1807 return ::llvm::cast<aarch64_sme_ld1h_horiz>(Val: __res__);
1808}
1809
1810aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
1811 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1812}
1813
1814void aarch64_sme_ld1h_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1815 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
1816}
1817
1818aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1819 ::mlir::OperationState __state__(location, getOperationName());
1820 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1821 auto __res__ = builder.create(state: __state__);
1822 assert((::llvm::isa<aarch64_sme_ld1h_horiz>(__res__)) && "builder didn't return the right type");
1823 return ::llvm::cast<aarch64_sme_ld1h_horiz>(Val: __res__);
1824}
1825
1826aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1827 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1828}
1829
1830void aarch64_sme_ld1h_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1831 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1832 odsState.addOperands(newOperands: predicate);
1833 odsState.addOperands(newOperands: load_address);
1834 odsState.addOperands(newOperands: tile_slice_index);
1835 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
1836 assert(resultTypes.size() == 0u && "mismatched number of results");
1837 odsState.addTypes(newTypes&: resultTypes);
1838}
1839
1840aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1841 ::mlir::OperationState __state__(location, getOperationName());
1842 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1843 auto __res__ = builder.create(state: __state__);
1844 assert((::llvm::isa<aarch64_sme_ld1h_horiz>(__res__)) && "builder didn't return the right type");
1845 return ::llvm::cast<aarch64_sme_ld1h_horiz>(Val: __res__);
1846}
1847
1848aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
1849 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
1850}
1851
1852void aarch64_sme_ld1h_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1853 assert(operands.size() == 3u && "mismatched number of parameters");
1854 odsState.addOperands(newOperands: operands);
1855 buildPropertiesAndDiscardableAttributes(odsState, attributes);
1856 assert(resultTypes.size() == 0u && "mismatched number of return types");
1857 odsState.addTypes(newTypes&: resultTypes);
1858}
1859
1860aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1861LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
1862
1863 ::mlir::OperationState __state__(location, getOperationName());
1864 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
1865 auto __res__ = builder.create(state: __state__);
1866 assert((::llvm::isa<aarch64_sme_ld1h_horiz>(__res__)) && "builder didn't return the right type");
1867 return ::llvm::cast<aarch64_sme_ld1h_horiz>(Val: __res__);
1868LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
1869}
1870
1871aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1872LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
1873
1874 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
1875LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
1876}
1877
1878void aarch64_sme_ld1h_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1879 assert(operands.size() == 3u && "mismatched number of parameters");
1880 odsState.addOperands(newOperands: operands);
1881 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
1882 odsState.addAttributes(newAttributes: discardableAttributes);
1883 assert(resultTypes.size() == 0u && "mismatched number of return types");
1884 odsState.addTypes(newTypes&: resultTypes);
1885}
1886
1887aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1888 ::mlir::OperationState __state__(location, getOperationName());
1889 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
1890 auto __res__ = builder.create(state: __state__);
1891 assert((::llvm::isa<aarch64_sme_ld1h_horiz>(__res__)) && "builder didn't return the right type");
1892 return ::llvm::cast<aarch64_sme_ld1h_horiz>(Val: __res__);
1893}
1894
1895aarch64_sme_ld1h_horiz aarch64_sme_ld1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1896 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
1897}
1898
1899::llvm::LogicalResult aarch64_sme_ld1h_horiz::verifyInvariantsImpl() {
1900 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
1901 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
1902
1903 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
1904 return ::mlir::failure();
1905 {
1906 unsigned index = 0; (void)index;
1907 auto valueGroup0 = getODSOperands(index: 0);
1908
1909 for (auto v : valueGroup0) {
1910 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1911 return ::mlir::failure();
1912 }
1913 auto valueGroup1 = getODSOperands(index: 1);
1914
1915 for (auto v : valueGroup1) {
1916 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1917 return ::mlir::failure();
1918 }
1919 auto valueGroup2 = getODSOperands(index: 2);
1920
1921 for (auto v : valueGroup2) {
1922 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1923 return ::mlir::failure();
1924 }
1925 }
1926 return ::mlir::success();
1927}
1928
1929::llvm::LogicalResult aarch64_sme_ld1h_horiz::verifyInvariants() {
1930 return verifyInvariantsImpl();
1931}
1932
1933::llvm::LogicalResult aarch64_sme_ld1h_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1934 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
1935 if (!dict) {
1936 emitError() << "expected DictionaryAttr to set properties";
1937 return ::mlir::failure();
1938 }
1939 // keep track of used keys in the input dictionary to be able to error out
1940 // if there are some unknown ones.
1941 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
1942 ::mlir::MLIRContext *ctx = dict.getContext();
1943 (void)ctx;
1944 {
1945
1946 auto &propStorage = prop.tile_id;
1947 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
1948 auto attr = dict.get(name: tile_idAttrName);
1949 usedKeys.insert(V: tile_idAttrName);
1950 if (attr || /*isRequired=*/true) {
1951 if (!attr) {
1952 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
1953 "Properties.";
1954 return ::mlir::failure();
1955 }
1956 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
1957 if (convertedAttr) {
1958 propStorage = convertedAttr;
1959 } else {
1960 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
1961 return ::mlir::failure();
1962 }
1963 }
1964 }
1965
1966 for (::mlir::NamedAttribute attr : dict) {
1967 if (!usedKeys.contains(V: attr.getName()))
1968 return emitError() << "unknown key '" << attr.getName() <<
1969 "' when parsing properties dictionary";
1970 }
1971 return ::mlir::success();
1972}
1973
1974void aarch64_sme_ld1h_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1975 Properties &properties = odsState.getOrAddProperties<Properties>();
1976 populateDefaultProperties(opName: odsState.name, properties);
1977 const ::llvm::StringRef inherentNames[] = {"tile_id"};
1978 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
1979 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
1980 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
1981 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
1982 });
1983}
1984
1985
1986} // namespace mlir::arm_sme
1987MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1h_horiz)
1988MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1h_horizGenericAdaptorBase::Properties)
1989
1990namespace mlir::arm_sme {
1991
1992
1993//===----------------------------------------------------------------------===//
1994// ::mlir::arm_sme::aarch64_sme_ld1h_vert definitions
1995//===----------------------------------------------------------------------===//
1996
1997namespace detail {
1998
1999aarch64_sme_ld1h_vertGenericAdaptorBase::aarch64_sme_ld1h_vertGenericAdaptorBase(aarch64_sme_ld1h_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2000
2001uint32_t aarch64_sme_ld1h_vertGenericAdaptorBase::getTileId() {
2002 auto attr = getTileIdAttr();
2003 return attr.getValue().getZExtValue();
2004}
2005
2006
2007} // namespace detail
2008aarch64_sme_ld1h_vertAdaptor::aarch64_sme_ld1h_vertAdaptor(aarch64_sme_ld1h_vert op) : aarch64_sme_ld1h_vertGenericAdaptor(op->getOperands(), op) {}
2009
2010::llvm::LogicalResult aarch64_sme_ld1h_vertAdaptor::verify(::mlir::Location loc) {
2011 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
2012 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1h.vert' op requires attribute 'tile_id'");
2013
2014 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
2015 return emitError(loc, message: "'arm_sme.intr.ld1h.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
2016 return ::mlir::success();
2017}
2018
2019::llvm::LogicalResult aarch64_sme_ld1h_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2020 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
2021 if (!dict) {
2022 emitError() << "expected DictionaryAttr to set properties";
2023 return ::mlir::failure();
2024 }
2025
2026 {
2027 auto attr = dict.get(name: "tile_id");
2028 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
2029 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
2030 return ::mlir::failure();
2031 }
2032 return ::mlir::success();
2033}
2034
2035::mlir::Attribute aarch64_sme_ld1h_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2036 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2037 ::mlir::Builder odsBuilder{ctx};
2038 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
2039
2040 if (!attrs.empty())
2041 return odsBuilder.getDictionaryAttr(value: attrs);
2042 return {};
2043}
2044
2045llvm::hash_code aarch64_sme_ld1h_vert::computePropertiesHash(const Properties &prop) {
2046 using llvm::hash_value;
2047 return llvm::hash_combine(
2048 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
2049}
2050
2051std::optional<mlir::Attribute> aarch64_sme_ld1h_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2052 if (name == "tile_id")
2053 return prop.tile_id;
2054 return std::nullopt;
2055}
2056
2057void aarch64_sme_ld1h_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2058 if (name == "tile_id") {
2059 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
2060 return;
2061 }
2062}
2063
2064void aarch64_sme_ld1h_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
2065 if (prop.tile_id) {
2066 ::mlir::Attribute value = prop.tile_id;
2067 ::mlir::Attribute originalValue = value;
2068 visitor("tile_id", value);
2069 if (value != originalValue)
2070 setInherentAttr(prop, name: "tile_id", value);
2071 }
2072}
2073
2074::llvm::LogicalResult aarch64_sme_ld1h_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2075 {
2076 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
2077 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
2078 return ::mlir::failure();
2079 }
2080 return ::mlir::success();
2081}
2082
2083::llvm::LogicalResult aarch64_sme_ld1h_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2084 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2085 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
2086 return ::mlir::failure();
2087 return ::mlir::success();
2088}
2089
2090void aarch64_sme_ld1h_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2091 auto &prop = getProperties(); (void)prop;
2092 writer.writeAttribute(attr: prop.tile_id);
2093}
2094
2095uint32_t aarch64_sme_ld1h_vert::getTileId() {
2096 auto attr = getTileIdAttr();
2097 return attr.getValue().getZExtValue();
2098}
2099
2100void aarch64_sme_ld1h_vert::setTileId(uint32_t attrValue) {
2101 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
2102}
2103
2104void aarch64_sme_ld1h_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2105 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
2106}
2107
2108aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2109 ::mlir::OperationState __state__(location, getOperationName());
2110 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2111 auto __res__ = builder.create(state: __state__);
2112 assert((::llvm::isa<aarch64_sme_ld1h_vert>(__res__)) && "builder didn't return the right type");
2113 return ::llvm::cast<aarch64_sme_ld1h_vert>(Val: __res__);
2114}
2115
2116aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2117 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2118}
2119
2120void aarch64_sme_ld1h_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2121 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2122 odsState.addOperands(newOperands: predicate);
2123 odsState.addOperands(newOperands: load_address);
2124 odsState.addOperands(newOperands: tile_slice_index);
2125 odsProperties.tile_id = tile_id;
2126 assert(resultTypes.size() == 0u && "mismatched number of results");
2127 odsState.addTypes(newTypes&: resultTypes);
2128}
2129
2130aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2131 ::mlir::OperationState __state__(location, getOperationName());
2132 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2133 auto __res__ = builder.create(state: __state__);
2134 assert((::llvm::isa<aarch64_sme_ld1h_vert>(__res__)) && "builder didn't return the right type");
2135 return ::llvm::cast<aarch64_sme_ld1h_vert>(Val: __res__);
2136}
2137
2138aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2139 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2140}
2141
2142void aarch64_sme_ld1h_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2143 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
2144}
2145
2146aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2147 ::mlir::OperationState __state__(location, getOperationName());
2148 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2149 auto __res__ = builder.create(state: __state__);
2150 assert((::llvm::isa<aarch64_sme_ld1h_vert>(__res__)) && "builder didn't return the right type");
2151 return ::llvm::cast<aarch64_sme_ld1h_vert>(Val: __res__);
2152}
2153
2154aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2155 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2156}
2157
2158void aarch64_sme_ld1h_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2159 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2160 odsState.addOperands(newOperands: predicate);
2161 odsState.addOperands(newOperands: load_address);
2162 odsState.addOperands(newOperands: tile_slice_index);
2163 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
2164 assert(resultTypes.size() == 0u && "mismatched number of results");
2165 odsState.addTypes(newTypes&: resultTypes);
2166}
2167
2168aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2169 ::mlir::OperationState __state__(location, getOperationName());
2170 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2171 auto __res__ = builder.create(state: __state__);
2172 assert((::llvm::isa<aarch64_sme_ld1h_vert>(__res__)) && "builder didn't return the right type");
2173 return ::llvm::cast<aarch64_sme_ld1h_vert>(Val: __res__);
2174}
2175
2176aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2177 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2178}
2179
2180void aarch64_sme_ld1h_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2181 assert(operands.size() == 3u && "mismatched number of parameters");
2182 odsState.addOperands(newOperands: operands);
2183 buildPropertiesAndDiscardableAttributes(odsState, attributes);
2184 assert(resultTypes.size() == 0u && "mismatched number of return types");
2185 odsState.addTypes(newTypes&: resultTypes);
2186}
2187
2188aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2189LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
2190
2191 ::mlir::OperationState __state__(location, getOperationName());
2192 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2193 auto __res__ = builder.create(state: __state__);
2194 assert((::llvm::isa<aarch64_sme_ld1h_vert>(__res__)) && "builder didn't return the right type");
2195 return ::llvm::cast<aarch64_sme_ld1h_vert>(Val: __res__);
2196LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
2197}
2198
2199aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2200LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
2201
2202 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2203LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
2204}
2205
2206void aarch64_sme_ld1h_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2207 assert(operands.size() == 3u && "mismatched number of parameters");
2208 odsState.addOperands(newOperands: operands);
2209 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
2210 odsState.addAttributes(newAttributes: discardableAttributes);
2211 assert(resultTypes.size() == 0u && "mismatched number of return types");
2212 odsState.addTypes(newTypes&: resultTypes);
2213}
2214
2215aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2216 ::mlir::OperationState __state__(location, getOperationName());
2217 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
2218 auto __res__ = builder.create(state: __state__);
2219 assert((::llvm::isa<aarch64_sme_ld1h_vert>(__res__)) && "builder didn't return the right type");
2220 return ::llvm::cast<aarch64_sme_ld1h_vert>(Val: __res__);
2221}
2222
2223aarch64_sme_ld1h_vert aarch64_sme_ld1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2224 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
2225}
2226
2227::llvm::LogicalResult aarch64_sme_ld1h_vert::verifyInvariantsImpl() {
2228 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
2229 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
2230
2231 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
2232 return ::mlir::failure();
2233 {
2234 unsigned index = 0; (void)index;
2235 auto valueGroup0 = getODSOperands(index: 0);
2236
2237 for (auto v : valueGroup0) {
2238 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2239 return ::mlir::failure();
2240 }
2241 auto valueGroup1 = getODSOperands(index: 1);
2242
2243 for (auto v : valueGroup1) {
2244 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2245 return ::mlir::failure();
2246 }
2247 auto valueGroup2 = getODSOperands(index: 2);
2248
2249 for (auto v : valueGroup2) {
2250 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2251 return ::mlir::failure();
2252 }
2253 }
2254 return ::mlir::success();
2255}
2256
2257::llvm::LogicalResult aarch64_sme_ld1h_vert::verifyInvariants() {
2258 return verifyInvariantsImpl();
2259}
2260
2261::llvm::LogicalResult aarch64_sme_ld1h_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2262 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
2263 if (!dict) {
2264 emitError() << "expected DictionaryAttr to set properties";
2265 return ::mlir::failure();
2266 }
2267 // keep track of used keys in the input dictionary to be able to error out
2268 // if there are some unknown ones.
2269 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
2270 ::mlir::MLIRContext *ctx = dict.getContext();
2271 (void)ctx;
2272 {
2273
2274 auto &propStorage = prop.tile_id;
2275 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
2276 auto attr = dict.get(name: tile_idAttrName);
2277 usedKeys.insert(V: tile_idAttrName);
2278 if (attr || /*isRequired=*/true) {
2279 if (!attr) {
2280 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
2281 "Properties.";
2282 return ::mlir::failure();
2283 }
2284 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
2285 if (convertedAttr) {
2286 propStorage = convertedAttr;
2287 } else {
2288 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
2289 return ::mlir::failure();
2290 }
2291 }
2292 }
2293
2294 for (::mlir::NamedAttribute attr : dict) {
2295 if (!usedKeys.contains(V: attr.getName()))
2296 return emitError() << "unknown key '" << attr.getName() <<
2297 "' when parsing properties dictionary";
2298 }
2299 return ::mlir::success();
2300}
2301
2302void aarch64_sme_ld1h_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2303 Properties &properties = odsState.getOrAddProperties<Properties>();
2304 populateDefaultProperties(opName: odsState.name, properties);
2305 const ::llvm::StringRef inherentNames[] = {"tile_id"};
2306 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
2307 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
2308 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
2309 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
2310 });
2311}
2312
2313
2314} // namespace mlir::arm_sme
2315MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1h_vert)
2316MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1h_vertGenericAdaptorBase::Properties)
2317
2318namespace mlir::arm_sme {
2319
2320
2321//===----------------------------------------------------------------------===//
2322// ::mlir::arm_sme::aarch64_sme_ld1q_horiz definitions
2323//===----------------------------------------------------------------------===//
2324
2325namespace detail {
2326
2327aarch64_sme_ld1q_horizGenericAdaptorBase::aarch64_sme_ld1q_horizGenericAdaptorBase(aarch64_sme_ld1q_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2328
2329uint32_t aarch64_sme_ld1q_horizGenericAdaptorBase::getTileId() {
2330 auto attr = getTileIdAttr();
2331 return attr.getValue().getZExtValue();
2332}
2333
2334
2335} // namespace detail
2336aarch64_sme_ld1q_horizAdaptor::aarch64_sme_ld1q_horizAdaptor(aarch64_sme_ld1q_horiz op) : aarch64_sme_ld1q_horizGenericAdaptor(op->getOperands(), op) {}
2337
2338::llvm::LogicalResult aarch64_sme_ld1q_horizAdaptor::verify(::mlir::Location loc) {
2339 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
2340 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1q.horiz' op requires attribute 'tile_id'");
2341
2342 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
2343 return emitError(loc, message: "'arm_sme.intr.ld1q.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
2344 return ::mlir::success();
2345}
2346
2347::llvm::LogicalResult aarch64_sme_ld1q_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2348 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
2349 if (!dict) {
2350 emitError() << "expected DictionaryAttr to set properties";
2351 return ::mlir::failure();
2352 }
2353
2354 {
2355 auto attr = dict.get(name: "tile_id");
2356 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
2357 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
2358 return ::mlir::failure();
2359 }
2360 return ::mlir::success();
2361}
2362
2363::mlir::Attribute aarch64_sme_ld1q_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2364 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2365 ::mlir::Builder odsBuilder{ctx};
2366 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
2367
2368 if (!attrs.empty())
2369 return odsBuilder.getDictionaryAttr(value: attrs);
2370 return {};
2371}
2372
2373llvm::hash_code aarch64_sme_ld1q_horiz::computePropertiesHash(const Properties &prop) {
2374 using llvm::hash_value;
2375 return llvm::hash_combine(
2376 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
2377}
2378
2379std::optional<mlir::Attribute> aarch64_sme_ld1q_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2380 if (name == "tile_id")
2381 return prop.tile_id;
2382 return std::nullopt;
2383}
2384
2385void aarch64_sme_ld1q_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2386 if (name == "tile_id") {
2387 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
2388 return;
2389 }
2390}
2391
2392void aarch64_sme_ld1q_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
2393 if (prop.tile_id) {
2394 ::mlir::Attribute value = prop.tile_id;
2395 ::mlir::Attribute originalValue = value;
2396 visitor("tile_id", value);
2397 if (value != originalValue)
2398 setInherentAttr(prop, name: "tile_id", value);
2399 }
2400}
2401
2402::llvm::LogicalResult aarch64_sme_ld1q_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2403 {
2404 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
2405 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
2406 return ::mlir::failure();
2407 }
2408 return ::mlir::success();
2409}
2410
2411::llvm::LogicalResult aarch64_sme_ld1q_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2412 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2413 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
2414 return ::mlir::failure();
2415 return ::mlir::success();
2416}
2417
2418void aarch64_sme_ld1q_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2419 auto &prop = getProperties(); (void)prop;
2420 writer.writeAttribute(attr: prop.tile_id);
2421}
2422
2423uint32_t aarch64_sme_ld1q_horiz::getTileId() {
2424 auto attr = getTileIdAttr();
2425 return attr.getValue().getZExtValue();
2426}
2427
2428void aarch64_sme_ld1q_horiz::setTileId(uint32_t attrValue) {
2429 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
2430}
2431
2432void aarch64_sme_ld1q_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2433 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
2434}
2435
2436aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2437 ::mlir::OperationState __state__(location, getOperationName());
2438 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2439 auto __res__ = builder.create(state: __state__);
2440 assert((::llvm::isa<aarch64_sme_ld1q_horiz>(__res__)) && "builder didn't return the right type");
2441 return ::llvm::cast<aarch64_sme_ld1q_horiz>(Val: __res__);
2442}
2443
2444aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2445 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2446}
2447
2448void aarch64_sme_ld1q_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2449 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2450 odsState.addOperands(newOperands: predicate);
2451 odsState.addOperands(newOperands: load_address);
2452 odsState.addOperands(newOperands: tile_slice_index);
2453 odsProperties.tile_id = tile_id;
2454 assert(resultTypes.size() == 0u && "mismatched number of results");
2455 odsState.addTypes(newTypes&: resultTypes);
2456}
2457
2458aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2459 ::mlir::OperationState __state__(location, getOperationName());
2460 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2461 auto __res__ = builder.create(state: __state__);
2462 assert((::llvm::isa<aarch64_sme_ld1q_horiz>(__res__)) && "builder didn't return the right type");
2463 return ::llvm::cast<aarch64_sme_ld1q_horiz>(Val: __res__);
2464}
2465
2466aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2467 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2468}
2469
2470void aarch64_sme_ld1q_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2471 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
2472}
2473
2474aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2475 ::mlir::OperationState __state__(location, getOperationName());
2476 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2477 auto __res__ = builder.create(state: __state__);
2478 assert((::llvm::isa<aarch64_sme_ld1q_horiz>(__res__)) && "builder didn't return the right type");
2479 return ::llvm::cast<aarch64_sme_ld1q_horiz>(Val: __res__);
2480}
2481
2482aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2483 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2484}
2485
2486void aarch64_sme_ld1q_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2487 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2488 odsState.addOperands(newOperands: predicate);
2489 odsState.addOperands(newOperands: load_address);
2490 odsState.addOperands(newOperands: tile_slice_index);
2491 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
2492 assert(resultTypes.size() == 0u && "mismatched number of results");
2493 odsState.addTypes(newTypes&: resultTypes);
2494}
2495
2496aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2497 ::mlir::OperationState __state__(location, getOperationName());
2498 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2499 auto __res__ = builder.create(state: __state__);
2500 assert((::llvm::isa<aarch64_sme_ld1q_horiz>(__res__)) && "builder didn't return the right type");
2501 return ::llvm::cast<aarch64_sme_ld1q_horiz>(Val: __res__);
2502}
2503
2504aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2505 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2506}
2507
2508void aarch64_sme_ld1q_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2509 assert(operands.size() == 3u && "mismatched number of parameters");
2510 odsState.addOperands(newOperands: operands);
2511 buildPropertiesAndDiscardableAttributes(odsState, attributes);
2512 assert(resultTypes.size() == 0u && "mismatched number of return types");
2513 odsState.addTypes(newTypes&: resultTypes);
2514}
2515
2516aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2517LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
2518
2519 ::mlir::OperationState __state__(location, getOperationName());
2520 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2521 auto __res__ = builder.create(state: __state__);
2522 assert((::llvm::isa<aarch64_sme_ld1q_horiz>(__res__)) && "builder didn't return the right type");
2523 return ::llvm::cast<aarch64_sme_ld1q_horiz>(Val: __res__);
2524LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
2525}
2526
2527aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2528LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
2529
2530 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2531LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
2532}
2533
2534void aarch64_sme_ld1q_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2535 assert(operands.size() == 3u && "mismatched number of parameters");
2536 odsState.addOperands(newOperands: operands);
2537 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
2538 odsState.addAttributes(newAttributes: discardableAttributes);
2539 assert(resultTypes.size() == 0u && "mismatched number of return types");
2540 odsState.addTypes(newTypes&: resultTypes);
2541}
2542
2543aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2544 ::mlir::OperationState __state__(location, getOperationName());
2545 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
2546 auto __res__ = builder.create(state: __state__);
2547 assert((::llvm::isa<aarch64_sme_ld1q_horiz>(__res__)) && "builder didn't return the right type");
2548 return ::llvm::cast<aarch64_sme_ld1q_horiz>(Val: __res__);
2549}
2550
2551aarch64_sme_ld1q_horiz aarch64_sme_ld1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2552 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
2553}
2554
2555::llvm::LogicalResult aarch64_sme_ld1q_horiz::verifyInvariantsImpl() {
2556 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
2557 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
2558
2559 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
2560 return ::mlir::failure();
2561 {
2562 unsigned index = 0; (void)index;
2563 auto valueGroup0 = getODSOperands(index: 0);
2564
2565 for (auto v : valueGroup0) {
2566 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2567 return ::mlir::failure();
2568 }
2569 auto valueGroup1 = getODSOperands(index: 1);
2570
2571 for (auto v : valueGroup1) {
2572 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2573 return ::mlir::failure();
2574 }
2575 auto valueGroup2 = getODSOperands(index: 2);
2576
2577 for (auto v : valueGroup2) {
2578 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2579 return ::mlir::failure();
2580 }
2581 }
2582 return ::mlir::success();
2583}
2584
2585::llvm::LogicalResult aarch64_sme_ld1q_horiz::verifyInvariants() {
2586 return verifyInvariantsImpl();
2587}
2588
2589::llvm::LogicalResult aarch64_sme_ld1q_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2590 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
2591 if (!dict) {
2592 emitError() << "expected DictionaryAttr to set properties";
2593 return ::mlir::failure();
2594 }
2595 // keep track of used keys in the input dictionary to be able to error out
2596 // if there are some unknown ones.
2597 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
2598 ::mlir::MLIRContext *ctx = dict.getContext();
2599 (void)ctx;
2600 {
2601
2602 auto &propStorage = prop.tile_id;
2603 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
2604 auto attr = dict.get(name: tile_idAttrName);
2605 usedKeys.insert(V: tile_idAttrName);
2606 if (attr || /*isRequired=*/true) {
2607 if (!attr) {
2608 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
2609 "Properties.";
2610 return ::mlir::failure();
2611 }
2612 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
2613 if (convertedAttr) {
2614 propStorage = convertedAttr;
2615 } else {
2616 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
2617 return ::mlir::failure();
2618 }
2619 }
2620 }
2621
2622 for (::mlir::NamedAttribute attr : dict) {
2623 if (!usedKeys.contains(V: attr.getName()))
2624 return emitError() << "unknown key '" << attr.getName() <<
2625 "' when parsing properties dictionary";
2626 }
2627 return ::mlir::success();
2628}
2629
2630void aarch64_sme_ld1q_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2631 Properties &properties = odsState.getOrAddProperties<Properties>();
2632 populateDefaultProperties(opName: odsState.name, properties);
2633 const ::llvm::StringRef inherentNames[] = {"tile_id"};
2634 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
2635 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
2636 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
2637 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
2638 });
2639}
2640
2641
2642} // namespace mlir::arm_sme
2643MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1q_horiz)
2644MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1q_horizGenericAdaptorBase::Properties)
2645
2646namespace mlir::arm_sme {
2647
2648
2649//===----------------------------------------------------------------------===//
2650// ::mlir::arm_sme::aarch64_sme_ld1q_vert definitions
2651//===----------------------------------------------------------------------===//
2652
2653namespace detail {
2654
2655aarch64_sme_ld1q_vertGenericAdaptorBase::aarch64_sme_ld1q_vertGenericAdaptorBase(aarch64_sme_ld1q_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2656
2657uint32_t aarch64_sme_ld1q_vertGenericAdaptorBase::getTileId() {
2658 auto attr = getTileIdAttr();
2659 return attr.getValue().getZExtValue();
2660}
2661
2662
2663} // namespace detail
2664aarch64_sme_ld1q_vertAdaptor::aarch64_sme_ld1q_vertAdaptor(aarch64_sme_ld1q_vert op) : aarch64_sme_ld1q_vertGenericAdaptor(op->getOperands(), op) {}
2665
2666::llvm::LogicalResult aarch64_sme_ld1q_vertAdaptor::verify(::mlir::Location loc) {
2667 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
2668 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1q.vert' op requires attribute 'tile_id'");
2669
2670 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
2671 return emitError(loc, message: "'arm_sme.intr.ld1q.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
2672 return ::mlir::success();
2673}
2674
2675::llvm::LogicalResult aarch64_sme_ld1q_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2676 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
2677 if (!dict) {
2678 emitError() << "expected DictionaryAttr to set properties";
2679 return ::mlir::failure();
2680 }
2681
2682 {
2683 auto attr = dict.get(name: "tile_id");
2684 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
2685 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
2686 return ::mlir::failure();
2687 }
2688 return ::mlir::success();
2689}
2690
2691::mlir::Attribute aarch64_sme_ld1q_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2692 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2693 ::mlir::Builder odsBuilder{ctx};
2694 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
2695
2696 if (!attrs.empty())
2697 return odsBuilder.getDictionaryAttr(value: attrs);
2698 return {};
2699}
2700
2701llvm::hash_code aarch64_sme_ld1q_vert::computePropertiesHash(const Properties &prop) {
2702 using llvm::hash_value;
2703 return llvm::hash_combine(
2704 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
2705}
2706
2707std::optional<mlir::Attribute> aarch64_sme_ld1q_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2708 if (name == "tile_id")
2709 return prop.tile_id;
2710 return std::nullopt;
2711}
2712
2713void aarch64_sme_ld1q_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2714 if (name == "tile_id") {
2715 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
2716 return;
2717 }
2718}
2719
2720void aarch64_sme_ld1q_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
2721 if (prop.tile_id) {
2722 ::mlir::Attribute value = prop.tile_id;
2723 ::mlir::Attribute originalValue = value;
2724 visitor("tile_id", value);
2725 if (value != originalValue)
2726 setInherentAttr(prop, name: "tile_id", value);
2727 }
2728}
2729
2730::llvm::LogicalResult aarch64_sme_ld1q_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2731 {
2732 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
2733 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
2734 return ::mlir::failure();
2735 }
2736 return ::mlir::success();
2737}
2738
2739::llvm::LogicalResult aarch64_sme_ld1q_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2740 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2741 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
2742 return ::mlir::failure();
2743 return ::mlir::success();
2744}
2745
2746void aarch64_sme_ld1q_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2747 auto &prop = getProperties(); (void)prop;
2748 writer.writeAttribute(attr: prop.tile_id);
2749}
2750
2751uint32_t aarch64_sme_ld1q_vert::getTileId() {
2752 auto attr = getTileIdAttr();
2753 return attr.getValue().getZExtValue();
2754}
2755
2756void aarch64_sme_ld1q_vert::setTileId(uint32_t attrValue) {
2757 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
2758}
2759
2760void aarch64_sme_ld1q_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2761 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
2762}
2763
2764aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2765 ::mlir::OperationState __state__(location, getOperationName());
2766 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2767 auto __res__ = builder.create(state: __state__);
2768 assert((::llvm::isa<aarch64_sme_ld1q_vert>(__res__)) && "builder didn't return the right type");
2769 return ::llvm::cast<aarch64_sme_ld1q_vert>(Val: __res__);
2770}
2771
2772aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2773 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2774}
2775
2776void aarch64_sme_ld1q_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2777 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2778 odsState.addOperands(newOperands: predicate);
2779 odsState.addOperands(newOperands: load_address);
2780 odsState.addOperands(newOperands: tile_slice_index);
2781 odsProperties.tile_id = tile_id;
2782 assert(resultTypes.size() == 0u && "mismatched number of results");
2783 odsState.addTypes(newTypes&: resultTypes);
2784}
2785
2786aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2787 ::mlir::OperationState __state__(location, getOperationName());
2788 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2789 auto __res__ = builder.create(state: __state__);
2790 assert((::llvm::isa<aarch64_sme_ld1q_vert>(__res__)) && "builder didn't return the right type");
2791 return ::llvm::cast<aarch64_sme_ld1q_vert>(Val: __res__);
2792}
2793
2794aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
2795 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2796}
2797
2798void aarch64_sme_ld1q_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2799 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
2800}
2801
2802aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2803 ::mlir::OperationState __state__(location, getOperationName());
2804 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2805 auto __res__ = builder.create(state: __state__);
2806 assert((::llvm::isa<aarch64_sme_ld1q_vert>(__res__)) && "builder didn't return the right type");
2807 return ::llvm::cast<aarch64_sme_ld1q_vert>(Val: __res__);
2808}
2809
2810aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2811 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2812}
2813
2814void aarch64_sme_ld1q_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2815 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2816 odsState.addOperands(newOperands: predicate);
2817 odsState.addOperands(newOperands: load_address);
2818 odsState.addOperands(newOperands: tile_slice_index);
2819 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
2820 assert(resultTypes.size() == 0u && "mismatched number of results");
2821 odsState.addTypes(newTypes&: resultTypes);
2822}
2823
2824aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2825 ::mlir::OperationState __state__(location, getOperationName());
2826 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2827 auto __res__ = builder.create(state: __state__);
2828 assert((::llvm::isa<aarch64_sme_ld1q_vert>(__res__)) && "builder didn't return the right type");
2829 return ::llvm::cast<aarch64_sme_ld1q_vert>(Val: __res__);
2830}
2831
2832aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
2833 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
2834}
2835
2836void aarch64_sme_ld1q_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2837 assert(operands.size() == 3u && "mismatched number of parameters");
2838 odsState.addOperands(newOperands: operands);
2839 buildPropertiesAndDiscardableAttributes(odsState, attributes);
2840 assert(resultTypes.size() == 0u && "mismatched number of return types");
2841 odsState.addTypes(newTypes&: resultTypes);
2842}
2843
2844aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2845LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
2846
2847 ::mlir::OperationState __state__(location, getOperationName());
2848 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2849 auto __res__ = builder.create(state: __state__);
2850 assert((::llvm::isa<aarch64_sme_ld1q_vert>(__res__)) && "builder didn't return the right type");
2851 return ::llvm::cast<aarch64_sme_ld1q_vert>(Val: __res__);
2852LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
2853}
2854
2855aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2856LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
2857
2858 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2859LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
2860}
2861
2862void aarch64_sme_ld1q_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2863 assert(operands.size() == 3u && "mismatched number of parameters");
2864 odsState.addOperands(newOperands: operands);
2865 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
2866 odsState.addAttributes(newAttributes: discardableAttributes);
2867 assert(resultTypes.size() == 0u && "mismatched number of return types");
2868 odsState.addTypes(newTypes&: resultTypes);
2869}
2870
2871aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2872 ::mlir::OperationState __state__(location, getOperationName());
2873 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
2874 auto __res__ = builder.create(state: __state__);
2875 assert((::llvm::isa<aarch64_sme_ld1q_vert>(__res__)) && "builder didn't return the right type");
2876 return ::llvm::cast<aarch64_sme_ld1q_vert>(Val: __res__);
2877}
2878
2879aarch64_sme_ld1q_vert aarch64_sme_ld1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2880 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
2881}
2882
2883::llvm::LogicalResult aarch64_sme_ld1q_vert::verifyInvariantsImpl() {
2884 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
2885 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
2886
2887 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
2888 return ::mlir::failure();
2889 {
2890 unsigned index = 0; (void)index;
2891 auto valueGroup0 = getODSOperands(index: 0);
2892
2893 for (auto v : valueGroup0) {
2894 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2895 return ::mlir::failure();
2896 }
2897 auto valueGroup1 = getODSOperands(index: 1);
2898
2899 for (auto v : valueGroup1) {
2900 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2901 return ::mlir::failure();
2902 }
2903 auto valueGroup2 = getODSOperands(index: 2);
2904
2905 for (auto v : valueGroup2) {
2906 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2907 return ::mlir::failure();
2908 }
2909 }
2910 return ::mlir::success();
2911}
2912
2913::llvm::LogicalResult aarch64_sme_ld1q_vert::verifyInvariants() {
2914 return verifyInvariantsImpl();
2915}
2916
2917::llvm::LogicalResult aarch64_sme_ld1q_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2918 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
2919 if (!dict) {
2920 emitError() << "expected DictionaryAttr to set properties";
2921 return ::mlir::failure();
2922 }
2923 // keep track of used keys in the input dictionary to be able to error out
2924 // if there are some unknown ones.
2925 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
2926 ::mlir::MLIRContext *ctx = dict.getContext();
2927 (void)ctx;
2928 {
2929
2930 auto &propStorage = prop.tile_id;
2931 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
2932 auto attr = dict.get(name: tile_idAttrName);
2933 usedKeys.insert(V: tile_idAttrName);
2934 if (attr || /*isRequired=*/true) {
2935 if (!attr) {
2936 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
2937 "Properties.";
2938 return ::mlir::failure();
2939 }
2940 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
2941 if (convertedAttr) {
2942 propStorage = convertedAttr;
2943 } else {
2944 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
2945 return ::mlir::failure();
2946 }
2947 }
2948 }
2949
2950 for (::mlir::NamedAttribute attr : dict) {
2951 if (!usedKeys.contains(V: attr.getName()))
2952 return emitError() << "unknown key '" << attr.getName() <<
2953 "' when parsing properties dictionary";
2954 }
2955 return ::mlir::success();
2956}
2957
2958void aarch64_sme_ld1q_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2959 Properties &properties = odsState.getOrAddProperties<Properties>();
2960 populateDefaultProperties(opName: odsState.name, properties);
2961 const ::llvm::StringRef inherentNames[] = {"tile_id"};
2962 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
2963 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
2964 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
2965 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
2966 });
2967}
2968
2969
2970} // namespace mlir::arm_sme
2971MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1q_vert)
2972MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1q_vertGenericAdaptorBase::Properties)
2973
2974namespace mlir::arm_sme {
2975
2976
2977//===----------------------------------------------------------------------===//
2978// ::mlir::arm_sme::aarch64_sme_ld1w_horiz definitions
2979//===----------------------------------------------------------------------===//
2980
2981namespace detail {
2982
2983aarch64_sme_ld1w_horizGenericAdaptorBase::aarch64_sme_ld1w_horizGenericAdaptorBase(aarch64_sme_ld1w_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2984
2985uint32_t aarch64_sme_ld1w_horizGenericAdaptorBase::getTileId() {
2986 auto attr = getTileIdAttr();
2987 return attr.getValue().getZExtValue();
2988}
2989
2990
2991} // namespace detail
2992aarch64_sme_ld1w_horizAdaptor::aarch64_sme_ld1w_horizAdaptor(aarch64_sme_ld1w_horiz op) : aarch64_sme_ld1w_horizGenericAdaptor(op->getOperands(), op) {}
2993
2994::llvm::LogicalResult aarch64_sme_ld1w_horizAdaptor::verify(::mlir::Location loc) {
2995 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
2996 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1w.horiz' op requires attribute 'tile_id'");
2997
2998 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
2999 return emitError(loc, message: "'arm_sme.intr.ld1w.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
3000 return ::mlir::success();
3001}
3002
3003::llvm::LogicalResult aarch64_sme_ld1w_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3004 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3005 if (!dict) {
3006 emitError() << "expected DictionaryAttr to set properties";
3007 return ::mlir::failure();
3008 }
3009
3010 {
3011 auto attr = dict.get(name: "tile_id");
3012 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3013 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
3014 return ::mlir::failure();
3015 }
3016 return ::mlir::success();
3017}
3018
3019::mlir::Attribute aarch64_sme_ld1w_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
3020 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3021 ::mlir::Builder odsBuilder{ctx};
3022 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
3023
3024 if (!attrs.empty())
3025 return odsBuilder.getDictionaryAttr(value: attrs);
3026 return {};
3027}
3028
3029llvm::hash_code aarch64_sme_ld1w_horiz::computePropertiesHash(const Properties &prop) {
3030 using llvm::hash_value;
3031 return llvm::hash_combine(
3032 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
3033}
3034
3035std::optional<mlir::Attribute> aarch64_sme_ld1w_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
3036 if (name == "tile_id")
3037 return prop.tile_id;
3038 return std::nullopt;
3039}
3040
3041void aarch64_sme_ld1w_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
3042 if (name == "tile_id") {
3043 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
3044 return;
3045 }
3046}
3047
3048void aarch64_sme_ld1w_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
3049 if (prop.tile_id) {
3050 ::mlir::Attribute value = prop.tile_id;
3051 ::mlir::Attribute originalValue = value;
3052 visitor("tile_id", value);
3053 if (value != originalValue)
3054 setInherentAttr(prop, name: "tile_id", value);
3055 }
3056}
3057
3058::llvm::LogicalResult aarch64_sme_ld1w_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3059 {
3060 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
3061 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
3062 return ::mlir::failure();
3063 }
3064 return ::mlir::success();
3065}
3066
3067::llvm::LogicalResult aarch64_sme_ld1w_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
3068 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
3069 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
3070 return ::mlir::failure();
3071 return ::mlir::success();
3072}
3073
3074void aarch64_sme_ld1w_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
3075 auto &prop = getProperties(); (void)prop;
3076 writer.writeAttribute(attr: prop.tile_id);
3077}
3078
3079uint32_t aarch64_sme_ld1w_horiz::getTileId() {
3080 auto attr = getTileIdAttr();
3081 return attr.getValue().getZExtValue();
3082}
3083
3084void aarch64_sme_ld1w_horiz::setTileId(uint32_t attrValue) {
3085 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
3086}
3087
3088void aarch64_sme_ld1w_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3089 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
3090}
3091
3092aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3093 ::mlir::OperationState __state__(location, getOperationName());
3094 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3095 auto __res__ = builder.create(state: __state__);
3096 assert((::llvm::isa<aarch64_sme_ld1w_horiz>(__res__)) && "builder didn't return the right type");
3097 return ::llvm::cast<aarch64_sme_ld1w_horiz>(Val: __res__);
3098}
3099
3100aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3101 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3102}
3103
3104void aarch64_sme_ld1w_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3105 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3106 odsState.addOperands(newOperands: predicate);
3107 odsState.addOperands(newOperands: load_address);
3108 odsState.addOperands(newOperands: tile_slice_index);
3109 odsProperties.tile_id = tile_id;
3110 assert(resultTypes.size() == 0u && "mismatched number of results");
3111 odsState.addTypes(newTypes&: resultTypes);
3112}
3113
3114aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3115 ::mlir::OperationState __state__(location, getOperationName());
3116 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3117 auto __res__ = builder.create(state: __state__);
3118 assert((::llvm::isa<aarch64_sme_ld1w_horiz>(__res__)) && "builder didn't return the right type");
3119 return ::llvm::cast<aarch64_sme_ld1w_horiz>(Val: __res__);
3120}
3121
3122aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3123 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3124}
3125
3126void aarch64_sme_ld1w_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3127 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
3128}
3129
3130aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3131 ::mlir::OperationState __state__(location, getOperationName());
3132 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3133 auto __res__ = builder.create(state: __state__);
3134 assert((::llvm::isa<aarch64_sme_ld1w_horiz>(__res__)) && "builder didn't return the right type");
3135 return ::llvm::cast<aarch64_sme_ld1w_horiz>(Val: __res__);
3136}
3137
3138aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3139 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3140}
3141
3142void aarch64_sme_ld1w_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3143 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3144 odsState.addOperands(newOperands: predicate);
3145 odsState.addOperands(newOperands: load_address);
3146 odsState.addOperands(newOperands: tile_slice_index);
3147 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
3148 assert(resultTypes.size() == 0u && "mismatched number of results");
3149 odsState.addTypes(newTypes&: resultTypes);
3150}
3151
3152aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3153 ::mlir::OperationState __state__(location, getOperationName());
3154 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3155 auto __res__ = builder.create(state: __state__);
3156 assert((::llvm::isa<aarch64_sme_ld1w_horiz>(__res__)) && "builder didn't return the right type");
3157 return ::llvm::cast<aarch64_sme_ld1w_horiz>(Val: __res__);
3158}
3159
3160aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3161 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3162}
3163
3164void aarch64_sme_ld1w_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3165 assert(operands.size() == 3u && "mismatched number of parameters");
3166 odsState.addOperands(newOperands: operands);
3167 buildPropertiesAndDiscardableAttributes(odsState, attributes);
3168 assert(resultTypes.size() == 0u && "mismatched number of return types");
3169 odsState.addTypes(newTypes&: resultTypes);
3170}
3171
3172aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3173LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3174
3175 ::mlir::OperationState __state__(location, getOperationName());
3176 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3177 auto __res__ = builder.create(state: __state__);
3178 assert((::llvm::isa<aarch64_sme_ld1w_horiz>(__res__)) && "builder didn't return the right type");
3179 return ::llvm::cast<aarch64_sme_ld1w_horiz>(Val: __res__);
3180LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3181}
3182
3183aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3184LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3185
3186 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3187LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3188}
3189
3190void aarch64_sme_ld1w_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3191 assert(operands.size() == 3u && "mismatched number of parameters");
3192 odsState.addOperands(newOperands: operands);
3193 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
3194 odsState.addAttributes(newAttributes: discardableAttributes);
3195 assert(resultTypes.size() == 0u && "mismatched number of return types");
3196 odsState.addTypes(newTypes&: resultTypes);
3197}
3198
3199aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3200 ::mlir::OperationState __state__(location, getOperationName());
3201 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
3202 auto __res__ = builder.create(state: __state__);
3203 assert((::llvm::isa<aarch64_sme_ld1w_horiz>(__res__)) && "builder didn't return the right type");
3204 return ::llvm::cast<aarch64_sme_ld1w_horiz>(Val: __res__);
3205}
3206
3207aarch64_sme_ld1w_horiz aarch64_sme_ld1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3208 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
3209}
3210
3211::llvm::LogicalResult aarch64_sme_ld1w_horiz::verifyInvariantsImpl() {
3212 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
3213 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
3214
3215 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
3216 return ::mlir::failure();
3217 {
3218 unsigned index = 0; (void)index;
3219 auto valueGroup0 = getODSOperands(index: 0);
3220
3221 for (auto v : valueGroup0) {
3222 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3223 return ::mlir::failure();
3224 }
3225 auto valueGroup1 = getODSOperands(index: 1);
3226
3227 for (auto v : valueGroup1) {
3228 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3229 return ::mlir::failure();
3230 }
3231 auto valueGroup2 = getODSOperands(index: 2);
3232
3233 for (auto v : valueGroup2) {
3234 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3235 return ::mlir::failure();
3236 }
3237 }
3238 return ::mlir::success();
3239}
3240
3241::llvm::LogicalResult aarch64_sme_ld1w_horiz::verifyInvariants() {
3242 return verifyInvariantsImpl();
3243}
3244
3245::llvm::LogicalResult aarch64_sme_ld1w_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3246 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3247 if (!dict) {
3248 emitError() << "expected DictionaryAttr to set properties";
3249 return ::mlir::failure();
3250 }
3251 // keep track of used keys in the input dictionary to be able to error out
3252 // if there are some unknown ones.
3253 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
3254 ::mlir::MLIRContext *ctx = dict.getContext();
3255 (void)ctx;
3256 {
3257
3258 auto &propStorage = prop.tile_id;
3259 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
3260 auto attr = dict.get(name: tile_idAttrName);
3261 usedKeys.insert(V: tile_idAttrName);
3262 if (attr || /*isRequired=*/true) {
3263 if (!attr) {
3264 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
3265 "Properties.";
3266 return ::mlir::failure();
3267 }
3268 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
3269 if (convertedAttr) {
3270 propStorage = convertedAttr;
3271 } else {
3272 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
3273 return ::mlir::failure();
3274 }
3275 }
3276 }
3277
3278 for (::mlir::NamedAttribute attr : dict) {
3279 if (!usedKeys.contains(V: attr.getName()))
3280 return emitError() << "unknown key '" << attr.getName() <<
3281 "' when parsing properties dictionary";
3282 }
3283 return ::mlir::success();
3284}
3285
3286void aarch64_sme_ld1w_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3287 Properties &properties = odsState.getOrAddProperties<Properties>();
3288 populateDefaultProperties(opName: odsState.name, properties);
3289 const ::llvm::StringRef inherentNames[] = {"tile_id"};
3290 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
3291 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
3292 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
3293 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
3294 });
3295}
3296
3297
3298} // namespace mlir::arm_sme
3299MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1w_horiz)
3300MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1w_horizGenericAdaptorBase::Properties)
3301
3302namespace mlir::arm_sme {
3303
3304
3305//===----------------------------------------------------------------------===//
3306// ::mlir::arm_sme::aarch64_sme_ld1w_vert definitions
3307//===----------------------------------------------------------------------===//
3308
3309namespace detail {
3310
3311aarch64_sme_ld1w_vertGenericAdaptorBase::aarch64_sme_ld1w_vertGenericAdaptorBase(aarch64_sme_ld1w_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
3312
3313uint32_t aarch64_sme_ld1w_vertGenericAdaptorBase::getTileId() {
3314 auto attr = getTileIdAttr();
3315 return attr.getValue().getZExtValue();
3316}
3317
3318
3319} // namespace detail
3320aarch64_sme_ld1w_vertAdaptor::aarch64_sme_ld1w_vertAdaptor(aarch64_sme_ld1w_vert op) : aarch64_sme_ld1w_vertGenericAdaptor(op->getOperands(), op) {}
3321
3322::llvm::LogicalResult aarch64_sme_ld1w_vertAdaptor::verify(::mlir::Location loc) {
3323 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
3324 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.ld1w.vert' op requires attribute 'tile_id'");
3325
3326 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
3327 return emitError(loc, message: "'arm_sme.intr.ld1w.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
3328 return ::mlir::success();
3329}
3330
3331::llvm::LogicalResult aarch64_sme_ld1w_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3332 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3333 if (!dict) {
3334 emitError() << "expected DictionaryAttr to set properties";
3335 return ::mlir::failure();
3336 }
3337
3338 {
3339 auto attr = dict.get(name: "tile_id");
3340 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3341 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
3342 return ::mlir::failure();
3343 }
3344 return ::mlir::success();
3345}
3346
3347::mlir::Attribute aarch64_sme_ld1w_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
3348 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3349 ::mlir::Builder odsBuilder{ctx};
3350 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
3351
3352 if (!attrs.empty())
3353 return odsBuilder.getDictionaryAttr(value: attrs);
3354 return {};
3355}
3356
3357llvm::hash_code aarch64_sme_ld1w_vert::computePropertiesHash(const Properties &prop) {
3358 using llvm::hash_value;
3359 return llvm::hash_combine(
3360 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
3361}
3362
3363std::optional<mlir::Attribute> aarch64_sme_ld1w_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
3364 if (name == "tile_id")
3365 return prop.tile_id;
3366 return std::nullopt;
3367}
3368
3369void aarch64_sme_ld1w_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
3370 if (name == "tile_id") {
3371 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
3372 return;
3373 }
3374}
3375
3376void aarch64_sme_ld1w_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
3377 if (prop.tile_id) {
3378 ::mlir::Attribute value = prop.tile_id;
3379 ::mlir::Attribute originalValue = value;
3380 visitor("tile_id", value);
3381 if (value != originalValue)
3382 setInherentAttr(prop, name: "tile_id", value);
3383 }
3384}
3385
3386::llvm::LogicalResult aarch64_sme_ld1w_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3387 {
3388 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
3389 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
3390 return ::mlir::failure();
3391 }
3392 return ::mlir::success();
3393}
3394
3395::llvm::LogicalResult aarch64_sme_ld1w_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
3396 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
3397 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
3398 return ::mlir::failure();
3399 return ::mlir::success();
3400}
3401
3402void aarch64_sme_ld1w_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
3403 auto &prop = getProperties(); (void)prop;
3404 writer.writeAttribute(attr: prop.tile_id);
3405}
3406
3407uint32_t aarch64_sme_ld1w_vert::getTileId() {
3408 auto attr = getTileIdAttr();
3409 return attr.getValue().getZExtValue();
3410}
3411
3412void aarch64_sme_ld1w_vert::setTileId(uint32_t attrValue) {
3413 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
3414}
3415
3416void aarch64_sme_ld1w_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3417 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
3418}
3419
3420aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3421 ::mlir::OperationState __state__(location, getOperationName());
3422 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3423 auto __res__ = builder.create(state: __state__);
3424 assert((::llvm::isa<aarch64_sme_ld1w_vert>(__res__)) && "builder didn't return the right type");
3425 return ::llvm::cast<aarch64_sme_ld1w_vert>(Val: __res__);
3426}
3427
3428aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3429 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3430}
3431
3432void aarch64_sme_ld1w_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3433 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3434 odsState.addOperands(newOperands: predicate);
3435 odsState.addOperands(newOperands: load_address);
3436 odsState.addOperands(newOperands: tile_slice_index);
3437 odsProperties.tile_id = tile_id;
3438 assert(resultTypes.size() == 0u && "mismatched number of results");
3439 odsState.addTypes(newTypes&: resultTypes);
3440}
3441
3442aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3443 ::mlir::OperationState __state__(location, getOperationName());
3444 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3445 auto __res__ = builder.create(state: __state__);
3446 assert((::llvm::isa<aarch64_sme_ld1w_vert>(__res__)) && "builder didn't return the right type");
3447 return ::llvm::cast<aarch64_sme_ld1w_vert>(Val: __res__);
3448}
3449
3450aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
3451 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3452}
3453
3454void aarch64_sme_ld1w_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3455 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, load_address, tile_id, tile_slice_index);
3456}
3457
3458aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3459 ::mlir::OperationState __state__(location, getOperationName());
3460 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3461 auto __res__ = builder.create(state: __state__);
3462 assert((::llvm::isa<aarch64_sme_ld1w_vert>(__res__)) && "builder didn't return the right type");
3463 return ::llvm::cast<aarch64_sme_ld1w_vert>(Val: __res__);
3464}
3465
3466aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3467 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3468}
3469
3470void aarch64_sme_ld1w_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3471 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3472 odsState.addOperands(newOperands: predicate);
3473 odsState.addOperands(newOperands: load_address);
3474 odsState.addOperands(newOperands: tile_slice_index);
3475 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
3476 assert(resultTypes.size() == 0u && "mismatched number of results");
3477 odsState.addTypes(newTypes&: resultTypes);
3478}
3479
3480aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3481 ::mlir::OperationState __state__(location, getOperationName());
3482 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3483 auto __res__ = builder.create(state: __state__);
3484 assert((::llvm::isa<aarch64_sme_ld1w_vert>(__res__)) && "builder didn't return the right type");
3485 return ::llvm::cast<aarch64_sme_ld1w_vert>(Val: __res__);
3486}
3487
3488aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value load_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
3489 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), load_address: std::forward<decltype(load_address)>(t&: load_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
3490}
3491
3492void aarch64_sme_ld1w_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3493 assert(operands.size() == 3u && "mismatched number of parameters");
3494 odsState.addOperands(newOperands: operands);
3495 buildPropertiesAndDiscardableAttributes(odsState, attributes);
3496 assert(resultTypes.size() == 0u && "mismatched number of return types");
3497 odsState.addTypes(newTypes&: resultTypes);
3498}
3499
3500aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3501LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3502
3503 ::mlir::OperationState __state__(location, getOperationName());
3504 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3505 auto __res__ = builder.create(state: __state__);
3506 assert((::llvm::isa<aarch64_sme_ld1w_vert>(__res__)) && "builder didn't return the right type");
3507 return ::llvm::cast<aarch64_sme_ld1w_vert>(Val: __res__);
3508LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3509}
3510
3511aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3512LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3513
3514 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3515LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3516}
3517
3518void aarch64_sme_ld1w_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3519 assert(operands.size() == 3u && "mismatched number of parameters");
3520 odsState.addOperands(newOperands: operands);
3521 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
3522 odsState.addAttributes(newAttributes: discardableAttributes);
3523 assert(resultTypes.size() == 0u && "mismatched number of return types");
3524 odsState.addTypes(newTypes&: resultTypes);
3525}
3526
3527aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3528 ::mlir::OperationState __state__(location, getOperationName());
3529 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
3530 auto __res__ = builder.create(state: __state__);
3531 assert((::llvm::isa<aarch64_sme_ld1w_vert>(__res__)) && "builder didn't return the right type");
3532 return ::llvm::cast<aarch64_sme_ld1w_vert>(Val: __res__);
3533}
3534
3535aarch64_sme_ld1w_vert aarch64_sme_ld1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3536 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
3537}
3538
3539::llvm::LogicalResult aarch64_sme_ld1w_vert::verifyInvariantsImpl() {
3540 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
3541 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
3542
3543 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
3544 return ::mlir::failure();
3545 {
3546 unsigned index = 0; (void)index;
3547 auto valueGroup0 = getODSOperands(index: 0);
3548
3549 for (auto v : valueGroup0) {
3550 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3551 return ::mlir::failure();
3552 }
3553 auto valueGroup1 = getODSOperands(index: 1);
3554
3555 for (auto v : valueGroup1) {
3556 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3557 return ::mlir::failure();
3558 }
3559 auto valueGroup2 = getODSOperands(index: 2);
3560
3561 for (auto v : valueGroup2) {
3562 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3563 return ::mlir::failure();
3564 }
3565 }
3566 return ::mlir::success();
3567}
3568
3569::llvm::LogicalResult aarch64_sme_ld1w_vert::verifyInvariants() {
3570 return verifyInvariantsImpl();
3571}
3572
3573::llvm::LogicalResult aarch64_sme_ld1w_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3574 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3575 if (!dict) {
3576 emitError() << "expected DictionaryAttr to set properties";
3577 return ::mlir::failure();
3578 }
3579 // keep track of used keys in the input dictionary to be able to error out
3580 // if there are some unknown ones.
3581 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
3582 ::mlir::MLIRContext *ctx = dict.getContext();
3583 (void)ctx;
3584 {
3585
3586 auto &propStorage = prop.tile_id;
3587 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
3588 auto attr = dict.get(name: tile_idAttrName);
3589 usedKeys.insert(V: tile_idAttrName);
3590 if (attr || /*isRequired=*/true) {
3591 if (!attr) {
3592 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
3593 "Properties.";
3594 return ::mlir::failure();
3595 }
3596 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
3597 if (convertedAttr) {
3598 propStorage = convertedAttr;
3599 } else {
3600 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
3601 return ::mlir::failure();
3602 }
3603 }
3604 }
3605
3606 for (::mlir::NamedAttribute attr : dict) {
3607 if (!usedKeys.contains(V: attr.getName()))
3608 return emitError() << "unknown key '" << attr.getName() <<
3609 "' when parsing properties dictionary";
3610 }
3611 return ::mlir::success();
3612}
3613
3614void aarch64_sme_ld1w_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3615 Properties &properties = odsState.getOrAddProperties<Properties>();
3616 populateDefaultProperties(opName: odsState.name, properties);
3617 const ::llvm::StringRef inherentNames[] = {"tile_id"};
3618 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
3619 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
3620 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
3621 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
3622 });
3623}
3624
3625
3626} // namespace mlir::arm_sme
3627MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_ld1w_vert)
3628MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_ld1w_vertGenericAdaptorBase::Properties)
3629
3630namespace mlir::arm_sme {
3631
3632
3633//===----------------------------------------------------------------------===//
3634// ::mlir::arm_sme::aarch64_sme_mopa definitions
3635//===----------------------------------------------------------------------===//
3636
3637namespace detail {
3638
3639aarch64_sme_mopaGenericAdaptorBase::aarch64_sme_mopaGenericAdaptorBase(aarch64_sme_mopa op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
3640
3641uint32_t aarch64_sme_mopaGenericAdaptorBase::getTileId() {
3642 auto attr = getTileIdAttr();
3643 return attr.getValue().getZExtValue();
3644}
3645
3646
3647} // namespace detail
3648aarch64_sme_mopaAdaptor::aarch64_sme_mopaAdaptor(aarch64_sme_mopa op) : aarch64_sme_mopaGenericAdaptor(op->getOperands(), op) {}
3649
3650::llvm::LogicalResult aarch64_sme_mopaAdaptor::verify(::mlir::Location loc) {
3651 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
3652 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.mopa' op requires attribute 'tile_id'");
3653
3654 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
3655 return emitError(loc, message: "'arm_sme.intr.mopa' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
3656 return ::mlir::success();
3657}
3658
3659::llvm::LogicalResult aarch64_sme_mopa::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3660 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3661 if (!dict) {
3662 emitError() << "expected DictionaryAttr to set properties";
3663 return ::mlir::failure();
3664 }
3665
3666 {
3667 auto attr = dict.get(name: "tile_id");
3668 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3669 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
3670 return ::mlir::failure();
3671 }
3672 return ::mlir::success();
3673}
3674
3675::mlir::Attribute aarch64_sme_mopa::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
3676 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3677 ::mlir::Builder odsBuilder{ctx};
3678 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
3679
3680 if (!attrs.empty())
3681 return odsBuilder.getDictionaryAttr(value: attrs);
3682 return {};
3683}
3684
3685llvm::hash_code aarch64_sme_mopa::computePropertiesHash(const Properties &prop) {
3686 using llvm::hash_value;
3687 return llvm::hash_combine(
3688 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
3689}
3690
3691std::optional<mlir::Attribute> aarch64_sme_mopa::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
3692 if (name == "tile_id")
3693 return prop.tile_id;
3694 return std::nullopt;
3695}
3696
3697void aarch64_sme_mopa::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
3698 if (name == "tile_id") {
3699 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
3700 return;
3701 }
3702}
3703
3704void aarch64_sme_mopa::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
3705 if (prop.tile_id) {
3706 ::mlir::Attribute value = prop.tile_id;
3707 ::mlir::Attribute originalValue = value;
3708 visitor("tile_id", value);
3709 if (value != originalValue)
3710 setInherentAttr(prop, name: "tile_id", value);
3711 }
3712}
3713
3714::llvm::LogicalResult aarch64_sme_mopa::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3715 {
3716 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
3717 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
3718 return ::mlir::failure();
3719 }
3720 return ::mlir::success();
3721}
3722
3723::llvm::LogicalResult aarch64_sme_mopa::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
3724 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
3725 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
3726 return ::mlir::failure();
3727 return ::mlir::success();
3728}
3729
3730void aarch64_sme_mopa::writeProperties(::mlir::DialectBytecodeWriter &writer) {
3731 auto &prop = getProperties(); (void)prop;
3732 writer.writeAttribute(attr: prop.tile_id);
3733}
3734
3735uint32_t aarch64_sme_mopa::getTileId() {
3736 auto attr = getTileIdAttr();
3737 return attr.getValue().getZExtValue();
3738}
3739
3740void aarch64_sme_mopa::setTileId(uint32_t attrValue) {
3741 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
3742}
3743
3744void aarch64_sme_mopa::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3745 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
3746}
3747
3748aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3749 ::mlir::OperationState __state__(location, getOperationName());
3750 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
3751 auto __res__ = builder.create(state: __state__);
3752 assert((::llvm::isa<aarch64_sme_mopa>(__res__)) && "builder didn't return the right type");
3753 return ::llvm::cast<aarch64_sme_mopa>(Val: __res__);
3754}
3755
3756aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3757 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
3758}
3759
3760void aarch64_sme_mopa::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3761 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3762 odsState.addOperands(newOperands: lhs_predicate);
3763 odsState.addOperands(newOperands: rhs_predicate);
3764 odsState.addOperands(newOperands: lhs_vector);
3765 odsState.addOperands(newOperands: rhs_vector);
3766 odsProperties.tile_id = tile_id;
3767 assert(resultTypes.size() == 0u && "mismatched number of results");
3768 odsState.addTypes(newTypes&: resultTypes);
3769}
3770
3771aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3772 ::mlir::OperationState __state__(location, getOperationName());
3773 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
3774 auto __res__ = builder.create(state: __state__);
3775 assert((::llvm::isa<aarch64_sme_mopa>(__res__)) && "builder didn't return the right type");
3776 return ::llvm::cast<aarch64_sme_mopa>(Val: __res__);
3777}
3778
3779aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3780 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
3781}
3782
3783void aarch64_sme_mopa::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3784 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
3785}
3786
3787aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3788 ::mlir::OperationState __state__(location, getOperationName());
3789 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
3790 auto __res__ = builder.create(state: __state__);
3791 assert((::llvm::isa<aarch64_sme_mopa>(__res__)) && "builder didn't return the right type");
3792 return ::llvm::cast<aarch64_sme_mopa>(Val: __res__);
3793}
3794
3795aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3796 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
3797}
3798
3799void aarch64_sme_mopa::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3800 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3801 odsState.addOperands(newOperands: lhs_predicate);
3802 odsState.addOperands(newOperands: rhs_predicate);
3803 odsState.addOperands(newOperands: lhs_vector);
3804 odsState.addOperands(newOperands: rhs_vector);
3805 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
3806 assert(resultTypes.size() == 0u && "mismatched number of results");
3807 odsState.addTypes(newTypes&: resultTypes);
3808}
3809
3810aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3811 ::mlir::OperationState __state__(location, getOperationName());
3812 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
3813 auto __res__ = builder.create(state: __state__);
3814 assert((::llvm::isa<aarch64_sme_mopa>(__res__)) && "builder didn't return the right type");
3815 return ::llvm::cast<aarch64_sme_mopa>(Val: __res__);
3816}
3817
3818aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
3819 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
3820}
3821
3822void aarch64_sme_mopa::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3823 assert(operands.size() == 4u && "mismatched number of parameters");
3824 odsState.addOperands(newOperands: operands);
3825 buildPropertiesAndDiscardableAttributes(odsState, attributes);
3826 assert(resultTypes.size() == 0u && "mismatched number of return types");
3827 odsState.addTypes(newTypes&: resultTypes);
3828}
3829
3830aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3831LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3832
3833 ::mlir::OperationState __state__(location, getOperationName());
3834 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3835 auto __res__ = builder.create(state: __state__);
3836 assert((::llvm::isa<aarch64_sme_mopa>(__res__)) && "builder didn't return the right type");
3837 return ::llvm::cast<aarch64_sme_mopa>(Val: __res__);
3838LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3839}
3840
3841aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3842LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3843
3844 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3845LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3846}
3847
3848void aarch64_sme_mopa::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3849 assert(operands.size() == 4u && "mismatched number of parameters");
3850 odsState.addOperands(newOperands: operands);
3851 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
3852 odsState.addAttributes(newAttributes: discardableAttributes);
3853 assert(resultTypes.size() == 0u && "mismatched number of return types");
3854 odsState.addTypes(newTypes&: resultTypes);
3855}
3856
3857aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3858 ::mlir::OperationState __state__(location, getOperationName());
3859 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
3860 auto __res__ = builder.create(state: __state__);
3861 assert((::llvm::isa<aarch64_sme_mopa>(__res__)) && "builder didn't return the right type");
3862 return ::llvm::cast<aarch64_sme_mopa>(Val: __res__);
3863}
3864
3865aarch64_sme_mopa aarch64_sme_mopa::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3866 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
3867}
3868
3869::llvm::LogicalResult aarch64_sme_mopa::verifyInvariantsImpl() {
3870 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
3871 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
3872
3873 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
3874 return ::mlir::failure();
3875 {
3876 unsigned index = 0; (void)index;
3877 auto valueGroup0 = getODSOperands(index: 0);
3878
3879 for (auto v : valueGroup0) {
3880 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3881 return ::mlir::failure();
3882 }
3883 auto valueGroup1 = getODSOperands(index: 1);
3884
3885 for (auto v : valueGroup1) {
3886 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3887 return ::mlir::failure();
3888 }
3889 auto valueGroup2 = getODSOperands(index: 2);
3890
3891 for (auto v : valueGroup2) {
3892 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3893 return ::mlir::failure();
3894 }
3895 auto valueGroup3 = getODSOperands(index: 3);
3896
3897 for (auto v : valueGroup3) {
3898 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3899 return ::mlir::failure();
3900 }
3901 }
3902 return ::mlir::success();
3903}
3904
3905::llvm::LogicalResult aarch64_sme_mopa::verifyInvariants() {
3906 return verifyInvariantsImpl();
3907}
3908
3909::llvm::LogicalResult aarch64_sme_mopa::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3910 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3911 if (!dict) {
3912 emitError() << "expected DictionaryAttr to set properties";
3913 return ::mlir::failure();
3914 }
3915 // keep track of used keys in the input dictionary to be able to error out
3916 // if there are some unknown ones.
3917 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
3918 ::mlir::MLIRContext *ctx = dict.getContext();
3919 (void)ctx;
3920 {
3921
3922 auto &propStorage = prop.tile_id;
3923 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
3924 auto attr = dict.get(name: tile_idAttrName);
3925 usedKeys.insert(V: tile_idAttrName);
3926 if (attr || /*isRequired=*/true) {
3927 if (!attr) {
3928 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
3929 "Properties.";
3930 return ::mlir::failure();
3931 }
3932 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
3933 if (convertedAttr) {
3934 propStorage = convertedAttr;
3935 } else {
3936 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
3937 return ::mlir::failure();
3938 }
3939 }
3940 }
3941
3942 for (::mlir::NamedAttribute attr : dict) {
3943 if (!usedKeys.contains(V: attr.getName()))
3944 return emitError() << "unknown key '" << attr.getName() <<
3945 "' when parsing properties dictionary";
3946 }
3947 return ::mlir::success();
3948}
3949
3950void aarch64_sme_mopa::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3951 Properties &properties = odsState.getOrAddProperties<Properties>();
3952 populateDefaultProperties(opName: odsState.name, properties);
3953 const ::llvm::StringRef inherentNames[] = {"tile_id"};
3954 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
3955 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
3956 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
3957 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
3958 });
3959}
3960
3961
3962} // namespace mlir::arm_sme
3963MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_mopa)
3964MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_mopaGenericAdaptorBase::Properties)
3965
3966namespace mlir::arm_sme {
3967
3968
3969//===----------------------------------------------------------------------===//
3970// ::mlir::arm_sme::aarch64_sme_mopa_wide definitions
3971//===----------------------------------------------------------------------===//
3972
3973namespace detail {
3974
3975aarch64_sme_mopa_wideGenericAdaptorBase::aarch64_sme_mopa_wideGenericAdaptorBase(aarch64_sme_mopa_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
3976
3977uint32_t aarch64_sme_mopa_wideGenericAdaptorBase::getTileId() {
3978 auto attr = getTileIdAttr();
3979 return attr.getValue().getZExtValue();
3980}
3981
3982
3983} // namespace detail
3984aarch64_sme_mopa_wideAdaptor::aarch64_sme_mopa_wideAdaptor(aarch64_sme_mopa_wide op) : aarch64_sme_mopa_wideGenericAdaptor(op->getOperands(), op) {}
3985
3986::llvm::LogicalResult aarch64_sme_mopa_wideAdaptor::verify(::mlir::Location loc) {
3987 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
3988 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.mopa.wide' op requires attribute 'tile_id'");
3989
3990 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
3991 return emitError(loc, message: "'arm_sme.intr.mopa.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
3992 return ::mlir::success();
3993}
3994
3995::llvm::LogicalResult aarch64_sme_mopa_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3996 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3997 if (!dict) {
3998 emitError() << "expected DictionaryAttr to set properties";
3999 return ::mlir::failure();
4000 }
4001
4002 {
4003 auto attr = dict.get(name: "tile_id");
4004 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
4005 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
4006 return ::mlir::failure();
4007 }
4008 return ::mlir::success();
4009}
4010
4011::mlir::Attribute aarch64_sme_mopa_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4012 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4013 ::mlir::Builder odsBuilder{ctx};
4014 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
4015
4016 if (!attrs.empty())
4017 return odsBuilder.getDictionaryAttr(value: attrs);
4018 return {};
4019}
4020
4021llvm::hash_code aarch64_sme_mopa_wide::computePropertiesHash(const Properties &prop) {
4022 using llvm::hash_value;
4023 return llvm::hash_combine(
4024 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
4025}
4026
4027std::optional<mlir::Attribute> aarch64_sme_mopa_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4028 if (name == "tile_id")
4029 return prop.tile_id;
4030 return std::nullopt;
4031}
4032
4033void aarch64_sme_mopa_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4034 if (name == "tile_id") {
4035 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
4036 return;
4037 }
4038}
4039
4040void aarch64_sme_mopa_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
4041 if (prop.tile_id) {
4042 ::mlir::Attribute value = prop.tile_id;
4043 ::mlir::Attribute originalValue = value;
4044 visitor("tile_id", value);
4045 if (value != originalValue)
4046 setInherentAttr(prop, name: "tile_id", value);
4047 }
4048}
4049
4050::llvm::LogicalResult aarch64_sme_mopa_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4051 {
4052 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
4053 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
4054 return ::mlir::failure();
4055 }
4056 return ::mlir::success();
4057}
4058
4059::llvm::LogicalResult aarch64_sme_mopa_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
4060 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
4061 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
4062 return ::mlir::failure();
4063 return ::mlir::success();
4064}
4065
4066void aarch64_sme_mopa_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
4067 auto &prop = getProperties(); (void)prop;
4068 writer.writeAttribute(attr: prop.tile_id);
4069}
4070
4071uint32_t aarch64_sme_mopa_wide::getTileId() {
4072 auto attr = getTileIdAttr();
4073 return attr.getValue().getZExtValue();
4074}
4075
4076void aarch64_sme_mopa_wide::setTileId(uint32_t attrValue) {
4077 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
4078}
4079
4080void aarch64_sme_mopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4081 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
4082}
4083
4084aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4085 ::mlir::OperationState __state__(location, getOperationName());
4086 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4087 auto __res__ = builder.create(state: __state__);
4088 assert((::llvm::isa<aarch64_sme_mopa_wide>(__res__)) && "builder didn't return the right type");
4089 return ::llvm::cast<aarch64_sme_mopa_wide>(Val: __res__);
4090}
4091
4092aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4093 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4094}
4095
4096void aarch64_sme_mopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4097 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4098 odsState.addOperands(newOperands: lhs_predicate);
4099 odsState.addOperands(newOperands: rhs_predicate);
4100 odsState.addOperands(newOperands: lhs_vector);
4101 odsState.addOperands(newOperands: rhs_vector);
4102 odsProperties.tile_id = tile_id;
4103 assert(resultTypes.size() == 0u && "mismatched number of results");
4104 odsState.addTypes(newTypes&: resultTypes);
4105}
4106
4107aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4108 ::mlir::OperationState __state__(location, getOperationName());
4109 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4110 auto __res__ = builder.create(state: __state__);
4111 assert((::llvm::isa<aarch64_sme_mopa_wide>(__res__)) && "builder didn't return the right type");
4112 return ::llvm::cast<aarch64_sme_mopa_wide>(Val: __res__);
4113}
4114
4115aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4116 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4117}
4118
4119void aarch64_sme_mopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4120 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
4121}
4122
4123aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4124 ::mlir::OperationState __state__(location, getOperationName());
4125 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4126 auto __res__ = builder.create(state: __state__);
4127 assert((::llvm::isa<aarch64_sme_mopa_wide>(__res__)) && "builder didn't return the right type");
4128 return ::llvm::cast<aarch64_sme_mopa_wide>(Val: __res__);
4129}
4130
4131aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4132 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4133}
4134
4135void aarch64_sme_mopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4136 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4137 odsState.addOperands(newOperands: lhs_predicate);
4138 odsState.addOperands(newOperands: rhs_predicate);
4139 odsState.addOperands(newOperands: lhs_vector);
4140 odsState.addOperands(newOperands: rhs_vector);
4141 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
4142 assert(resultTypes.size() == 0u && "mismatched number of results");
4143 odsState.addTypes(newTypes&: resultTypes);
4144}
4145
4146aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4147 ::mlir::OperationState __state__(location, getOperationName());
4148 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4149 auto __res__ = builder.create(state: __state__);
4150 assert((::llvm::isa<aarch64_sme_mopa_wide>(__res__)) && "builder didn't return the right type");
4151 return ::llvm::cast<aarch64_sme_mopa_wide>(Val: __res__);
4152}
4153
4154aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4155 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4156}
4157
4158void aarch64_sme_mopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4159 assert(operands.size() == 4u && "mismatched number of parameters");
4160 odsState.addOperands(newOperands: operands);
4161 buildPropertiesAndDiscardableAttributes(odsState, attributes);
4162 assert(resultTypes.size() == 0u && "mismatched number of return types");
4163 odsState.addTypes(newTypes&: resultTypes);
4164}
4165
4166aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4167LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4168
4169 ::mlir::OperationState __state__(location, getOperationName());
4170 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4171 auto __res__ = builder.create(state: __state__);
4172 assert((::llvm::isa<aarch64_sme_mopa_wide>(__res__)) && "builder didn't return the right type");
4173 return ::llvm::cast<aarch64_sme_mopa_wide>(Val: __res__);
4174LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4175}
4176
4177aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4178LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4179
4180 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4181LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4182}
4183
4184void aarch64_sme_mopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4185 assert(operands.size() == 4u && "mismatched number of parameters");
4186 odsState.addOperands(newOperands: operands);
4187 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
4188 odsState.addAttributes(newAttributes: discardableAttributes);
4189 assert(resultTypes.size() == 0u && "mismatched number of return types");
4190 odsState.addTypes(newTypes&: resultTypes);
4191}
4192
4193aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4194 ::mlir::OperationState __state__(location, getOperationName());
4195 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
4196 auto __res__ = builder.create(state: __state__);
4197 assert((::llvm::isa<aarch64_sme_mopa_wide>(__res__)) && "builder didn't return the right type");
4198 return ::llvm::cast<aarch64_sme_mopa_wide>(Val: __res__);
4199}
4200
4201aarch64_sme_mopa_wide aarch64_sme_mopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4202 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
4203}
4204
4205::llvm::LogicalResult aarch64_sme_mopa_wide::verifyInvariantsImpl() {
4206 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
4207 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
4208
4209 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
4210 return ::mlir::failure();
4211 {
4212 unsigned index = 0; (void)index;
4213 auto valueGroup0 = getODSOperands(index: 0);
4214
4215 for (auto v : valueGroup0) {
4216 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4217 return ::mlir::failure();
4218 }
4219 auto valueGroup1 = getODSOperands(index: 1);
4220
4221 for (auto v : valueGroup1) {
4222 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4223 return ::mlir::failure();
4224 }
4225 auto valueGroup2 = getODSOperands(index: 2);
4226
4227 for (auto v : valueGroup2) {
4228 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4229 return ::mlir::failure();
4230 }
4231 auto valueGroup3 = getODSOperands(index: 3);
4232
4233 for (auto v : valueGroup3) {
4234 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4235 return ::mlir::failure();
4236 }
4237 }
4238 return ::mlir::success();
4239}
4240
4241::llvm::LogicalResult aarch64_sme_mopa_wide::verifyInvariants() {
4242 return verifyInvariantsImpl();
4243}
4244
4245::llvm::LogicalResult aarch64_sme_mopa_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4246 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
4247 if (!dict) {
4248 emitError() << "expected DictionaryAttr to set properties";
4249 return ::mlir::failure();
4250 }
4251 // keep track of used keys in the input dictionary to be able to error out
4252 // if there are some unknown ones.
4253 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
4254 ::mlir::MLIRContext *ctx = dict.getContext();
4255 (void)ctx;
4256 {
4257
4258 auto &propStorage = prop.tile_id;
4259 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
4260 auto attr = dict.get(name: tile_idAttrName);
4261 usedKeys.insert(V: tile_idAttrName);
4262 if (attr || /*isRequired=*/true) {
4263 if (!attr) {
4264 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
4265 "Properties.";
4266 return ::mlir::failure();
4267 }
4268 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
4269 if (convertedAttr) {
4270 propStorage = convertedAttr;
4271 } else {
4272 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
4273 return ::mlir::failure();
4274 }
4275 }
4276 }
4277
4278 for (::mlir::NamedAttribute attr : dict) {
4279 if (!usedKeys.contains(V: attr.getName()))
4280 return emitError() << "unknown key '" << attr.getName() <<
4281 "' when parsing properties dictionary";
4282 }
4283 return ::mlir::success();
4284}
4285
4286void aarch64_sme_mopa_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4287 Properties &properties = odsState.getOrAddProperties<Properties>();
4288 populateDefaultProperties(opName: odsState.name, properties);
4289 const ::llvm::StringRef inherentNames[] = {"tile_id"};
4290 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
4291 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
4292 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
4293 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
4294 });
4295}
4296
4297
4298} // namespace mlir::arm_sme
4299MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_mopa_wide)
4300MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_mopa_wideGenericAdaptorBase::Properties)
4301
4302namespace mlir::arm_sme {
4303
4304
4305//===----------------------------------------------------------------------===//
4306// ::mlir::arm_sme::aarch64_sme_mops definitions
4307//===----------------------------------------------------------------------===//
4308
4309namespace detail {
4310
4311aarch64_sme_mopsGenericAdaptorBase::aarch64_sme_mopsGenericAdaptorBase(aarch64_sme_mops op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
4312
4313uint32_t aarch64_sme_mopsGenericAdaptorBase::getTileId() {
4314 auto attr = getTileIdAttr();
4315 return attr.getValue().getZExtValue();
4316}
4317
4318
4319} // namespace detail
4320aarch64_sme_mopsAdaptor::aarch64_sme_mopsAdaptor(aarch64_sme_mops op) : aarch64_sme_mopsGenericAdaptor(op->getOperands(), op) {}
4321
4322::llvm::LogicalResult aarch64_sme_mopsAdaptor::verify(::mlir::Location loc) {
4323 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
4324 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.mops' op requires attribute 'tile_id'");
4325
4326 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
4327 return emitError(loc, message: "'arm_sme.intr.mops' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
4328 return ::mlir::success();
4329}
4330
4331::llvm::LogicalResult aarch64_sme_mops::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4332 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
4333 if (!dict) {
4334 emitError() << "expected DictionaryAttr to set properties";
4335 return ::mlir::failure();
4336 }
4337
4338 {
4339 auto attr = dict.get(name: "tile_id");
4340 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
4341 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
4342 return ::mlir::failure();
4343 }
4344 return ::mlir::success();
4345}
4346
4347::mlir::Attribute aarch64_sme_mops::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4348 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4349 ::mlir::Builder odsBuilder{ctx};
4350 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
4351
4352 if (!attrs.empty())
4353 return odsBuilder.getDictionaryAttr(value: attrs);
4354 return {};
4355}
4356
4357llvm::hash_code aarch64_sme_mops::computePropertiesHash(const Properties &prop) {
4358 using llvm::hash_value;
4359 return llvm::hash_combine(
4360 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
4361}
4362
4363std::optional<mlir::Attribute> aarch64_sme_mops::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4364 if (name == "tile_id")
4365 return prop.tile_id;
4366 return std::nullopt;
4367}
4368
4369void aarch64_sme_mops::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4370 if (name == "tile_id") {
4371 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
4372 return;
4373 }
4374}
4375
4376void aarch64_sme_mops::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
4377 if (prop.tile_id) {
4378 ::mlir::Attribute value = prop.tile_id;
4379 ::mlir::Attribute originalValue = value;
4380 visitor("tile_id", value);
4381 if (value != originalValue)
4382 setInherentAttr(prop, name: "tile_id", value);
4383 }
4384}
4385
4386::llvm::LogicalResult aarch64_sme_mops::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4387 {
4388 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
4389 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
4390 return ::mlir::failure();
4391 }
4392 return ::mlir::success();
4393}
4394
4395::llvm::LogicalResult aarch64_sme_mops::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
4396 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
4397 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
4398 return ::mlir::failure();
4399 return ::mlir::success();
4400}
4401
4402void aarch64_sme_mops::writeProperties(::mlir::DialectBytecodeWriter &writer) {
4403 auto &prop = getProperties(); (void)prop;
4404 writer.writeAttribute(attr: prop.tile_id);
4405}
4406
4407uint32_t aarch64_sme_mops::getTileId() {
4408 auto attr = getTileIdAttr();
4409 return attr.getValue().getZExtValue();
4410}
4411
4412void aarch64_sme_mops::setTileId(uint32_t attrValue) {
4413 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
4414}
4415
4416void aarch64_sme_mops::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4417 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
4418}
4419
4420aarch64_sme_mops aarch64_sme_mops::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4421 ::mlir::OperationState __state__(location, getOperationName());
4422 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4423 auto __res__ = builder.create(state: __state__);
4424 assert((::llvm::isa<aarch64_sme_mops>(__res__)) && "builder didn't return the right type");
4425 return ::llvm::cast<aarch64_sme_mops>(Val: __res__);
4426}
4427
4428aarch64_sme_mops aarch64_sme_mops::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4429 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4430}
4431
4432void aarch64_sme_mops::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4433 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4434 odsState.addOperands(newOperands: lhs_predicate);
4435 odsState.addOperands(newOperands: rhs_predicate);
4436 odsState.addOperands(newOperands: lhs_vector);
4437 odsState.addOperands(newOperands: rhs_vector);
4438 odsProperties.tile_id = tile_id;
4439 assert(resultTypes.size() == 0u && "mismatched number of results");
4440 odsState.addTypes(newTypes&: resultTypes);
4441}
4442
4443aarch64_sme_mops aarch64_sme_mops::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4444 ::mlir::OperationState __state__(location, getOperationName());
4445 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4446 auto __res__ = builder.create(state: __state__);
4447 assert((::llvm::isa<aarch64_sme_mops>(__res__)) && "builder didn't return the right type");
4448 return ::llvm::cast<aarch64_sme_mops>(Val: __res__);
4449}
4450
4451aarch64_sme_mops aarch64_sme_mops::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4452 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4453}
4454
4455void aarch64_sme_mops::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4456 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
4457}
4458
4459aarch64_sme_mops aarch64_sme_mops::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4460 ::mlir::OperationState __state__(location, getOperationName());
4461 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4462 auto __res__ = builder.create(state: __state__);
4463 assert((::llvm::isa<aarch64_sme_mops>(__res__)) && "builder didn't return the right type");
4464 return ::llvm::cast<aarch64_sme_mops>(Val: __res__);
4465}
4466
4467aarch64_sme_mops aarch64_sme_mops::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4468 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4469}
4470
4471void aarch64_sme_mops::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4472 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4473 odsState.addOperands(newOperands: lhs_predicate);
4474 odsState.addOperands(newOperands: rhs_predicate);
4475 odsState.addOperands(newOperands: lhs_vector);
4476 odsState.addOperands(newOperands: rhs_vector);
4477 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
4478 assert(resultTypes.size() == 0u && "mismatched number of results");
4479 odsState.addTypes(newTypes&: resultTypes);
4480}
4481
4482aarch64_sme_mops aarch64_sme_mops::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4483 ::mlir::OperationState __state__(location, getOperationName());
4484 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4485 auto __res__ = builder.create(state: __state__);
4486 assert((::llvm::isa<aarch64_sme_mops>(__res__)) && "builder didn't return the right type");
4487 return ::llvm::cast<aarch64_sme_mops>(Val: __res__);
4488}
4489
4490aarch64_sme_mops aarch64_sme_mops::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4491 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4492}
4493
4494void aarch64_sme_mops::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4495 assert(operands.size() == 4u && "mismatched number of parameters");
4496 odsState.addOperands(newOperands: operands);
4497 buildPropertiesAndDiscardableAttributes(odsState, attributes);
4498 assert(resultTypes.size() == 0u && "mismatched number of return types");
4499 odsState.addTypes(newTypes&: resultTypes);
4500}
4501
4502aarch64_sme_mops aarch64_sme_mops::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4503LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4504
4505 ::mlir::OperationState __state__(location, getOperationName());
4506 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4507 auto __res__ = builder.create(state: __state__);
4508 assert((::llvm::isa<aarch64_sme_mops>(__res__)) && "builder didn't return the right type");
4509 return ::llvm::cast<aarch64_sme_mops>(Val: __res__);
4510LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4511}
4512
4513aarch64_sme_mops aarch64_sme_mops::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4514LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4515
4516 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4517LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4518}
4519
4520void aarch64_sme_mops::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4521 assert(operands.size() == 4u && "mismatched number of parameters");
4522 odsState.addOperands(newOperands: operands);
4523 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
4524 odsState.addAttributes(newAttributes: discardableAttributes);
4525 assert(resultTypes.size() == 0u && "mismatched number of return types");
4526 odsState.addTypes(newTypes&: resultTypes);
4527}
4528
4529aarch64_sme_mops aarch64_sme_mops::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4530 ::mlir::OperationState __state__(location, getOperationName());
4531 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
4532 auto __res__ = builder.create(state: __state__);
4533 assert((::llvm::isa<aarch64_sme_mops>(__res__)) && "builder didn't return the right type");
4534 return ::llvm::cast<aarch64_sme_mops>(Val: __res__);
4535}
4536
4537aarch64_sme_mops aarch64_sme_mops::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4538 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
4539}
4540
4541::llvm::LogicalResult aarch64_sme_mops::verifyInvariantsImpl() {
4542 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
4543 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
4544
4545 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
4546 return ::mlir::failure();
4547 {
4548 unsigned index = 0; (void)index;
4549 auto valueGroup0 = getODSOperands(index: 0);
4550
4551 for (auto v : valueGroup0) {
4552 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4553 return ::mlir::failure();
4554 }
4555 auto valueGroup1 = getODSOperands(index: 1);
4556
4557 for (auto v : valueGroup1) {
4558 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4559 return ::mlir::failure();
4560 }
4561 auto valueGroup2 = getODSOperands(index: 2);
4562
4563 for (auto v : valueGroup2) {
4564 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4565 return ::mlir::failure();
4566 }
4567 auto valueGroup3 = getODSOperands(index: 3);
4568
4569 for (auto v : valueGroup3) {
4570 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4571 return ::mlir::failure();
4572 }
4573 }
4574 return ::mlir::success();
4575}
4576
4577::llvm::LogicalResult aarch64_sme_mops::verifyInvariants() {
4578 return verifyInvariantsImpl();
4579}
4580
4581::llvm::LogicalResult aarch64_sme_mops::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4582 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
4583 if (!dict) {
4584 emitError() << "expected DictionaryAttr to set properties";
4585 return ::mlir::failure();
4586 }
4587 // keep track of used keys in the input dictionary to be able to error out
4588 // if there are some unknown ones.
4589 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
4590 ::mlir::MLIRContext *ctx = dict.getContext();
4591 (void)ctx;
4592 {
4593
4594 auto &propStorage = prop.tile_id;
4595 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
4596 auto attr = dict.get(name: tile_idAttrName);
4597 usedKeys.insert(V: tile_idAttrName);
4598 if (attr || /*isRequired=*/true) {
4599 if (!attr) {
4600 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
4601 "Properties.";
4602 return ::mlir::failure();
4603 }
4604 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
4605 if (convertedAttr) {
4606 propStorage = convertedAttr;
4607 } else {
4608 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
4609 return ::mlir::failure();
4610 }
4611 }
4612 }
4613
4614 for (::mlir::NamedAttribute attr : dict) {
4615 if (!usedKeys.contains(V: attr.getName()))
4616 return emitError() << "unknown key '" << attr.getName() <<
4617 "' when parsing properties dictionary";
4618 }
4619 return ::mlir::success();
4620}
4621
4622void aarch64_sme_mops::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4623 Properties &properties = odsState.getOrAddProperties<Properties>();
4624 populateDefaultProperties(opName: odsState.name, properties);
4625 const ::llvm::StringRef inherentNames[] = {"tile_id"};
4626 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
4627 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
4628 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
4629 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
4630 });
4631}
4632
4633
4634} // namespace mlir::arm_sme
4635MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_mops)
4636MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_mopsGenericAdaptorBase::Properties)
4637
4638namespace mlir::arm_sme {
4639
4640
4641//===----------------------------------------------------------------------===//
4642// ::mlir::arm_sme::aarch64_sme_mops_wide definitions
4643//===----------------------------------------------------------------------===//
4644
4645namespace detail {
4646
4647aarch64_sme_mops_wideGenericAdaptorBase::aarch64_sme_mops_wideGenericAdaptorBase(aarch64_sme_mops_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
4648
4649uint32_t aarch64_sme_mops_wideGenericAdaptorBase::getTileId() {
4650 auto attr = getTileIdAttr();
4651 return attr.getValue().getZExtValue();
4652}
4653
4654
4655} // namespace detail
4656aarch64_sme_mops_wideAdaptor::aarch64_sme_mops_wideAdaptor(aarch64_sme_mops_wide op) : aarch64_sme_mops_wideGenericAdaptor(op->getOperands(), op) {}
4657
4658::llvm::LogicalResult aarch64_sme_mops_wideAdaptor::verify(::mlir::Location loc) {
4659 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
4660 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.mops.wide' op requires attribute 'tile_id'");
4661
4662 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
4663 return emitError(loc, message: "'arm_sme.intr.mops.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
4664 return ::mlir::success();
4665}
4666
4667::llvm::LogicalResult aarch64_sme_mops_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4668 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
4669 if (!dict) {
4670 emitError() << "expected DictionaryAttr to set properties";
4671 return ::mlir::failure();
4672 }
4673
4674 {
4675 auto attr = dict.get(name: "tile_id");
4676 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
4677 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
4678 return ::mlir::failure();
4679 }
4680 return ::mlir::success();
4681}
4682
4683::mlir::Attribute aarch64_sme_mops_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4684 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4685 ::mlir::Builder odsBuilder{ctx};
4686 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
4687
4688 if (!attrs.empty())
4689 return odsBuilder.getDictionaryAttr(value: attrs);
4690 return {};
4691}
4692
4693llvm::hash_code aarch64_sme_mops_wide::computePropertiesHash(const Properties &prop) {
4694 using llvm::hash_value;
4695 return llvm::hash_combine(
4696 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
4697}
4698
4699std::optional<mlir::Attribute> aarch64_sme_mops_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4700 if (name == "tile_id")
4701 return prop.tile_id;
4702 return std::nullopt;
4703}
4704
4705void aarch64_sme_mops_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4706 if (name == "tile_id") {
4707 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
4708 return;
4709 }
4710}
4711
4712void aarch64_sme_mops_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
4713 if (prop.tile_id) {
4714 ::mlir::Attribute value = prop.tile_id;
4715 ::mlir::Attribute originalValue = value;
4716 visitor("tile_id", value);
4717 if (value != originalValue)
4718 setInherentAttr(prop, name: "tile_id", value);
4719 }
4720}
4721
4722::llvm::LogicalResult aarch64_sme_mops_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4723 {
4724 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
4725 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
4726 return ::mlir::failure();
4727 }
4728 return ::mlir::success();
4729}
4730
4731::llvm::LogicalResult aarch64_sme_mops_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
4732 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
4733 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
4734 return ::mlir::failure();
4735 return ::mlir::success();
4736}
4737
4738void aarch64_sme_mops_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
4739 auto &prop = getProperties(); (void)prop;
4740 writer.writeAttribute(attr: prop.tile_id);
4741}
4742
4743uint32_t aarch64_sme_mops_wide::getTileId() {
4744 auto attr = getTileIdAttr();
4745 return attr.getValue().getZExtValue();
4746}
4747
4748void aarch64_sme_mops_wide::setTileId(uint32_t attrValue) {
4749 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
4750}
4751
4752void aarch64_sme_mops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4753 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
4754}
4755
4756aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4757 ::mlir::OperationState __state__(location, getOperationName());
4758 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4759 auto __res__ = builder.create(state: __state__);
4760 assert((::llvm::isa<aarch64_sme_mops_wide>(__res__)) && "builder didn't return the right type");
4761 return ::llvm::cast<aarch64_sme_mops_wide>(Val: __res__);
4762}
4763
4764aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4765 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4766}
4767
4768void aarch64_sme_mops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4769 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4770 odsState.addOperands(newOperands: lhs_predicate);
4771 odsState.addOperands(newOperands: rhs_predicate);
4772 odsState.addOperands(newOperands: lhs_vector);
4773 odsState.addOperands(newOperands: rhs_vector);
4774 odsProperties.tile_id = tile_id;
4775 assert(resultTypes.size() == 0u && "mismatched number of results");
4776 odsState.addTypes(newTypes&: resultTypes);
4777}
4778
4779aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4780 ::mlir::OperationState __state__(location, getOperationName());
4781 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4782 auto __res__ = builder.create(state: __state__);
4783 assert((::llvm::isa<aarch64_sme_mops_wide>(__res__)) && "builder didn't return the right type");
4784 return ::llvm::cast<aarch64_sme_mops_wide>(Val: __res__);
4785}
4786
4787aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4788 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4789}
4790
4791void aarch64_sme_mops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4792 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
4793}
4794
4795aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4796 ::mlir::OperationState __state__(location, getOperationName());
4797 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4798 auto __res__ = builder.create(state: __state__);
4799 assert((::llvm::isa<aarch64_sme_mops_wide>(__res__)) && "builder didn't return the right type");
4800 return ::llvm::cast<aarch64_sme_mops_wide>(Val: __res__);
4801}
4802
4803aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4804 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4805}
4806
4807void aarch64_sme_mops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4808 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4809 odsState.addOperands(newOperands: lhs_predicate);
4810 odsState.addOperands(newOperands: rhs_predicate);
4811 odsState.addOperands(newOperands: lhs_vector);
4812 odsState.addOperands(newOperands: rhs_vector);
4813 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
4814 assert(resultTypes.size() == 0u && "mismatched number of results");
4815 odsState.addTypes(newTypes&: resultTypes);
4816}
4817
4818aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4819 ::mlir::OperationState __state__(location, getOperationName());
4820 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4821 auto __res__ = builder.create(state: __state__);
4822 assert((::llvm::isa<aarch64_sme_mops_wide>(__res__)) && "builder didn't return the right type");
4823 return ::llvm::cast<aarch64_sme_mops_wide>(Val: __res__);
4824}
4825
4826aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
4827 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
4828}
4829
4830void aarch64_sme_mops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4831 assert(operands.size() == 4u && "mismatched number of parameters");
4832 odsState.addOperands(newOperands: operands);
4833 buildPropertiesAndDiscardableAttributes(odsState, attributes);
4834 assert(resultTypes.size() == 0u && "mismatched number of return types");
4835 odsState.addTypes(newTypes&: resultTypes);
4836}
4837
4838aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4839LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4840
4841 ::mlir::OperationState __state__(location, getOperationName());
4842 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4843 auto __res__ = builder.create(state: __state__);
4844 assert((::llvm::isa<aarch64_sme_mops_wide>(__res__)) && "builder didn't return the right type");
4845 return ::llvm::cast<aarch64_sme_mops_wide>(Val: __res__);
4846LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4847}
4848
4849aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4850LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4851
4852 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4853LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4854}
4855
4856void aarch64_sme_mops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4857 assert(operands.size() == 4u && "mismatched number of parameters");
4858 odsState.addOperands(newOperands: operands);
4859 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
4860 odsState.addAttributes(newAttributes: discardableAttributes);
4861 assert(resultTypes.size() == 0u && "mismatched number of return types");
4862 odsState.addTypes(newTypes&: resultTypes);
4863}
4864
4865aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4866 ::mlir::OperationState __state__(location, getOperationName());
4867 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
4868 auto __res__ = builder.create(state: __state__);
4869 assert((::llvm::isa<aarch64_sme_mops_wide>(__res__)) && "builder didn't return the right type");
4870 return ::llvm::cast<aarch64_sme_mops_wide>(Val: __res__);
4871}
4872
4873aarch64_sme_mops_wide aarch64_sme_mops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4874 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
4875}
4876
4877::llvm::LogicalResult aarch64_sme_mops_wide::verifyInvariantsImpl() {
4878 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
4879 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
4880
4881 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
4882 return ::mlir::failure();
4883 {
4884 unsigned index = 0; (void)index;
4885 auto valueGroup0 = getODSOperands(index: 0);
4886
4887 for (auto v : valueGroup0) {
4888 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4889 return ::mlir::failure();
4890 }
4891 auto valueGroup1 = getODSOperands(index: 1);
4892
4893 for (auto v : valueGroup1) {
4894 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4895 return ::mlir::failure();
4896 }
4897 auto valueGroup2 = getODSOperands(index: 2);
4898
4899 for (auto v : valueGroup2) {
4900 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4901 return ::mlir::failure();
4902 }
4903 auto valueGroup3 = getODSOperands(index: 3);
4904
4905 for (auto v : valueGroup3) {
4906 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4907 return ::mlir::failure();
4908 }
4909 }
4910 return ::mlir::success();
4911}
4912
4913::llvm::LogicalResult aarch64_sme_mops_wide::verifyInvariants() {
4914 return verifyInvariantsImpl();
4915}
4916
4917::llvm::LogicalResult aarch64_sme_mops_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4918 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
4919 if (!dict) {
4920 emitError() << "expected DictionaryAttr to set properties";
4921 return ::mlir::failure();
4922 }
4923 // keep track of used keys in the input dictionary to be able to error out
4924 // if there are some unknown ones.
4925 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
4926 ::mlir::MLIRContext *ctx = dict.getContext();
4927 (void)ctx;
4928 {
4929
4930 auto &propStorage = prop.tile_id;
4931 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
4932 auto attr = dict.get(name: tile_idAttrName);
4933 usedKeys.insert(V: tile_idAttrName);
4934 if (attr || /*isRequired=*/true) {
4935 if (!attr) {
4936 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
4937 "Properties.";
4938 return ::mlir::failure();
4939 }
4940 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
4941 if (convertedAttr) {
4942 propStorage = convertedAttr;
4943 } else {
4944 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
4945 return ::mlir::failure();
4946 }
4947 }
4948 }
4949
4950 for (::mlir::NamedAttribute attr : dict) {
4951 if (!usedKeys.contains(V: attr.getName()))
4952 return emitError() << "unknown key '" << attr.getName() <<
4953 "' when parsing properties dictionary";
4954 }
4955 return ::mlir::success();
4956}
4957
4958void aarch64_sme_mops_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4959 Properties &properties = odsState.getOrAddProperties<Properties>();
4960 populateDefaultProperties(opName: odsState.name, properties);
4961 const ::llvm::StringRef inherentNames[] = {"tile_id"};
4962 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
4963 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
4964 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
4965 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
4966 });
4967}
4968
4969
4970} // namespace mlir::arm_sme
4971MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_mops_wide)
4972MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_mops_wideGenericAdaptorBase::Properties)
4973
4974namespace mlir::arm_sme {
4975
4976
4977//===----------------------------------------------------------------------===//
4978// ::mlir::arm_sme::aarch64_sme_read_horiz definitions
4979//===----------------------------------------------------------------------===//
4980
4981namespace detail {
4982
4983aarch64_sme_read_horizGenericAdaptorBase::aarch64_sme_read_horizGenericAdaptorBase(aarch64_sme_read_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
4984
4985uint32_t aarch64_sme_read_horizGenericAdaptorBase::getTileId() {
4986 auto attr = getTileIdAttr();
4987 return attr.getValue().getZExtValue();
4988}
4989
4990
4991} // namespace detail
4992aarch64_sme_read_horizAdaptor::aarch64_sme_read_horizAdaptor(aarch64_sme_read_horiz op) : aarch64_sme_read_horizGenericAdaptor(op->getOperands(), op) {}
4993
4994::llvm::LogicalResult aarch64_sme_read_horizAdaptor::verify(::mlir::Location loc) {
4995 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
4996 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.read.horiz' op requires attribute 'tile_id'");
4997
4998 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
4999 return emitError(loc, message: "'arm_sme.intr.read.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
5000 return ::mlir::success();
5001}
5002
5003::llvm::LogicalResult aarch64_sme_read_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5004 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5005 if (!dict) {
5006 emitError() << "expected DictionaryAttr to set properties";
5007 return ::mlir::failure();
5008 }
5009
5010 {
5011 auto attr = dict.get(name: "tile_id");
5012 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
5013 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
5014 return ::mlir::failure();
5015 }
5016 return ::mlir::success();
5017}
5018
5019::mlir::Attribute aarch64_sme_read_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
5020 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5021 ::mlir::Builder odsBuilder{ctx};
5022 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
5023
5024 if (!attrs.empty())
5025 return odsBuilder.getDictionaryAttr(value: attrs);
5026 return {};
5027}
5028
5029llvm::hash_code aarch64_sme_read_horiz::computePropertiesHash(const Properties &prop) {
5030 using llvm::hash_value;
5031 return llvm::hash_combine(
5032 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
5033}
5034
5035std::optional<mlir::Attribute> aarch64_sme_read_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
5036 if (name == "tile_id")
5037 return prop.tile_id;
5038 return std::nullopt;
5039}
5040
5041void aarch64_sme_read_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
5042 if (name == "tile_id") {
5043 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
5044 return;
5045 }
5046}
5047
5048void aarch64_sme_read_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
5049 if (prop.tile_id) {
5050 ::mlir::Attribute value = prop.tile_id;
5051 ::mlir::Attribute originalValue = value;
5052 visitor("tile_id", value);
5053 if (value != originalValue)
5054 setInherentAttr(prop, name: "tile_id", value);
5055 }
5056}
5057
5058::llvm::LogicalResult aarch64_sme_read_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5059 {
5060 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
5061 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
5062 return ::mlir::failure();
5063 }
5064 return ::mlir::success();
5065}
5066
5067::llvm::LogicalResult aarch64_sme_read_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
5068 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
5069 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
5070 return ::mlir::failure();
5071 return ::mlir::success();
5072}
5073
5074void aarch64_sme_read_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
5075 auto &prop = getProperties(); (void)prop;
5076 writer.writeAttribute(attr: prop.tile_id);
5077}
5078
5079uint32_t aarch64_sme_read_horiz::getTileId() {
5080 auto attr = getTileIdAttr();
5081 return attr.getValue().getZExtValue();
5082}
5083
5084void aarch64_sme_read_horiz::setTileId(uint32_t attrValue) {
5085 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
5086}
5087
5088void aarch64_sme_read_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5089 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5090 odsState.addOperands(newOperands: vector);
5091 odsState.addOperands(newOperands: predicate);
5092 odsState.addOperands(newOperands: tile_slice_index);
5093 odsProperties.tile_id = tile_id;
5094 odsState.addTypes(newTypes: res);
5095}
5096
5097aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5098 ::mlir::OperationState __state__(location, getOperationName());
5099 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5100 auto __res__ = builder.create(state: __state__);
5101 assert((::llvm::isa<aarch64_sme_read_horiz>(__res__)) && "builder didn't return the right type");
5102 return ::llvm::cast<aarch64_sme_read_horiz>(Val: __res__);
5103}
5104
5105aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5106 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5107}
5108
5109void aarch64_sme_read_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5110 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5111 odsState.addOperands(newOperands: vector);
5112 odsState.addOperands(newOperands: predicate);
5113 odsState.addOperands(newOperands: tile_slice_index);
5114 odsProperties.tile_id = tile_id;
5115 assert(resultTypes.size() == 1u && "mismatched number of results");
5116 odsState.addTypes(newTypes&: resultTypes);
5117}
5118
5119aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5120 ::mlir::OperationState __state__(location, getOperationName());
5121 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5122 auto __res__ = builder.create(state: __state__);
5123 assert((::llvm::isa<aarch64_sme_read_horiz>(__res__)) && "builder didn't return the right type");
5124 return ::llvm::cast<aarch64_sme_read_horiz>(Val: __res__);
5125}
5126
5127aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5128 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5129}
5130
5131void aarch64_sme_read_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5132 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5133 odsState.addOperands(newOperands: vector);
5134 odsState.addOperands(newOperands: predicate);
5135 odsState.addOperands(newOperands: tile_slice_index);
5136 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
5137 odsState.addTypes(newTypes: res);
5138}
5139
5140aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5141 ::mlir::OperationState __state__(location, getOperationName());
5142 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5143 auto __res__ = builder.create(state: __state__);
5144 assert((::llvm::isa<aarch64_sme_read_horiz>(__res__)) && "builder didn't return the right type");
5145 return ::llvm::cast<aarch64_sme_read_horiz>(Val: __res__);
5146}
5147
5148aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5149 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5150}
5151
5152void aarch64_sme_read_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5153 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5154 odsState.addOperands(newOperands: vector);
5155 odsState.addOperands(newOperands: predicate);
5156 odsState.addOperands(newOperands: tile_slice_index);
5157 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
5158 assert(resultTypes.size() == 1u && "mismatched number of results");
5159 odsState.addTypes(newTypes&: resultTypes);
5160}
5161
5162aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5163 ::mlir::OperationState __state__(location, getOperationName());
5164 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5165 auto __res__ = builder.create(state: __state__);
5166 assert((::llvm::isa<aarch64_sme_read_horiz>(__res__)) && "builder didn't return the right type");
5167 return ::llvm::cast<aarch64_sme_read_horiz>(Val: __res__);
5168}
5169
5170aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5171 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5172}
5173
5174void aarch64_sme_read_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5175 assert(operands.size() == 3u && "mismatched number of parameters");
5176 odsState.addOperands(newOperands: operands);
5177 buildPropertiesAndDiscardableAttributes(odsState, attributes);
5178 assert(resultTypes.size() == 1u && "mismatched number of return types");
5179 odsState.addTypes(newTypes&: resultTypes);
5180}
5181
5182aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5183LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5184
5185 ::mlir::OperationState __state__(location, getOperationName());
5186 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
5187 auto __res__ = builder.create(state: __state__);
5188 assert((::llvm::isa<aarch64_sme_read_horiz>(__res__)) && "builder didn't return the right type");
5189 return ::llvm::cast<aarch64_sme_read_horiz>(Val: __res__);
5190LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5191}
5192
5193aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5194LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5195
5196 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
5197LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5198}
5199
5200void aarch64_sme_read_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5201 assert(operands.size() == 3u && "mismatched number of parameters");
5202 odsState.addOperands(newOperands: operands);
5203 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
5204 odsState.addAttributes(newAttributes: discardableAttributes);
5205 assert(resultTypes.size() == 1u && "mismatched number of return types");
5206 odsState.addTypes(newTypes&: resultTypes);
5207}
5208
5209aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5210 ::mlir::OperationState __state__(location, getOperationName());
5211 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
5212 auto __res__ = builder.create(state: __state__);
5213 assert((::llvm::isa<aarch64_sme_read_horiz>(__res__)) && "builder didn't return the right type");
5214 return ::llvm::cast<aarch64_sme_read_horiz>(Val: __res__);
5215}
5216
5217aarch64_sme_read_horiz aarch64_sme_read_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5218 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
5219}
5220
5221::llvm::LogicalResult aarch64_sme_read_horiz::verifyInvariantsImpl() {
5222 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
5223 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
5224
5225 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
5226 return ::mlir::failure();
5227 {
5228 unsigned index = 0; (void)index;
5229 auto valueGroup0 = getODSOperands(index: 0);
5230
5231 for (auto v : valueGroup0) {
5232 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps7(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5233 return ::mlir::failure();
5234 }
5235 auto valueGroup1 = getODSOperands(index: 1);
5236
5237 for (auto v : valueGroup1) {
5238 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5239 return ::mlir::failure();
5240 }
5241 auto valueGroup2 = getODSOperands(index: 2);
5242
5243 for (auto v : valueGroup2) {
5244 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5245 return ::mlir::failure();
5246 }
5247 }
5248 {
5249 unsigned index = 0; (void)index;
5250 auto valueGroup0 = getODSResults(index: 0);
5251
5252 for (auto v : valueGroup0) {
5253 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps1(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
5254 return ::mlir::failure();
5255 }
5256 }
5257 if (!(((::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 0).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 1).begin()).getType()).getShape()) && (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 1).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSResults(index: 0).begin()).getType()).getShape()) && (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSResults(index: 0).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 0).begin()).getType()).getShape()))))
5258 return emitOpError(message: "failed to verify that all of {vector, predicate, res} have same shape");
5259 if (!(((getElementTypeOrSelf(val: (*this->getODSOperands(index: 0).begin()))) == (getElementTypeOrSelf(val: (*this->getODSResults(index: 0).begin()))) && (getElementTypeOrSelf(val: (*this->getODSResults(index: 0).begin()))) == (getElementTypeOrSelf(val: (*this->getODSOperands(index: 0).begin()))))))
5260 return emitOpError(message: "failed to verify that all of {vector, res} have same element type");
5261 return ::mlir::success();
5262}
5263
5264::llvm::LogicalResult aarch64_sme_read_horiz::verifyInvariants() {
5265 return verifyInvariantsImpl();
5266}
5267
5268::llvm::LogicalResult aarch64_sme_read_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5269 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5270 if (!dict) {
5271 emitError() << "expected DictionaryAttr to set properties";
5272 return ::mlir::failure();
5273 }
5274 // keep track of used keys in the input dictionary to be able to error out
5275 // if there are some unknown ones.
5276 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
5277 ::mlir::MLIRContext *ctx = dict.getContext();
5278 (void)ctx;
5279 {
5280
5281 auto &propStorage = prop.tile_id;
5282 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
5283 auto attr = dict.get(name: tile_idAttrName);
5284 usedKeys.insert(V: tile_idAttrName);
5285 if (attr || /*isRequired=*/true) {
5286 if (!attr) {
5287 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
5288 "Properties.";
5289 return ::mlir::failure();
5290 }
5291 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
5292 if (convertedAttr) {
5293 propStorage = convertedAttr;
5294 } else {
5295 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
5296 return ::mlir::failure();
5297 }
5298 }
5299 }
5300
5301 for (::mlir::NamedAttribute attr : dict) {
5302 if (!usedKeys.contains(V: attr.getName()))
5303 return emitError() << "unknown key '" << attr.getName() <<
5304 "' when parsing properties dictionary";
5305 }
5306 return ::mlir::success();
5307}
5308
5309void aarch64_sme_read_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5310 Properties &properties = odsState.getOrAddProperties<Properties>();
5311 populateDefaultProperties(opName: odsState.name, properties);
5312 const ::llvm::StringRef inherentNames[] = {"tile_id"};
5313 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
5314 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
5315 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
5316 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
5317 });
5318}
5319
5320
5321} // namespace mlir::arm_sme
5322MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_read_horiz)
5323MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_read_horizGenericAdaptorBase::Properties)
5324
5325namespace mlir::arm_sme {
5326
5327
5328//===----------------------------------------------------------------------===//
5329// ::mlir::arm_sme::aarch64_sme_read_vert definitions
5330//===----------------------------------------------------------------------===//
5331
5332namespace detail {
5333
5334aarch64_sme_read_vertGenericAdaptorBase::aarch64_sme_read_vertGenericAdaptorBase(aarch64_sme_read_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
5335
5336uint32_t aarch64_sme_read_vertGenericAdaptorBase::getTileId() {
5337 auto attr = getTileIdAttr();
5338 return attr.getValue().getZExtValue();
5339}
5340
5341
5342} // namespace detail
5343aarch64_sme_read_vertAdaptor::aarch64_sme_read_vertAdaptor(aarch64_sme_read_vert op) : aarch64_sme_read_vertGenericAdaptor(op->getOperands(), op) {}
5344
5345::llvm::LogicalResult aarch64_sme_read_vertAdaptor::verify(::mlir::Location loc) {
5346 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
5347 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.read.vert' op requires attribute 'tile_id'");
5348
5349 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
5350 return emitError(loc, message: "'arm_sme.intr.read.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
5351 return ::mlir::success();
5352}
5353
5354::llvm::LogicalResult aarch64_sme_read_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5355 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5356 if (!dict) {
5357 emitError() << "expected DictionaryAttr to set properties";
5358 return ::mlir::failure();
5359 }
5360
5361 {
5362 auto attr = dict.get(name: "tile_id");
5363 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
5364 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
5365 return ::mlir::failure();
5366 }
5367 return ::mlir::success();
5368}
5369
5370::mlir::Attribute aarch64_sme_read_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
5371 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5372 ::mlir::Builder odsBuilder{ctx};
5373 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
5374
5375 if (!attrs.empty())
5376 return odsBuilder.getDictionaryAttr(value: attrs);
5377 return {};
5378}
5379
5380llvm::hash_code aarch64_sme_read_vert::computePropertiesHash(const Properties &prop) {
5381 using llvm::hash_value;
5382 return llvm::hash_combine(
5383 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
5384}
5385
5386std::optional<mlir::Attribute> aarch64_sme_read_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
5387 if (name == "tile_id")
5388 return prop.tile_id;
5389 return std::nullopt;
5390}
5391
5392void aarch64_sme_read_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
5393 if (name == "tile_id") {
5394 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
5395 return;
5396 }
5397}
5398
5399void aarch64_sme_read_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
5400 if (prop.tile_id) {
5401 ::mlir::Attribute value = prop.tile_id;
5402 ::mlir::Attribute originalValue = value;
5403 visitor("tile_id", value);
5404 if (value != originalValue)
5405 setInherentAttr(prop, name: "tile_id", value);
5406 }
5407}
5408
5409::llvm::LogicalResult aarch64_sme_read_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5410 {
5411 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
5412 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
5413 return ::mlir::failure();
5414 }
5415 return ::mlir::success();
5416}
5417
5418::llvm::LogicalResult aarch64_sme_read_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
5419 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
5420 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
5421 return ::mlir::failure();
5422 return ::mlir::success();
5423}
5424
5425void aarch64_sme_read_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
5426 auto &prop = getProperties(); (void)prop;
5427 writer.writeAttribute(attr: prop.tile_id);
5428}
5429
5430uint32_t aarch64_sme_read_vert::getTileId() {
5431 auto attr = getTileIdAttr();
5432 return attr.getValue().getZExtValue();
5433}
5434
5435void aarch64_sme_read_vert::setTileId(uint32_t attrValue) {
5436 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
5437}
5438
5439void aarch64_sme_read_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5440 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5441 odsState.addOperands(newOperands: vector);
5442 odsState.addOperands(newOperands: predicate);
5443 odsState.addOperands(newOperands: tile_slice_index);
5444 odsProperties.tile_id = tile_id;
5445 odsState.addTypes(newTypes: res);
5446}
5447
5448aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5449 ::mlir::OperationState __state__(location, getOperationName());
5450 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5451 auto __res__ = builder.create(state: __state__);
5452 assert((::llvm::isa<aarch64_sme_read_vert>(__res__)) && "builder didn't return the right type");
5453 return ::llvm::cast<aarch64_sme_read_vert>(Val: __res__);
5454}
5455
5456aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5457 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5458}
5459
5460void aarch64_sme_read_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5461 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5462 odsState.addOperands(newOperands: vector);
5463 odsState.addOperands(newOperands: predicate);
5464 odsState.addOperands(newOperands: tile_slice_index);
5465 odsProperties.tile_id = tile_id;
5466 assert(resultTypes.size() == 1u && "mismatched number of results");
5467 odsState.addTypes(newTypes&: resultTypes);
5468}
5469
5470aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5471 ::mlir::OperationState __state__(location, getOperationName());
5472 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5473 auto __res__ = builder.create(state: __state__);
5474 assert((::llvm::isa<aarch64_sme_read_vert>(__res__)) && "builder didn't return the right type");
5475 return ::llvm::cast<aarch64_sme_read_vert>(Val: __res__);
5476}
5477
5478aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
5479 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5480}
5481
5482void aarch64_sme_read_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5483 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5484 odsState.addOperands(newOperands: vector);
5485 odsState.addOperands(newOperands: predicate);
5486 odsState.addOperands(newOperands: tile_slice_index);
5487 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
5488 odsState.addTypes(newTypes: res);
5489}
5490
5491aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5492 ::mlir::OperationState __state__(location, getOperationName());
5493 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5494 auto __res__ = builder.create(state: __state__);
5495 assert((::llvm::isa<aarch64_sme_read_vert>(__res__)) && "builder didn't return the right type");
5496 return ::llvm::cast<aarch64_sme_read_vert>(Val: __res__);
5497}
5498
5499aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5500 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5501}
5502
5503void aarch64_sme_read_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5504 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5505 odsState.addOperands(newOperands: vector);
5506 odsState.addOperands(newOperands: predicate);
5507 odsState.addOperands(newOperands: tile_slice_index);
5508 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
5509 assert(resultTypes.size() == 1u && "mismatched number of results");
5510 odsState.addTypes(newTypes&: resultTypes);
5511}
5512
5513aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5514 ::mlir::OperationState __state__(location, getOperationName());
5515 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5516 auto __res__ = builder.create(state: __state__);
5517 assert((::llvm::isa<aarch64_sme_read_vert>(__res__)) && "builder didn't return the right type");
5518 return ::llvm::cast<aarch64_sme_read_vert>(Val: __res__);
5519}
5520
5521aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vector, ::mlir::Value predicate, uint32_t tile_id, ::mlir::Value tile_slice_index) {
5522 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vector: std::forward<decltype(vector)>(t&: vector), predicate: std::forward<decltype(predicate)>(t&: predicate), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
5523}
5524
5525void aarch64_sme_read_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5526 assert(operands.size() == 3u && "mismatched number of parameters");
5527 odsState.addOperands(newOperands: operands);
5528 buildPropertiesAndDiscardableAttributes(odsState, attributes);
5529 assert(resultTypes.size() == 1u && "mismatched number of return types");
5530 odsState.addTypes(newTypes&: resultTypes);
5531}
5532
5533aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5534LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5535
5536 ::mlir::OperationState __state__(location, getOperationName());
5537 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
5538 auto __res__ = builder.create(state: __state__);
5539 assert((::llvm::isa<aarch64_sme_read_vert>(__res__)) && "builder didn't return the right type");
5540 return ::llvm::cast<aarch64_sme_read_vert>(Val: __res__);
5541LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5542}
5543
5544aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5545LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5546
5547 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
5548LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5549}
5550
5551void aarch64_sme_read_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5552 assert(operands.size() == 3u && "mismatched number of parameters");
5553 odsState.addOperands(newOperands: operands);
5554 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
5555 odsState.addAttributes(newAttributes: discardableAttributes);
5556 assert(resultTypes.size() == 1u && "mismatched number of return types");
5557 odsState.addTypes(newTypes&: resultTypes);
5558}
5559
5560aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5561 ::mlir::OperationState __state__(location, getOperationName());
5562 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
5563 auto __res__ = builder.create(state: __state__);
5564 assert((::llvm::isa<aarch64_sme_read_vert>(__res__)) && "builder didn't return the right type");
5565 return ::llvm::cast<aarch64_sme_read_vert>(Val: __res__);
5566}
5567
5568aarch64_sme_read_vert aarch64_sme_read_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5569 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
5570}
5571
5572::llvm::LogicalResult aarch64_sme_read_vert::verifyInvariantsImpl() {
5573 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
5574 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
5575
5576 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
5577 return ::mlir::failure();
5578 {
5579 unsigned index = 0; (void)index;
5580 auto valueGroup0 = getODSOperands(index: 0);
5581
5582 for (auto v : valueGroup0) {
5583 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps7(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5584 return ::mlir::failure();
5585 }
5586 auto valueGroup1 = getODSOperands(index: 1);
5587
5588 for (auto v : valueGroup1) {
5589 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5590 return ::mlir::failure();
5591 }
5592 auto valueGroup2 = getODSOperands(index: 2);
5593
5594 for (auto v : valueGroup2) {
5595 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5596 return ::mlir::failure();
5597 }
5598 }
5599 {
5600 unsigned index = 0; (void)index;
5601 auto valueGroup0 = getODSResults(index: 0);
5602
5603 for (auto v : valueGroup0) {
5604 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps1(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
5605 return ::mlir::failure();
5606 }
5607 }
5608 if (!(((::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 0).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 1).begin()).getType()).getShape()) && (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 1).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSResults(index: 0).begin()).getType()).getShape()) && (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSResults(index: 0).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 0).begin()).getType()).getShape()))))
5609 return emitOpError(message: "failed to verify that all of {vector, predicate, res} have same shape");
5610 if (!(((getElementTypeOrSelf(val: (*this->getODSOperands(index: 0).begin()))) == (getElementTypeOrSelf(val: (*this->getODSResults(index: 0).begin()))) && (getElementTypeOrSelf(val: (*this->getODSResults(index: 0).begin()))) == (getElementTypeOrSelf(val: (*this->getODSOperands(index: 0).begin()))))))
5611 return emitOpError(message: "failed to verify that all of {vector, res} have same element type");
5612 return ::mlir::success();
5613}
5614
5615::llvm::LogicalResult aarch64_sme_read_vert::verifyInvariants() {
5616 return verifyInvariantsImpl();
5617}
5618
5619::llvm::LogicalResult aarch64_sme_read_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5620 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5621 if (!dict) {
5622 emitError() << "expected DictionaryAttr to set properties";
5623 return ::mlir::failure();
5624 }
5625 // keep track of used keys in the input dictionary to be able to error out
5626 // if there are some unknown ones.
5627 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
5628 ::mlir::MLIRContext *ctx = dict.getContext();
5629 (void)ctx;
5630 {
5631
5632 auto &propStorage = prop.tile_id;
5633 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
5634 auto attr = dict.get(name: tile_idAttrName);
5635 usedKeys.insert(V: tile_idAttrName);
5636 if (attr || /*isRequired=*/true) {
5637 if (!attr) {
5638 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
5639 "Properties.";
5640 return ::mlir::failure();
5641 }
5642 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
5643 if (convertedAttr) {
5644 propStorage = convertedAttr;
5645 } else {
5646 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
5647 return ::mlir::failure();
5648 }
5649 }
5650 }
5651
5652 for (::mlir::NamedAttribute attr : dict) {
5653 if (!usedKeys.contains(V: attr.getName()))
5654 return emitError() << "unknown key '" << attr.getName() <<
5655 "' when parsing properties dictionary";
5656 }
5657 return ::mlir::success();
5658}
5659
5660void aarch64_sme_read_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5661 Properties &properties = odsState.getOrAddProperties<Properties>();
5662 populateDefaultProperties(opName: odsState.name, properties);
5663 const ::llvm::StringRef inherentNames[] = {"tile_id"};
5664 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
5665 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
5666 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
5667 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
5668 });
5669}
5670
5671
5672} // namespace mlir::arm_sme
5673MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_read_vert)
5674MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_read_vertGenericAdaptorBase::Properties)
5675
5676namespace mlir::arm_sme {
5677
5678
5679//===----------------------------------------------------------------------===//
5680// ::mlir::arm_sme::aarch64_sme_smopa_wide definitions
5681//===----------------------------------------------------------------------===//
5682
5683namespace detail {
5684
5685aarch64_sme_smopa_wideGenericAdaptorBase::aarch64_sme_smopa_wideGenericAdaptorBase(aarch64_sme_smopa_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
5686
5687uint32_t aarch64_sme_smopa_wideGenericAdaptorBase::getTileId() {
5688 auto attr = getTileIdAttr();
5689 return attr.getValue().getZExtValue();
5690}
5691
5692
5693} // namespace detail
5694aarch64_sme_smopa_wideAdaptor::aarch64_sme_smopa_wideAdaptor(aarch64_sme_smopa_wide op) : aarch64_sme_smopa_wideGenericAdaptor(op->getOperands(), op) {}
5695
5696::llvm::LogicalResult aarch64_sme_smopa_wideAdaptor::verify(::mlir::Location loc) {
5697 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
5698 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.smopa.wide' op requires attribute 'tile_id'");
5699
5700 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
5701 return emitError(loc, message: "'arm_sme.intr.smopa.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
5702 return ::mlir::success();
5703}
5704
5705::llvm::LogicalResult aarch64_sme_smopa_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5706 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5707 if (!dict) {
5708 emitError() << "expected DictionaryAttr to set properties";
5709 return ::mlir::failure();
5710 }
5711
5712 {
5713 auto attr = dict.get(name: "tile_id");
5714 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
5715 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
5716 return ::mlir::failure();
5717 }
5718 return ::mlir::success();
5719}
5720
5721::mlir::Attribute aarch64_sme_smopa_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
5722 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5723 ::mlir::Builder odsBuilder{ctx};
5724 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
5725
5726 if (!attrs.empty())
5727 return odsBuilder.getDictionaryAttr(value: attrs);
5728 return {};
5729}
5730
5731llvm::hash_code aarch64_sme_smopa_wide::computePropertiesHash(const Properties &prop) {
5732 using llvm::hash_value;
5733 return llvm::hash_combine(
5734 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
5735}
5736
5737std::optional<mlir::Attribute> aarch64_sme_smopa_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
5738 if (name == "tile_id")
5739 return prop.tile_id;
5740 return std::nullopt;
5741}
5742
5743void aarch64_sme_smopa_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
5744 if (name == "tile_id") {
5745 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
5746 return;
5747 }
5748}
5749
5750void aarch64_sme_smopa_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
5751 if (prop.tile_id) {
5752 ::mlir::Attribute value = prop.tile_id;
5753 ::mlir::Attribute originalValue = value;
5754 visitor("tile_id", value);
5755 if (value != originalValue)
5756 setInherentAttr(prop, name: "tile_id", value);
5757 }
5758}
5759
5760::llvm::LogicalResult aarch64_sme_smopa_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5761 {
5762 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
5763 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
5764 return ::mlir::failure();
5765 }
5766 return ::mlir::success();
5767}
5768
5769::llvm::LogicalResult aarch64_sme_smopa_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
5770 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
5771 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
5772 return ::mlir::failure();
5773 return ::mlir::success();
5774}
5775
5776void aarch64_sme_smopa_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
5777 auto &prop = getProperties(); (void)prop;
5778 writer.writeAttribute(attr: prop.tile_id);
5779}
5780
5781uint32_t aarch64_sme_smopa_wide::getTileId() {
5782 auto attr = getTileIdAttr();
5783 return attr.getValue().getZExtValue();
5784}
5785
5786void aarch64_sme_smopa_wide::setTileId(uint32_t attrValue) {
5787 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
5788}
5789
5790void aarch64_sme_smopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5791 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
5792}
5793
5794aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5795 ::mlir::OperationState __state__(location, getOperationName());
5796 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
5797 auto __res__ = builder.create(state: __state__);
5798 assert((::llvm::isa<aarch64_sme_smopa_wide>(__res__)) && "builder didn't return the right type");
5799 return ::llvm::cast<aarch64_sme_smopa_wide>(Val: __res__);
5800}
5801
5802aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5803 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
5804}
5805
5806void aarch64_sme_smopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5807 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5808 odsState.addOperands(newOperands: lhs_predicate);
5809 odsState.addOperands(newOperands: rhs_predicate);
5810 odsState.addOperands(newOperands: lhs_vector);
5811 odsState.addOperands(newOperands: rhs_vector);
5812 odsProperties.tile_id = tile_id;
5813 assert(resultTypes.size() == 0u && "mismatched number of results");
5814 odsState.addTypes(newTypes&: resultTypes);
5815}
5816
5817aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5818 ::mlir::OperationState __state__(location, getOperationName());
5819 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
5820 auto __res__ = builder.create(state: __state__);
5821 assert((::llvm::isa<aarch64_sme_smopa_wide>(__res__)) && "builder didn't return the right type");
5822 return ::llvm::cast<aarch64_sme_smopa_wide>(Val: __res__);
5823}
5824
5825aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5826 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
5827}
5828
5829void aarch64_sme_smopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5830 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
5831}
5832
5833aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5834 ::mlir::OperationState __state__(location, getOperationName());
5835 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
5836 auto __res__ = builder.create(state: __state__);
5837 assert((::llvm::isa<aarch64_sme_smopa_wide>(__res__)) && "builder didn't return the right type");
5838 return ::llvm::cast<aarch64_sme_smopa_wide>(Val: __res__);
5839}
5840
5841aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5842 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
5843}
5844
5845void aarch64_sme_smopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5846 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5847 odsState.addOperands(newOperands: lhs_predicate);
5848 odsState.addOperands(newOperands: rhs_predicate);
5849 odsState.addOperands(newOperands: lhs_vector);
5850 odsState.addOperands(newOperands: rhs_vector);
5851 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
5852 assert(resultTypes.size() == 0u && "mismatched number of results");
5853 odsState.addTypes(newTypes&: resultTypes);
5854}
5855
5856aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5857 ::mlir::OperationState __state__(location, getOperationName());
5858 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
5859 auto __res__ = builder.create(state: __state__);
5860 assert((::llvm::isa<aarch64_sme_smopa_wide>(__res__)) && "builder didn't return the right type");
5861 return ::llvm::cast<aarch64_sme_smopa_wide>(Val: __res__);
5862}
5863
5864aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
5865 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
5866}
5867
5868void aarch64_sme_smopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5869 assert(operands.size() == 4u && "mismatched number of parameters");
5870 odsState.addOperands(newOperands: operands);
5871 buildPropertiesAndDiscardableAttributes(odsState, attributes);
5872 assert(resultTypes.size() == 0u && "mismatched number of return types");
5873 odsState.addTypes(newTypes&: resultTypes);
5874}
5875
5876aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5877LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5878
5879 ::mlir::OperationState __state__(location, getOperationName());
5880 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
5881 auto __res__ = builder.create(state: __state__);
5882 assert((::llvm::isa<aarch64_sme_smopa_wide>(__res__)) && "builder didn't return the right type");
5883 return ::llvm::cast<aarch64_sme_smopa_wide>(Val: __res__);
5884LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5885}
5886
5887aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5888LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5889
5890 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
5891LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5892}
5893
5894void aarch64_sme_smopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5895 assert(operands.size() == 4u && "mismatched number of parameters");
5896 odsState.addOperands(newOperands: operands);
5897 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
5898 odsState.addAttributes(newAttributes: discardableAttributes);
5899 assert(resultTypes.size() == 0u && "mismatched number of return types");
5900 odsState.addTypes(newTypes&: resultTypes);
5901}
5902
5903aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5904 ::mlir::OperationState __state__(location, getOperationName());
5905 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
5906 auto __res__ = builder.create(state: __state__);
5907 assert((::llvm::isa<aarch64_sme_smopa_wide>(__res__)) && "builder didn't return the right type");
5908 return ::llvm::cast<aarch64_sme_smopa_wide>(Val: __res__);
5909}
5910
5911aarch64_sme_smopa_wide aarch64_sme_smopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5912 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
5913}
5914
5915::llvm::LogicalResult aarch64_sme_smopa_wide::verifyInvariantsImpl() {
5916 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
5917 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
5918
5919 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
5920 return ::mlir::failure();
5921 {
5922 unsigned index = 0; (void)index;
5923 auto valueGroup0 = getODSOperands(index: 0);
5924
5925 for (auto v : valueGroup0) {
5926 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5927 return ::mlir::failure();
5928 }
5929 auto valueGroup1 = getODSOperands(index: 1);
5930
5931 for (auto v : valueGroup1) {
5932 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5933 return ::mlir::failure();
5934 }
5935 auto valueGroup2 = getODSOperands(index: 2);
5936
5937 for (auto v : valueGroup2) {
5938 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5939 return ::mlir::failure();
5940 }
5941 auto valueGroup3 = getODSOperands(index: 3);
5942
5943 for (auto v : valueGroup3) {
5944 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5945 return ::mlir::failure();
5946 }
5947 }
5948 return ::mlir::success();
5949}
5950
5951::llvm::LogicalResult aarch64_sme_smopa_wide::verifyInvariants() {
5952 return verifyInvariantsImpl();
5953}
5954
5955::llvm::LogicalResult aarch64_sme_smopa_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5956 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5957 if (!dict) {
5958 emitError() << "expected DictionaryAttr to set properties";
5959 return ::mlir::failure();
5960 }
5961 // keep track of used keys in the input dictionary to be able to error out
5962 // if there are some unknown ones.
5963 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
5964 ::mlir::MLIRContext *ctx = dict.getContext();
5965 (void)ctx;
5966 {
5967
5968 auto &propStorage = prop.tile_id;
5969 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
5970 auto attr = dict.get(name: tile_idAttrName);
5971 usedKeys.insert(V: tile_idAttrName);
5972 if (attr || /*isRequired=*/true) {
5973 if (!attr) {
5974 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
5975 "Properties.";
5976 return ::mlir::failure();
5977 }
5978 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
5979 if (convertedAttr) {
5980 propStorage = convertedAttr;
5981 } else {
5982 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
5983 return ::mlir::failure();
5984 }
5985 }
5986 }
5987
5988 for (::mlir::NamedAttribute attr : dict) {
5989 if (!usedKeys.contains(V: attr.getName()))
5990 return emitError() << "unknown key '" << attr.getName() <<
5991 "' when parsing properties dictionary";
5992 }
5993 return ::mlir::success();
5994}
5995
5996void aarch64_sme_smopa_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5997 Properties &properties = odsState.getOrAddProperties<Properties>();
5998 populateDefaultProperties(opName: odsState.name, properties);
5999 const ::llvm::StringRef inherentNames[] = {"tile_id"};
6000 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
6001 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
6002 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
6003 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
6004 });
6005}
6006
6007
6008} // namespace mlir::arm_sme
6009MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_smopa_wide)
6010MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_smopa_wideGenericAdaptorBase::Properties)
6011
6012namespace mlir::arm_sme {
6013
6014
6015//===----------------------------------------------------------------------===//
6016// ::mlir::arm_sme::aarch64_sme_smopa_za32 definitions
6017//===----------------------------------------------------------------------===//
6018
6019namespace detail {
6020
6021aarch64_sme_smopa_za32GenericAdaptorBase::aarch64_sme_smopa_za32GenericAdaptorBase(aarch64_sme_smopa_za32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
6022
6023uint32_t aarch64_sme_smopa_za32GenericAdaptorBase::getTileId() {
6024 auto attr = getTileIdAttr();
6025 return attr.getValue().getZExtValue();
6026}
6027
6028
6029} // namespace detail
6030aarch64_sme_smopa_za32Adaptor::aarch64_sme_smopa_za32Adaptor(aarch64_sme_smopa_za32 op) : aarch64_sme_smopa_za32GenericAdaptor(op->getOperands(), op) {}
6031
6032::llvm::LogicalResult aarch64_sme_smopa_za32Adaptor::verify(::mlir::Location loc) {
6033 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
6034 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.smopa.za32' op requires attribute 'tile_id'");
6035
6036 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
6037 return emitError(loc, message: "'arm_sme.intr.smopa.za32' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
6038 return ::mlir::success();
6039}
6040
6041::llvm::LogicalResult aarch64_sme_smopa_za32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6042 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6043 if (!dict) {
6044 emitError() << "expected DictionaryAttr to set properties";
6045 return ::mlir::failure();
6046 }
6047
6048 {
6049 auto attr = dict.get(name: "tile_id");
6050 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6051 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
6052 return ::mlir::failure();
6053 }
6054 return ::mlir::success();
6055}
6056
6057::mlir::Attribute aarch64_sme_smopa_za32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6058 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6059 ::mlir::Builder odsBuilder{ctx};
6060 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
6061
6062 if (!attrs.empty())
6063 return odsBuilder.getDictionaryAttr(value: attrs);
6064 return {};
6065}
6066
6067llvm::hash_code aarch64_sme_smopa_za32::computePropertiesHash(const Properties &prop) {
6068 using llvm::hash_value;
6069 return llvm::hash_combine(
6070 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
6071}
6072
6073std::optional<mlir::Attribute> aarch64_sme_smopa_za32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6074 if (name == "tile_id")
6075 return prop.tile_id;
6076 return std::nullopt;
6077}
6078
6079void aarch64_sme_smopa_za32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6080 if (name == "tile_id") {
6081 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
6082 return;
6083 }
6084}
6085
6086void aarch64_sme_smopa_za32::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
6087 if (prop.tile_id) {
6088 ::mlir::Attribute value = prop.tile_id;
6089 ::mlir::Attribute originalValue = value;
6090 visitor("tile_id", value);
6091 if (value != originalValue)
6092 setInherentAttr(prop, name: "tile_id", value);
6093 }
6094}
6095
6096::llvm::LogicalResult aarch64_sme_smopa_za32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6097 {
6098 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
6099 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
6100 return ::mlir::failure();
6101 }
6102 return ::mlir::success();
6103}
6104
6105::llvm::LogicalResult aarch64_sme_smopa_za32::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6106 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6107 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
6108 return ::mlir::failure();
6109 return ::mlir::success();
6110}
6111
6112void aarch64_sme_smopa_za32::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6113 auto &prop = getProperties(); (void)prop;
6114 writer.writeAttribute(attr: prop.tile_id);
6115}
6116
6117uint32_t aarch64_sme_smopa_za32::getTileId() {
6118 auto attr = getTileIdAttr();
6119 return attr.getValue().getZExtValue();
6120}
6121
6122void aarch64_sme_smopa_za32::setTileId(uint32_t attrValue) {
6123 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
6124}
6125
6126void aarch64_sme_smopa_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6127 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
6128}
6129
6130aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6131 ::mlir::OperationState __state__(location, getOperationName());
6132 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6133 auto __res__ = builder.create(state: __state__);
6134 assert((::llvm::isa<aarch64_sme_smopa_za32>(__res__)) && "builder didn't return the right type");
6135 return ::llvm::cast<aarch64_sme_smopa_za32>(Val: __res__);
6136}
6137
6138aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6139 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6140}
6141
6142void aarch64_sme_smopa_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6143 auto &odsProperties = odsState.getOrAddProperties<Properties>();
6144 odsState.addOperands(newOperands: lhs_predicate);
6145 odsState.addOperands(newOperands: rhs_predicate);
6146 odsState.addOperands(newOperands: lhs_vector);
6147 odsState.addOperands(newOperands: rhs_vector);
6148 odsProperties.tile_id = tile_id;
6149 assert(resultTypes.size() == 0u && "mismatched number of results");
6150 odsState.addTypes(newTypes&: resultTypes);
6151}
6152
6153aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6154 ::mlir::OperationState __state__(location, getOperationName());
6155 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6156 auto __res__ = builder.create(state: __state__);
6157 assert((::llvm::isa<aarch64_sme_smopa_za32>(__res__)) && "builder didn't return the right type");
6158 return ::llvm::cast<aarch64_sme_smopa_za32>(Val: __res__);
6159}
6160
6161aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6162 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6163}
6164
6165void aarch64_sme_smopa_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6166 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
6167}
6168
6169aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6170 ::mlir::OperationState __state__(location, getOperationName());
6171 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6172 auto __res__ = builder.create(state: __state__);
6173 assert((::llvm::isa<aarch64_sme_smopa_za32>(__res__)) && "builder didn't return the right type");
6174 return ::llvm::cast<aarch64_sme_smopa_za32>(Val: __res__);
6175}
6176
6177aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6178 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6179}
6180
6181void aarch64_sme_smopa_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6182 auto &odsProperties = odsState.getOrAddProperties<Properties>();
6183 odsState.addOperands(newOperands: lhs_predicate);
6184 odsState.addOperands(newOperands: rhs_predicate);
6185 odsState.addOperands(newOperands: lhs_vector);
6186 odsState.addOperands(newOperands: rhs_vector);
6187 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
6188 assert(resultTypes.size() == 0u && "mismatched number of results");
6189 odsState.addTypes(newTypes&: resultTypes);
6190}
6191
6192aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6193 ::mlir::OperationState __state__(location, getOperationName());
6194 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6195 auto __res__ = builder.create(state: __state__);
6196 assert((::llvm::isa<aarch64_sme_smopa_za32>(__res__)) && "builder didn't return the right type");
6197 return ::llvm::cast<aarch64_sme_smopa_za32>(Val: __res__);
6198}
6199
6200aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6201 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6202}
6203
6204void aarch64_sme_smopa_za32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6205 assert(operands.size() == 4u && "mismatched number of parameters");
6206 odsState.addOperands(newOperands: operands);
6207 buildPropertiesAndDiscardableAttributes(odsState, attributes);
6208 assert(resultTypes.size() == 0u && "mismatched number of return types");
6209 odsState.addTypes(newTypes&: resultTypes);
6210}
6211
6212aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6213LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
6214
6215 ::mlir::OperationState __state__(location, getOperationName());
6216 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
6217 auto __res__ = builder.create(state: __state__);
6218 assert((::llvm::isa<aarch64_sme_smopa_za32>(__res__)) && "builder didn't return the right type");
6219 return ::llvm::cast<aarch64_sme_smopa_za32>(Val: __res__);
6220LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
6221}
6222
6223aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6224LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
6225
6226 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
6227LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
6228}
6229
6230void aarch64_sme_smopa_za32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6231 assert(operands.size() == 4u && "mismatched number of parameters");
6232 odsState.addOperands(newOperands: operands);
6233 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
6234 odsState.addAttributes(newAttributes: discardableAttributes);
6235 assert(resultTypes.size() == 0u && "mismatched number of return types");
6236 odsState.addTypes(newTypes&: resultTypes);
6237}
6238
6239aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6240 ::mlir::OperationState __state__(location, getOperationName());
6241 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
6242 auto __res__ = builder.create(state: __state__);
6243 assert((::llvm::isa<aarch64_sme_smopa_za32>(__res__)) && "builder didn't return the right type");
6244 return ::llvm::cast<aarch64_sme_smopa_za32>(Val: __res__);
6245}
6246
6247aarch64_sme_smopa_za32 aarch64_sme_smopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6248 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
6249}
6250
6251::llvm::LogicalResult aarch64_sme_smopa_za32::verifyInvariantsImpl() {
6252 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
6253 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
6254
6255 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
6256 return ::mlir::failure();
6257 {
6258 unsigned index = 0; (void)index;
6259 auto valueGroup0 = getODSOperands(index: 0);
6260
6261 for (auto v : valueGroup0) {
6262 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6263 return ::mlir::failure();
6264 }
6265 auto valueGroup1 = getODSOperands(index: 1);
6266
6267 for (auto v : valueGroup1) {
6268 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6269 return ::mlir::failure();
6270 }
6271 auto valueGroup2 = getODSOperands(index: 2);
6272
6273 for (auto v : valueGroup2) {
6274 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6275 return ::mlir::failure();
6276 }
6277 auto valueGroup3 = getODSOperands(index: 3);
6278
6279 for (auto v : valueGroup3) {
6280 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6281 return ::mlir::failure();
6282 }
6283 }
6284 return ::mlir::success();
6285}
6286
6287::llvm::LogicalResult aarch64_sme_smopa_za32::verifyInvariants() {
6288 return verifyInvariantsImpl();
6289}
6290
6291::llvm::LogicalResult aarch64_sme_smopa_za32::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6292 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6293 if (!dict) {
6294 emitError() << "expected DictionaryAttr to set properties";
6295 return ::mlir::failure();
6296 }
6297 // keep track of used keys in the input dictionary to be able to error out
6298 // if there are some unknown ones.
6299 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
6300 ::mlir::MLIRContext *ctx = dict.getContext();
6301 (void)ctx;
6302 {
6303
6304 auto &propStorage = prop.tile_id;
6305 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
6306 auto attr = dict.get(name: tile_idAttrName);
6307 usedKeys.insert(V: tile_idAttrName);
6308 if (attr || /*isRequired=*/true) {
6309 if (!attr) {
6310 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
6311 "Properties.";
6312 return ::mlir::failure();
6313 }
6314 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
6315 if (convertedAttr) {
6316 propStorage = convertedAttr;
6317 } else {
6318 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
6319 return ::mlir::failure();
6320 }
6321 }
6322 }
6323
6324 for (::mlir::NamedAttribute attr : dict) {
6325 if (!usedKeys.contains(V: attr.getName()))
6326 return emitError() << "unknown key '" << attr.getName() <<
6327 "' when parsing properties dictionary";
6328 }
6329 return ::mlir::success();
6330}
6331
6332void aarch64_sme_smopa_za32::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6333 Properties &properties = odsState.getOrAddProperties<Properties>();
6334 populateDefaultProperties(opName: odsState.name, properties);
6335 const ::llvm::StringRef inherentNames[] = {"tile_id"};
6336 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
6337 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
6338 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
6339 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
6340 });
6341}
6342
6343
6344} // namespace mlir::arm_sme
6345MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_smopa_za32)
6346MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_smopa_za32GenericAdaptorBase::Properties)
6347
6348namespace mlir::arm_sme {
6349
6350
6351//===----------------------------------------------------------------------===//
6352// ::mlir::arm_sme::aarch64_sme_smops_wide definitions
6353//===----------------------------------------------------------------------===//
6354
6355namespace detail {
6356
6357aarch64_sme_smops_wideGenericAdaptorBase::aarch64_sme_smops_wideGenericAdaptorBase(aarch64_sme_smops_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
6358
6359uint32_t aarch64_sme_smops_wideGenericAdaptorBase::getTileId() {
6360 auto attr = getTileIdAttr();
6361 return attr.getValue().getZExtValue();
6362}
6363
6364
6365} // namespace detail
6366aarch64_sme_smops_wideAdaptor::aarch64_sme_smops_wideAdaptor(aarch64_sme_smops_wide op) : aarch64_sme_smops_wideGenericAdaptor(op->getOperands(), op) {}
6367
6368::llvm::LogicalResult aarch64_sme_smops_wideAdaptor::verify(::mlir::Location loc) {
6369 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
6370 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.smops.wide' op requires attribute 'tile_id'");
6371
6372 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
6373 return emitError(loc, message: "'arm_sme.intr.smops.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
6374 return ::mlir::success();
6375}
6376
6377::llvm::LogicalResult aarch64_sme_smops_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6378 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6379 if (!dict) {
6380 emitError() << "expected DictionaryAttr to set properties";
6381 return ::mlir::failure();
6382 }
6383
6384 {
6385 auto attr = dict.get(name: "tile_id");
6386 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6387 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
6388 return ::mlir::failure();
6389 }
6390 return ::mlir::success();
6391}
6392
6393::mlir::Attribute aarch64_sme_smops_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6394 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6395 ::mlir::Builder odsBuilder{ctx};
6396 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
6397
6398 if (!attrs.empty())
6399 return odsBuilder.getDictionaryAttr(value: attrs);
6400 return {};
6401}
6402
6403llvm::hash_code aarch64_sme_smops_wide::computePropertiesHash(const Properties &prop) {
6404 using llvm::hash_value;
6405 return llvm::hash_combine(
6406 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
6407}
6408
6409std::optional<mlir::Attribute> aarch64_sme_smops_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6410 if (name == "tile_id")
6411 return prop.tile_id;
6412 return std::nullopt;
6413}
6414
6415void aarch64_sme_smops_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6416 if (name == "tile_id") {
6417 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
6418 return;
6419 }
6420}
6421
6422void aarch64_sme_smops_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
6423 if (prop.tile_id) {
6424 ::mlir::Attribute value = prop.tile_id;
6425 ::mlir::Attribute originalValue = value;
6426 visitor("tile_id", value);
6427 if (value != originalValue)
6428 setInherentAttr(prop, name: "tile_id", value);
6429 }
6430}
6431
6432::llvm::LogicalResult aarch64_sme_smops_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6433 {
6434 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
6435 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
6436 return ::mlir::failure();
6437 }
6438 return ::mlir::success();
6439}
6440
6441::llvm::LogicalResult aarch64_sme_smops_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6442 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6443 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
6444 return ::mlir::failure();
6445 return ::mlir::success();
6446}
6447
6448void aarch64_sme_smops_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6449 auto &prop = getProperties(); (void)prop;
6450 writer.writeAttribute(attr: prop.tile_id);
6451}
6452
6453uint32_t aarch64_sme_smops_wide::getTileId() {
6454 auto attr = getTileIdAttr();
6455 return attr.getValue().getZExtValue();
6456}
6457
6458void aarch64_sme_smops_wide::setTileId(uint32_t attrValue) {
6459 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
6460}
6461
6462void aarch64_sme_smops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6463 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
6464}
6465
6466aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6467 ::mlir::OperationState __state__(location, getOperationName());
6468 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6469 auto __res__ = builder.create(state: __state__);
6470 assert((::llvm::isa<aarch64_sme_smops_wide>(__res__)) && "builder didn't return the right type");
6471 return ::llvm::cast<aarch64_sme_smops_wide>(Val: __res__);
6472}
6473
6474aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6475 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6476}
6477
6478void aarch64_sme_smops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6479 auto &odsProperties = odsState.getOrAddProperties<Properties>();
6480 odsState.addOperands(newOperands: lhs_predicate);
6481 odsState.addOperands(newOperands: rhs_predicate);
6482 odsState.addOperands(newOperands: lhs_vector);
6483 odsState.addOperands(newOperands: rhs_vector);
6484 odsProperties.tile_id = tile_id;
6485 assert(resultTypes.size() == 0u && "mismatched number of results");
6486 odsState.addTypes(newTypes&: resultTypes);
6487}
6488
6489aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6490 ::mlir::OperationState __state__(location, getOperationName());
6491 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6492 auto __res__ = builder.create(state: __state__);
6493 assert((::llvm::isa<aarch64_sme_smops_wide>(__res__)) && "builder didn't return the right type");
6494 return ::llvm::cast<aarch64_sme_smops_wide>(Val: __res__);
6495}
6496
6497aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6498 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6499}
6500
6501void aarch64_sme_smops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6502 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
6503}
6504
6505aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6506 ::mlir::OperationState __state__(location, getOperationName());
6507 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6508 auto __res__ = builder.create(state: __state__);
6509 assert((::llvm::isa<aarch64_sme_smops_wide>(__res__)) && "builder didn't return the right type");
6510 return ::llvm::cast<aarch64_sme_smops_wide>(Val: __res__);
6511}
6512
6513aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6514 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6515}
6516
6517void aarch64_sme_smops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6518 auto &odsProperties = odsState.getOrAddProperties<Properties>();
6519 odsState.addOperands(newOperands: lhs_predicate);
6520 odsState.addOperands(newOperands: rhs_predicate);
6521 odsState.addOperands(newOperands: lhs_vector);
6522 odsState.addOperands(newOperands: rhs_vector);
6523 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
6524 assert(resultTypes.size() == 0u && "mismatched number of results");
6525 odsState.addTypes(newTypes&: resultTypes);
6526}
6527
6528aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6529 ::mlir::OperationState __state__(location, getOperationName());
6530 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6531 auto __res__ = builder.create(state: __state__);
6532 assert((::llvm::isa<aarch64_sme_smops_wide>(__res__)) && "builder didn't return the right type");
6533 return ::llvm::cast<aarch64_sme_smops_wide>(Val: __res__);
6534}
6535
6536aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6537 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6538}
6539
6540void aarch64_sme_smops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6541 assert(operands.size() == 4u && "mismatched number of parameters");
6542 odsState.addOperands(newOperands: operands);
6543 buildPropertiesAndDiscardableAttributes(odsState, attributes);
6544 assert(resultTypes.size() == 0u && "mismatched number of return types");
6545 odsState.addTypes(newTypes&: resultTypes);
6546}
6547
6548aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6549LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
6550
6551 ::mlir::OperationState __state__(location, getOperationName());
6552 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
6553 auto __res__ = builder.create(state: __state__);
6554 assert((::llvm::isa<aarch64_sme_smops_wide>(__res__)) && "builder didn't return the right type");
6555 return ::llvm::cast<aarch64_sme_smops_wide>(Val: __res__);
6556LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
6557}
6558
6559aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6560LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
6561
6562 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
6563LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
6564}
6565
6566void aarch64_sme_smops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6567 assert(operands.size() == 4u && "mismatched number of parameters");
6568 odsState.addOperands(newOperands: operands);
6569 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
6570 odsState.addAttributes(newAttributes: discardableAttributes);
6571 assert(resultTypes.size() == 0u && "mismatched number of return types");
6572 odsState.addTypes(newTypes&: resultTypes);
6573}
6574
6575aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6576 ::mlir::OperationState __state__(location, getOperationName());
6577 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
6578 auto __res__ = builder.create(state: __state__);
6579 assert((::llvm::isa<aarch64_sme_smops_wide>(__res__)) && "builder didn't return the right type");
6580 return ::llvm::cast<aarch64_sme_smops_wide>(Val: __res__);
6581}
6582
6583aarch64_sme_smops_wide aarch64_sme_smops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6584 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
6585}
6586
6587::llvm::LogicalResult aarch64_sme_smops_wide::verifyInvariantsImpl() {
6588 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
6589 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
6590
6591 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
6592 return ::mlir::failure();
6593 {
6594 unsigned index = 0; (void)index;
6595 auto valueGroup0 = getODSOperands(index: 0);
6596
6597 for (auto v : valueGroup0) {
6598 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6599 return ::mlir::failure();
6600 }
6601 auto valueGroup1 = getODSOperands(index: 1);
6602
6603 for (auto v : valueGroup1) {
6604 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6605 return ::mlir::failure();
6606 }
6607 auto valueGroup2 = getODSOperands(index: 2);
6608
6609 for (auto v : valueGroup2) {
6610 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6611 return ::mlir::failure();
6612 }
6613 auto valueGroup3 = getODSOperands(index: 3);
6614
6615 for (auto v : valueGroup3) {
6616 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6617 return ::mlir::failure();
6618 }
6619 }
6620 return ::mlir::success();
6621}
6622
6623::llvm::LogicalResult aarch64_sme_smops_wide::verifyInvariants() {
6624 return verifyInvariantsImpl();
6625}
6626
6627::llvm::LogicalResult aarch64_sme_smops_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6628 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6629 if (!dict) {
6630 emitError() << "expected DictionaryAttr to set properties";
6631 return ::mlir::failure();
6632 }
6633 // keep track of used keys in the input dictionary to be able to error out
6634 // if there are some unknown ones.
6635 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
6636 ::mlir::MLIRContext *ctx = dict.getContext();
6637 (void)ctx;
6638 {
6639
6640 auto &propStorage = prop.tile_id;
6641 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
6642 auto attr = dict.get(name: tile_idAttrName);
6643 usedKeys.insert(V: tile_idAttrName);
6644 if (attr || /*isRequired=*/true) {
6645 if (!attr) {
6646 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
6647 "Properties.";
6648 return ::mlir::failure();
6649 }
6650 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
6651 if (convertedAttr) {
6652 propStorage = convertedAttr;
6653 } else {
6654 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
6655 return ::mlir::failure();
6656 }
6657 }
6658 }
6659
6660 for (::mlir::NamedAttribute attr : dict) {
6661 if (!usedKeys.contains(V: attr.getName()))
6662 return emitError() << "unknown key '" << attr.getName() <<
6663 "' when parsing properties dictionary";
6664 }
6665 return ::mlir::success();
6666}
6667
6668void aarch64_sme_smops_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6669 Properties &properties = odsState.getOrAddProperties<Properties>();
6670 populateDefaultProperties(opName: odsState.name, properties);
6671 const ::llvm::StringRef inherentNames[] = {"tile_id"};
6672 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
6673 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
6674 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
6675 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
6676 });
6677}
6678
6679
6680} // namespace mlir::arm_sme
6681MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_smops_wide)
6682MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_smops_wideGenericAdaptorBase::Properties)
6683
6684namespace mlir::arm_sme {
6685
6686
6687//===----------------------------------------------------------------------===//
6688// ::mlir::arm_sme::aarch64_sme_smops_za32 definitions
6689//===----------------------------------------------------------------------===//
6690
6691namespace detail {
6692
6693aarch64_sme_smops_za32GenericAdaptorBase::aarch64_sme_smops_za32GenericAdaptorBase(aarch64_sme_smops_za32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
6694
6695uint32_t aarch64_sme_smops_za32GenericAdaptorBase::getTileId() {
6696 auto attr = getTileIdAttr();
6697 return attr.getValue().getZExtValue();
6698}
6699
6700
6701} // namespace detail
6702aarch64_sme_smops_za32Adaptor::aarch64_sme_smops_za32Adaptor(aarch64_sme_smops_za32 op) : aarch64_sme_smops_za32GenericAdaptor(op->getOperands(), op) {}
6703
6704::llvm::LogicalResult aarch64_sme_smops_za32Adaptor::verify(::mlir::Location loc) {
6705 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
6706 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.smops.za32' op requires attribute 'tile_id'");
6707
6708 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
6709 return emitError(loc, message: "'arm_sme.intr.smops.za32' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
6710 return ::mlir::success();
6711}
6712
6713::llvm::LogicalResult aarch64_sme_smops_za32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6714 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6715 if (!dict) {
6716 emitError() << "expected DictionaryAttr to set properties";
6717 return ::mlir::failure();
6718 }
6719
6720 {
6721 auto attr = dict.get(name: "tile_id");
6722 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6723 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
6724 return ::mlir::failure();
6725 }
6726 return ::mlir::success();
6727}
6728
6729::mlir::Attribute aarch64_sme_smops_za32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6730 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6731 ::mlir::Builder odsBuilder{ctx};
6732 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
6733
6734 if (!attrs.empty())
6735 return odsBuilder.getDictionaryAttr(value: attrs);
6736 return {};
6737}
6738
6739llvm::hash_code aarch64_sme_smops_za32::computePropertiesHash(const Properties &prop) {
6740 using llvm::hash_value;
6741 return llvm::hash_combine(
6742 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
6743}
6744
6745std::optional<mlir::Attribute> aarch64_sme_smops_za32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6746 if (name == "tile_id")
6747 return prop.tile_id;
6748 return std::nullopt;
6749}
6750
6751void aarch64_sme_smops_za32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6752 if (name == "tile_id") {
6753 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
6754 return;
6755 }
6756}
6757
6758void aarch64_sme_smops_za32::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
6759 if (prop.tile_id) {
6760 ::mlir::Attribute value = prop.tile_id;
6761 ::mlir::Attribute originalValue = value;
6762 visitor("tile_id", value);
6763 if (value != originalValue)
6764 setInherentAttr(prop, name: "tile_id", value);
6765 }
6766}
6767
6768::llvm::LogicalResult aarch64_sme_smops_za32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6769 {
6770 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
6771 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
6772 return ::mlir::failure();
6773 }
6774 return ::mlir::success();
6775}
6776
6777::llvm::LogicalResult aarch64_sme_smops_za32::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6778 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6779 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
6780 return ::mlir::failure();
6781 return ::mlir::success();
6782}
6783
6784void aarch64_sme_smops_za32::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6785 auto &prop = getProperties(); (void)prop;
6786 writer.writeAttribute(attr: prop.tile_id);
6787}
6788
6789uint32_t aarch64_sme_smops_za32::getTileId() {
6790 auto attr = getTileIdAttr();
6791 return attr.getValue().getZExtValue();
6792}
6793
6794void aarch64_sme_smops_za32::setTileId(uint32_t attrValue) {
6795 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
6796}
6797
6798void aarch64_sme_smops_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6799 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
6800}
6801
6802aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6803 ::mlir::OperationState __state__(location, getOperationName());
6804 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6805 auto __res__ = builder.create(state: __state__);
6806 assert((::llvm::isa<aarch64_sme_smops_za32>(__res__)) && "builder didn't return the right type");
6807 return ::llvm::cast<aarch64_sme_smops_za32>(Val: __res__);
6808}
6809
6810aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6811 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6812}
6813
6814void aarch64_sme_smops_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6815 auto &odsProperties = odsState.getOrAddProperties<Properties>();
6816 odsState.addOperands(newOperands: lhs_predicate);
6817 odsState.addOperands(newOperands: rhs_predicate);
6818 odsState.addOperands(newOperands: lhs_vector);
6819 odsState.addOperands(newOperands: rhs_vector);
6820 odsProperties.tile_id = tile_id;
6821 assert(resultTypes.size() == 0u && "mismatched number of results");
6822 odsState.addTypes(newTypes&: resultTypes);
6823}
6824
6825aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6826 ::mlir::OperationState __state__(location, getOperationName());
6827 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6828 auto __res__ = builder.create(state: __state__);
6829 assert((::llvm::isa<aarch64_sme_smops_za32>(__res__)) && "builder didn't return the right type");
6830 return ::llvm::cast<aarch64_sme_smops_za32>(Val: __res__);
6831}
6832
6833aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6834 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6835}
6836
6837void aarch64_sme_smops_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6838 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
6839}
6840
6841aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6842 ::mlir::OperationState __state__(location, getOperationName());
6843 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6844 auto __res__ = builder.create(state: __state__);
6845 assert((::llvm::isa<aarch64_sme_smops_za32>(__res__)) && "builder didn't return the right type");
6846 return ::llvm::cast<aarch64_sme_smops_za32>(Val: __res__);
6847}
6848
6849aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6850 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6851}
6852
6853void aarch64_sme_smops_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6854 auto &odsProperties = odsState.getOrAddProperties<Properties>();
6855 odsState.addOperands(newOperands: lhs_predicate);
6856 odsState.addOperands(newOperands: rhs_predicate);
6857 odsState.addOperands(newOperands: lhs_vector);
6858 odsState.addOperands(newOperands: rhs_vector);
6859 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
6860 assert(resultTypes.size() == 0u && "mismatched number of results");
6861 odsState.addTypes(newTypes&: resultTypes);
6862}
6863
6864aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6865 ::mlir::OperationState __state__(location, getOperationName());
6866 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6867 auto __res__ = builder.create(state: __state__);
6868 assert((::llvm::isa<aarch64_sme_smops_za32>(__res__)) && "builder didn't return the right type");
6869 return ::llvm::cast<aarch64_sme_smops_za32>(Val: __res__);
6870}
6871
6872aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
6873 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
6874}
6875
6876void aarch64_sme_smops_za32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6877 assert(operands.size() == 4u && "mismatched number of parameters");
6878 odsState.addOperands(newOperands: operands);
6879 buildPropertiesAndDiscardableAttributes(odsState, attributes);
6880 assert(resultTypes.size() == 0u && "mismatched number of return types");
6881 odsState.addTypes(newTypes&: resultTypes);
6882}
6883
6884aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6885LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
6886
6887 ::mlir::OperationState __state__(location, getOperationName());
6888 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
6889 auto __res__ = builder.create(state: __state__);
6890 assert((::llvm::isa<aarch64_sme_smops_za32>(__res__)) && "builder didn't return the right type");
6891 return ::llvm::cast<aarch64_sme_smops_za32>(Val: __res__);
6892LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
6893}
6894
6895aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6896LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
6897
6898 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
6899LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
6900}
6901
6902void aarch64_sme_smops_za32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6903 assert(operands.size() == 4u && "mismatched number of parameters");
6904 odsState.addOperands(newOperands: operands);
6905 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
6906 odsState.addAttributes(newAttributes: discardableAttributes);
6907 assert(resultTypes.size() == 0u && "mismatched number of return types");
6908 odsState.addTypes(newTypes&: resultTypes);
6909}
6910
6911aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6912 ::mlir::OperationState __state__(location, getOperationName());
6913 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
6914 auto __res__ = builder.create(state: __state__);
6915 assert((::llvm::isa<aarch64_sme_smops_za32>(__res__)) && "builder didn't return the right type");
6916 return ::llvm::cast<aarch64_sme_smops_za32>(Val: __res__);
6917}
6918
6919aarch64_sme_smops_za32 aarch64_sme_smops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6920 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
6921}
6922
6923::llvm::LogicalResult aarch64_sme_smops_za32::verifyInvariantsImpl() {
6924 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
6925 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
6926
6927 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
6928 return ::mlir::failure();
6929 {
6930 unsigned index = 0; (void)index;
6931 auto valueGroup0 = getODSOperands(index: 0);
6932
6933 for (auto v : valueGroup0) {
6934 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6935 return ::mlir::failure();
6936 }
6937 auto valueGroup1 = getODSOperands(index: 1);
6938
6939 for (auto v : valueGroup1) {
6940 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6941 return ::mlir::failure();
6942 }
6943 auto valueGroup2 = getODSOperands(index: 2);
6944
6945 for (auto v : valueGroup2) {
6946 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6947 return ::mlir::failure();
6948 }
6949 auto valueGroup3 = getODSOperands(index: 3);
6950
6951 for (auto v : valueGroup3) {
6952 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6953 return ::mlir::failure();
6954 }
6955 }
6956 return ::mlir::success();
6957}
6958
6959::llvm::LogicalResult aarch64_sme_smops_za32::verifyInvariants() {
6960 return verifyInvariantsImpl();
6961}
6962
6963::llvm::LogicalResult aarch64_sme_smops_za32::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6964 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6965 if (!dict) {
6966 emitError() << "expected DictionaryAttr to set properties";
6967 return ::mlir::failure();
6968 }
6969 // keep track of used keys in the input dictionary to be able to error out
6970 // if there are some unknown ones.
6971 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
6972 ::mlir::MLIRContext *ctx = dict.getContext();
6973 (void)ctx;
6974 {
6975
6976 auto &propStorage = prop.tile_id;
6977 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
6978 auto attr = dict.get(name: tile_idAttrName);
6979 usedKeys.insert(V: tile_idAttrName);
6980 if (attr || /*isRequired=*/true) {
6981 if (!attr) {
6982 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
6983 "Properties.";
6984 return ::mlir::failure();
6985 }
6986 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
6987 if (convertedAttr) {
6988 propStorage = convertedAttr;
6989 } else {
6990 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
6991 return ::mlir::failure();
6992 }
6993 }
6994 }
6995
6996 for (::mlir::NamedAttribute attr : dict) {
6997 if (!usedKeys.contains(V: attr.getName()))
6998 return emitError() << "unknown key '" << attr.getName() <<
6999 "' when parsing properties dictionary";
7000 }
7001 return ::mlir::success();
7002}
7003
7004void aarch64_sme_smops_za32::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7005 Properties &properties = odsState.getOrAddProperties<Properties>();
7006 populateDefaultProperties(opName: odsState.name, properties);
7007 const ::llvm::StringRef inherentNames[] = {"tile_id"};
7008 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
7009 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
7010 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
7011 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
7012 });
7013}
7014
7015
7016} // namespace mlir::arm_sme
7017MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_smops_za32)
7018MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_smops_za32GenericAdaptorBase::Properties)
7019
7020namespace mlir::arm_sme {
7021
7022
7023//===----------------------------------------------------------------------===//
7024// ::mlir::arm_sme::aarch64_sme_st1b_horiz definitions
7025//===----------------------------------------------------------------------===//
7026
7027namespace detail {
7028
7029aarch64_sme_st1b_horizGenericAdaptorBase::aarch64_sme_st1b_horizGenericAdaptorBase(aarch64_sme_st1b_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
7030
7031uint32_t aarch64_sme_st1b_horizGenericAdaptorBase::getTileId() {
7032 auto attr = getTileIdAttr();
7033 return attr.getValue().getZExtValue();
7034}
7035
7036
7037} // namespace detail
7038aarch64_sme_st1b_horizAdaptor::aarch64_sme_st1b_horizAdaptor(aarch64_sme_st1b_horiz op) : aarch64_sme_st1b_horizGenericAdaptor(op->getOperands(), op) {}
7039
7040::llvm::LogicalResult aarch64_sme_st1b_horizAdaptor::verify(::mlir::Location loc) {
7041 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
7042 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1b.horiz' op requires attribute 'tile_id'");
7043
7044 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
7045 return emitError(loc, message: "'arm_sme.intr.st1b.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
7046 return ::mlir::success();
7047}
7048
7049::llvm::LogicalResult aarch64_sme_st1b_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7050 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7051 if (!dict) {
7052 emitError() << "expected DictionaryAttr to set properties";
7053 return ::mlir::failure();
7054 }
7055
7056 {
7057 auto attr = dict.get(name: "tile_id");
7058 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
7059 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
7060 return ::mlir::failure();
7061 }
7062 return ::mlir::success();
7063}
7064
7065::mlir::Attribute aarch64_sme_st1b_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
7066 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
7067 ::mlir::Builder odsBuilder{ctx};
7068 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
7069
7070 if (!attrs.empty())
7071 return odsBuilder.getDictionaryAttr(value: attrs);
7072 return {};
7073}
7074
7075llvm::hash_code aarch64_sme_st1b_horiz::computePropertiesHash(const Properties &prop) {
7076 using llvm::hash_value;
7077 return llvm::hash_combine(
7078 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
7079}
7080
7081std::optional<mlir::Attribute> aarch64_sme_st1b_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
7082 if (name == "tile_id")
7083 return prop.tile_id;
7084 return std::nullopt;
7085}
7086
7087void aarch64_sme_st1b_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
7088 if (name == "tile_id") {
7089 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
7090 return;
7091 }
7092}
7093
7094void aarch64_sme_st1b_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
7095 if (prop.tile_id) {
7096 ::mlir::Attribute value = prop.tile_id;
7097 ::mlir::Attribute originalValue = value;
7098 visitor("tile_id", value);
7099 if (value != originalValue)
7100 setInherentAttr(prop, name: "tile_id", value);
7101 }
7102}
7103
7104::llvm::LogicalResult aarch64_sme_st1b_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7105 {
7106 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
7107 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
7108 return ::mlir::failure();
7109 }
7110 return ::mlir::success();
7111}
7112
7113::llvm::LogicalResult aarch64_sme_st1b_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
7114 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
7115 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
7116 return ::mlir::failure();
7117 return ::mlir::success();
7118}
7119
7120void aarch64_sme_st1b_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
7121 auto &prop = getProperties(); (void)prop;
7122 writer.writeAttribute(attr: prop.tile_id);
7123}
7124
7125uint32_t aarch64_sme_st1b_horiz::getTileId() {
7126 auto attr = getTileIdAttr();
7127 return attr.getValue().getZExtValue();
7128}
7129
7130void aarch64_sme_st1b_horiz::setTileId(uint32_t attrValue) {
7131 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
7132}
7133
7134void aarch64_sme_st1b_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7135 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
7136}
7137
7138aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7139 ::mlir::OperationState __state__(location, getOperationName());
7140 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7141 auto __res__ = builder.create(state: __state__);
7142 assert((::llvm::isa<aarch64_sme_st1b_horiz>(__res__)) && "builder didn't return the right type");
7143 return ::llvm::cast<aarch64_sme_st1b_horiz>(Val: __res__);
7144}
7145
7146aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7147 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7148}
7149
7150void aarch64_sme_st1b_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7151 auto &odsProperties = odsState.getOrAddProperties<Properties>();
7152 odsState.addOperands(newOperands: predicate);
7153 odsState.addOperands(newOperands: store_address);
7154 odsState.addOperands(newOperands: tile_slice_index);
7155 odsProperties.tile_id = tile_id;
7156 assert(resultTypes.size() == 0u && "mismatched number of results");
7157 odsState.addTypes(newTypes&: resultTypes);
7158}
7159
7160aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7161 ::mlir::OperationState __state__(location, getOperationName());
7162 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7163 auto __res__ = builder.create(state: __state__);
7164 assert((::llvm::isa<aarch64_sme_st1b_horiz>(__res__)) && "builder didn't return the right type");
7165 return ::llvm::cast<aarch64_sme_st1b_horiz>(Val: __res__);
7166}
7167
7168aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7169 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7170}
7171
7172void aarch64_sme_st1b_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7173 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
7174}
7175
7176aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7177 ::mlir::OperationState __state__(location, getOperationName());
7178 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7179 auto __res__ = builder.create(state: __state__);
7180 assert((::llvm::isa<aarch64_sme_st1b_horiz>(__res__)) && "builder didn't return the right type");
7181 return ::llvm::cast<aarch64_sme_st1b_horiz>(Val: __res__);
7182}
7183
7184aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7185 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7186}
7187
7188void aarch64_sme_st1b_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7189 auto &odsProperties = odsState.getOrAddProperties<Properties>();
7190 odsState.addOperands(newOperands: predicate);
7191 odsState.addOperands(newOperands: store_address);
7192 odsState.addOperands(newOperands: tile_slice_index);
7193 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
7194 assert(resultTypes.size() == 0u && "mismatched number of results");
7195 odsState.addTypes(newTypes&: resultTypes);
7196}
7197
7198aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7199 ::mlir::OperationState __state__(location, getOperationName());
7200 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7201 auto __res__ = builder.create(state: __state__);
7202 assert((::llvm::isa<aarch64_sme_st1b_horiz>(__res__)) && "builder didn't return the right type");
7203 return ::llvm::cast<aarch64_sme_st1b_horiz>(Val: __res__);
7204}
7205
7206aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7207 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7208}
7209
7210void aarch64_sme_st1b_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7211 assert(operands.size() == 3u && "mismatched number of parameters");
7212 odsState.addOperands(newOperands: operands);
7213 buildPropertiesAndDiscardableAttributes(odsState, attributes);
7214 assert(resultTypes.size() == 0u && "mismatched number of return types");
7215 odsState.addTypes(newTypes&: resultTypes);
7216}
7217
7218aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7219LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
7220
7221 ::mlir::OperationState __state__(location, getOperationName());
7222 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7223 auto __res__ = builder.create(state: __state__);
7224 assert((::llvm::isa<aarch64_sme_st1b_horiz>(__res__)) && "builder didn't return the right type");
7225 return ::llvm::cast<aarch64_sme_st1b_horiz>(Val: __res__);
7226LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
7227}
7228
7229aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7230LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
7231
7232 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7233LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
7234}
7235
7236void aarch64_sme_st1b_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7237 assert(operands.size() == 3u && "mismatched number of parameters");
7238 odsState.addOperands(newOperands: operands);
7239 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
7240 odsState.addAttributes(newAttributes: discardableAttributes);
7241 assert(resultTypes.size() == 0u && "mismatched number of return types");
7242 odsState.addTypes(newTypes&: resultTypes);
7243}
7244
7245aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7246 ::mlir::OperationState __state__(location, getOperationName());
7247 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
7248 auto __res__ = builder.create(state: __state__);
7249 assert((::llvm::isa<aarch64_sme_st1b_horiz>(__res__)) && "builder didn't return the right type");
7250 return ::llvm::cast<aarch64_sme_st1b_horiz>(Val: __res__);
7251}
7252
7253aarch64_sme_st1b_horiz aarch64_sme_st1b_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7254 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
7255}
7256
7257::llvm::LogicalResult aarch64_sme_st1b_horiz::verifyInvariantsImpl() {
7258 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
7259 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
7260
7261 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
7262 return ::mlir::failure();
7263 {
7264 unsigned index = 0; (void)index;
7265 auto valueGroup0 = getODSOperands(index: 0);
7266
7267 for (auto v : valueGroup0) {
7268 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7269 return ::mlir::failure();
7270 }
7271 auto valueGroup1 = getODSOperands(index: 1);
7272
7273 for (auto v : valueGroup1) {
7274 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7275 return ::mlir::failure();
7276 }
7277 auto valueGroup2 = getODSOperands(index: 2);
7278
7279 for (auto v : valueGroup2) {
7280 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7281 return ::mlir::failure();
7282 }
7283 }
7284 return ::mlir::success();
7285}
7286
7287::llvm::LogicalResult aarch64_sme_st1b_horiz::verifyInvariants() {
7288 return verifyInvariantsImpl();
7289}
7290
7291::llvm::LogicalResult aarch64_sme_st1b_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7292 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7293 if (!dict) {
7294 emitError() << "expected DictionaryAttr to set properties";
7295 return ::mlir::failure();
7296 }
7297 // keep track of used keys in the input dictionary to be able to error out
7298 // if there are some unknown ones.
7299 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
7300 ::mlir::MLIRContext *ctx = dict.getContext();
7301 (void)ctx;
7302 {
7303
7304 auto &propStorage = prop.tile_id;
7305 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
7306 auto attr = dict.get(name: tile_idAttrName);
7307 usedKeys.insert(V: tile_idAttrName);
7308 if (attr || /*isRequired=*/true) {
7309 if (!attr) {
7310 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
7311 "Properties.";
7312 return ::mlir::failure();
7313 }
7314 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
7315 if (convertedAttr) {
7316 propStorage = convertedAttr;
7317 } else {
7318 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
7319 return ::mlir::failure();
7320 }
7321 }
7322 }
7323
7324 for (::mlir::NamedAttribute attr : dict) {
7325 if (!usedKeys.contains(V: attr.getName()))
7326 return emitError() << "unknown key '" << attr.getName() <<
7327 "' when parsing properties dictionary";
7328 }
7329 return ::mlir::success();
7330}
7331
7332void aarch64_sme_st1b_horiz::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7333 {
7334 auto valueRange = getODSOperandIndexAndLength(index: 1);
7335 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
7336 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
7337 }
7338 }
7339}
7340
7341void aarch64_sme_st1b_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7342 Properties &properties = odsState.getOrAddProperties<Properties>();
7343 populateDefaultProperties(opName: odsState.name, properties);
7344 const ::llvm::StringRef inherentNames[] = {"tile_id"};
7345 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
7346 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
7347 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
7348 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
7349 });
7350}
7351
7352
7353} // namespace mlir::arm_sme
7354MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1b_horiz)
7355MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1b_horizGenericAdaptorBase::Properties)
7356
7357namespace mlir::arm_sme {
7358
7359
7360//===----------------------------------------------------------------------===//
7361// ::mlir::arm_sme::aarch64_sme_st1b_vert definitions
7362//===----------------------------------------------------------------------===//
7363
7364namespace detail {
7365
7366aarch64_sme_st1b_vertGenericAdaptorBase::aarch64_sme_st1b_vertGenericAdaptorBase(aarch64_sme_st1b_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
7367
7368uint32_t aarch64_sme_st1b_vertGenericAdaptorBase::getTileId() {
7369 auto attr = getTileIdAttr();
7370 return attr.getValue().getZExtValue();
7371}
7372
7373
7374} // namespace detail
7375aarch64_sme_st1b_vertAdaptor::aarch64_sme_st1b_vertAdaptor(aarch64_sme_st1b_vert op) : aarch64_sme_st1b_vertGenericAdaptor(op->getOperands(), op) {}
7376
7377::llvm::LogicalResult aarch64_sme_st1b_vertAdaptor::verify(::mlir::Location loc) {
7378 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
7379 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1b.vert' op requires attribute 'tile_id'");
7380
7381 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
7382 return emitError(loc, message: "'arm_sme.intr.st1b.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
7383 return ::mlir::success();
7384}
7385
7386::llvm::LogicalResult aarch64_sme_st1b_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7387 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7388 if (!dict) {
7389 emitError() << "expected DictionaryAttr to set properties";
7390 return ::mlir::failure();
7391 }
7392
7393 {
7394 auto attr = dict.get(name: "tile_id");
7395 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
7396 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
7397 return ::mlir::failure();
7398 }
7399 return ::mlir::success();
7400}
7401
7402::mlir::Attribute aarch64_sme_st1b_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
7403 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
7404 ::mlir::Builder odsBuilder{ctx};
7405 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
7406
7407 if (!attrs.empty())
7408 return odsBuilder.getDictionaryAttr(value: attrs);
7409 return {};
7410}
7411
7412llvm::hash_code aarch64_sme_st1b_vert::computePropertiesHash(const Properties &prop) {
7413 using llvm::hash_value;
7414 return llvm::hash_combine(
7415 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
7416}
7417
7418std::optional<mlir::Attribute> aarch64_sme_st1b_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
7419 if (name == "tile_id")
7420 return prop.tile_id;
7421 return std::nullopt;
7422}
7423
7424void aarch64_sme_st1b_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
7425 if (name == "tile_id") {
7426 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
7427 return;
7428 }
7429}
7430
7431void aarch64_sme_st1b_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
7432 if (prop.tile_id) {
7433 ::mlir::Attribute value = prop.tile_id;
7434 ::mlir::Attribute originalValue = value;
7435 visitor("tile_id", value);
7436 if (value != originalValue)
7437 setInherentAttr(prop, name: "tile_id", value);
7438 }
7439}
7440
7441::llvm::LogicalResult aarch64_sme_st1b_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7442 {
7443 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
7444 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
7445 return ::mlir::failure();
7446 }
7447 return ::mlir::success();
7448}
7449
7450::llvm::LogicalResult aarch64_sme_st1b_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
7451 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
7452 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
7453 return ::mlir::failure();
7454 return ::mlir::success();
7455}
7456
7457void aarch64_sme_st1b_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
7458 auto &prop = getProperties(); (void)prop;
7459 writer.writeAttribute(attr: prop.tile_id);
7460}
7461
7462uint32_t aarch64_sme_st1b_vert::getTileId() {
7463 auto attr = getTileIdAttr();
7464 return attr.getValue().getZExtValue();
7465}
7466
7467void aarch64_sme_st1b_vert::setTileId(uint32_t attrValue) {
7468 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
7469}
7470
7471void aarch64_sme_st1b_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7472 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
7473}
7474
7475aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7476 ::mlir::OperationState __state__(location, getOperationName());
7477 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7478 auto __res__ = builder.create(state: __state__);
7479 assert((::llvm::isa<aarch64_sme_st1b_vert>(__res__)) && "builder didn't return the right type");
7480 return ::llvm::cast<aarch64_sme_st1b_vert>(Val: __res__);
7481}
7482
7483aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7484 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7485}
7486
7487void aarch64_sme_st1b_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7488 auto &odsProperties = odsState.getOrAddProperties<Properties>();
7489 odsState.addOperands(newOperands: predicate);
7490 odsState.addOperands(newOperands: store_address);
7491 odsState.addOperands(newOperands: tile_slice_index);
7492 odsProperties.tile_id = tile_id;
7493 assert(resultTypes.size() == 0u && "mismatched number of results");
7494 odsState.addTypes(newTypes&: resultTypes);
7495}
7496
7497aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7498 ::mlir::OperationState __state__(location, getOperationName());
7499 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7500 auto __res__ = builder.create(state: __state__);
7501 assert((::llvm::isa<aarch64_sme_st1b_vert>(__res__)) && "builder didn't return the right type");
7502 return ::llvm::cast<aarch64_sme_st1b_vert>(Val: __res__);
7503}
7504
7505aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7506 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7507}
7508
7509void aarch64_sme_st1b_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7510 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
7511}
7512
7513aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7514 ::mlir::OperationState __state__(location, getOperationName());
7515 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7516 auto __res__ = builder.create(state: __state__);
7517 assert((::llvm::isa<aarch64_sme_st1b_vert>(__res__)) && "builder didn't return the right type");
7518 return ::llvm::cast<aarch64_sme_st1b_vert>(Val: __res__);
7519}
7520
7521aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7522 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7523}
7524
7525void aarch64_sme_st1b_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7526 auto &odsProperties = odsState.getOrAddProperties<Properties>();
7527 odsState.addOperands(newOperands: predicate);
7528 odsState.addOperands(newOperands: store_address);
7529 odsState.addOperands(newOperands: tile_slice_index);
7530 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
7531 assert(resultTypes.size() == 0u && "mismatched number of results");
7532 odsState.addTypes(newTypes&: resultTypes);
7533}
7534
7535aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7536 ::mlir::OperationState __state__(location, getOperationName());
7537 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7538 auto __res__ = builder.create(state: __state__);
7539 assert((::llvm::isa<aarch64_sme_st1b_vert>(__res__)) && "builder didn't return the right type");
7540 return ::llvm::cast<aarch64_sme_st1b_vert>(Val: __res__);
7541}
7542
7543aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7544 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7545}
7546
7547void aarch64_sme_st1b_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7548 assert(operands.size() == 3u && "mismatched number of parameters");
7549 odsState.addOperands(newOperands: operands);
7550 buildPropertiesAndDiscardableAttributes(odsState, attributes);
7551 assert(resultTypes.size() == 0u && "mismatched number of return types");
7552 odsState.addTypes(newTypes&: resultTypes);
7553}
7554
7555aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7556LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
7557
7558 ::mlir::OperationState __state__(location, getOperationName());
7559 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7560 auto __res__ = builder.create(state: __state__);
7561 assert((::llvm::isa<aarch64_sme_st1b_vert>(__res__)) && "builder didn't return the right type");
7562 return ::llvm::cast<aarch64_sme_st1b_vert>(Val: __res__);
7563LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
7564}
7565
7566aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7567LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
7568
7569 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7570LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
7571}
7572
7573void aarch64_sme_st1b_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7574 assert(operands.size() == 3u && "mismatched number of parameters");
7575 odsState.addOperands(newOperands: operands);
7576 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
7577 odsState.addAttributes(newAttributes: discardableAttributes);
7578 assert(resultTypes.size() == 0u && "mismatched number of return types");
7579 odsState.addTypes(newTypes&: resultTypes);
7580}
7581
7582aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7583 ::mlir::OperationState __state__(location, getOperationName());
7584 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
7585 auto __res__ = builder.create(state: __state__);
7586 assert((::llvm::isa<aarch64_sme_st1b_vert>(__res__)) && "builder didn't return the right type");
7587 return ::llvm::cast<aarch64_sme_st1b_vert>(Val: __res__);
7588}
7589
7590aarch64_sme_st1b_vert aarch64_sme_st1b_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7591 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
7592}
7593
7594::llvm::LogicalResult aarch64_sme_st1b_vert::verifyInvariantsImpl() {
7595 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
7596 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
7597
7598 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
7599 return ::mlir::failure();
7600 {
7601 unsigned index = 0; (void)index;
7602 auto valueGroup0 = getODSOperands(index: 0);
7603
7604 for (auto v : valueGroup0) {
7605 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7606 return ::mlir::failure();
7607 }
7608 auto valueGroup1 = getODSOperands(index: 1);
7609
7610 for (auto v : valueGroup1) {
7611 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7612 return ::mlir::failure();
7613 }
7614 auto valueGroup2 = getODSOperands(index: 2);
7615
7616 for (auto v : valueGroup2) {
7617 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7618 return ::mlir::failure();
7619 }
7620 }
7621 return ::mlir::success();
7622}
7623
7624::llvm::LogicalResult aarch64_sme_st1b_vert::verifyInvariants() {
7625 return verifyInvariantsImpl();
7626}
7627
7628::llvm::LogicalResult aarch64_sme_st1b_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7629 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7630 if (!dict) {
7631 emitError() << "expected DictionaryAttr to set properties";
7632 return ::mlir::failure();
7633 }
7634 // keep track of used keys in the input dictionary to be able to error out
7635 // if there are some unknown ones.
7636 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
7637 ::mlir::MLIRContext *ctx = dict.getContext();
7638 (void)ctx;
7639 {
7640
7641 auto &propStorage = prop.tile_id;
7642 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
7643 auto attr = dict.get(name: tile_idAttrName);
7644 usedKeys.insert(V: tile_idAttrName);
7645 if (attr || /*isRequired=*/true) {
7646 if (!attr) {
7647 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
7648 "Properties.";
7649 return ::mlir::failure();
7650 }
7651 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
7652 if (convertedAttr) {
7653 propStorage = convertedAttr;
7654 } else {
7655 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
7656 return ::mlir::failure();
7657 }
7658 }
7659 }
7660
7661 for (::mlir::NamedAttribute attr : dict) {
7662 if (!usedKeys.contains(V: attr.getName()))
7663 return emitError() << "unknown key '" << attr.getName() <<
7664 "' when parsing properties dictionary";
7665 }
7666 return ::mlir::success();
7667}
7668
7669void aarch64_sme_st1b_vert::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7670 {
7671 auto valueRange = getODSOperandIndexAndLength(index: 1);
7672 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
7673 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
7674 }
7675 }
7676}
7677
7678void aarch64_sme_st1b_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7679 Properties &properties = odsState.getOrAddProperties<Properties>();
7680 populateDefaultProperties(opName: odsState.name, properties);
7681 const ::llvm::StringRef inherentNames[] = {"tile_id"};
7682 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
7683 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
7684 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
7685 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
7686 });
7687}
7688
7689
7690} // namespace mlir::arm_sme
7691MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1b_vert)
7692MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1b_vertGenericAdaptorBase::Properties)
7693
7694namespace mlir::arm_sme {
7695
7696
7697//===----------------------------------------------------------------------===//
7698// ::mlir::arm_sme::aarch64_sme_st1d_horiz definitions
7699//===----------------------------------------------------------------------===//
7700
7701namespace detail {
7702
7703aarch64_sme_st1d_horizGenericAdaptorBase::aarch64_sme_st1d_horizGenericAdaptorBase(aarch64_sme_st1d_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
7704
7705uint32_t aarch64_sme_st1d_horizGenericAdaptorBase::getTileId() {
7706 auto attr = getTileIdAttr();
7707 return attr.getValue().getZExtValue();
7708}
7709
7710
7711} // namespace detail
7712aarch64_sme_st1d_horizAdaptor::aarch64_sme_st1d_horizAdaptor(aarch64_sme_st1d_horiz op) : aarch64_sme_st1d_horizGenericAdaptor(op->getOperands(), op) {}
7713
7714::llvm::LogicalResult aarch64_sme_st1d_horizAdaptor::verify(::mlir::Location loc) {
7715 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
7716 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1d.horiz' op requires attribute 'tile_id'");
7717
7718 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
7719 return emitError(loc, message: "'arm_sme.intr.st1d.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
7720 return ::mlir::success();
7721}
7722
7723::llvm::LogicalResult aarch64_sme_st1d_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7724 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7725 if (!dict) {
7726 emitError() << "expected DictionaryAttr to set properties";
7727 return ::mlir::failure();
7728 }
7729
7730 {
7731 auto attr = dict.get(name: "tile_id");
7732 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
7733 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
7734 return ::mlir::failure();
7735 }
7736 return ::mlir::success();
7737}
7738
7739::mlir::Attribute aarch64_sme_st1d_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
7740 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
7741 ::mlir::Builder odsBuilder{ctx};
7742 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
7743
7744 if (!attrs.empty())
7745 return odsBuilder.getDictionaryAttr(value: attrs);
7746 return {};
7747}
7748
7749llvm::hash_code aarch64_sme_st1d_horiz::computePropertiesHash(const Properties &prop) {
7750 using llvm::hash_value;
7751 return llvm::hash_combine(
7752 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
7753}
7754
7755std::optional<mlir::Attribute> aarch64_sme_st1d_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
7756 if (name == "tile_id")
7757 return prop.tile_id;
7758 return std::nullopt;
7759}
7760
7761void aarch64_sme_st1d_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
7762 if (name == "tile_id") {
7763 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
7764 return;
7765 }
7766}
7767
7768void aarch64_sme_st1d_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
7769 if (prop.tile_id) {
7770 ::mlir::Attribute value = prop.tile_id;
7771 ::mlir::Attribute originalValue = value;
7772 visitor("tile_id", value);
7773 if (value != originalValue)
7774 setInherentAttr(prop, name: "tile_id", value);
7775 }
7776}
7777
7778::llvm::LogicalResult aarch64_sme_st1d_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7779 {
7780 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
7781 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
7782 return ::mlir::failure();
7783 }
7784 return ::mlir::success();
7785}
7786
7787::llvm::LogicalResult aarch64_sme_st1d_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
7788 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
7789 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
7790 return ::mlir::failure();
7791 return ::mlir::success();
7792}
7793
7794void aarch64_sme_st1d_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
7795 auto &prop = getProperties(); (void)prop;
7796 writer.writeAttribute(attr: prop.tile_id);
7797}
7798
7799uint32_t aarch64_sme_st1d_horiz::getTileId() {
7800 auto attr = getTileIdAttr();
7801 return attr.getValue().getZExtValue();
7802}
7803
7804void aarch64_sme_st1d_horiz::setTileId(uint32_t attrValue) {
7805 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
7806}
7807
7808void aarch64_sme_st1d_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7809 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
7810}
7811
7812aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7813 ::mlir::OperationState __state__(location, getOperationName());
7814 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7815 auto __res__ = builder.create(state: __state__);
7816 assert((::llvm::isa<aarch64_sme_st1d_horiz>(__res__)) && "builder didn't return the right type");
7817 return ::llvm::cast<aarch64_sme_st1d_horiz>(Val: __res__);
7818}
7819
7820aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7821 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7822}
7823
7824void aarch64_sme_st1d_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7825 auto &odsProperties = odsState.getOrAddProperties<Properties>();
7826 odsState.addOperands(newOperands: predicate);
7827 odsState.addOperands(newOperands: store_address);
7828 odsState.addOperands(newOperands: tile_slice_index);
7829 odsProperties.tile_id = tile_id;
7830 assert(resultTypes.size() == 0u && "mismatched number of results");
7831 odsState.addTypes(newTypes&: resultTypes);
7832}
7833
7834aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7835 ::mlir::OperationState __state__(location, getOperationName());
7836 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7837 auto __res__ = builder.create(state: __state__);
7838 assert((::llvm::isa<aarch64_sme_st1d_horiz>(__res__)) && "builder didn't return the right type");
7839 return ::llvm::cast<aarch64_sme_st1d_horiz>(Val: __res__);
7840}
7841
7842aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
7843 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7844}
7845
7846void aarch64_sme_st1d_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7847 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
7848}
7849
7850aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7851 ::mlir::OperationState __state__(location, getOperationName());
7852 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7853 auto __res__ = builder.create(state: __state__);
7854 assert((::llvm::isa<aarch64_sme_st1d_horiz>(__res__)) && "builder didn't return the right type");
7855 return ::llvm::cast<aarch64_sme_st1d_horiz>(Val: __res__);
7856}
7857
7858aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7859 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7860}
7861
7862void aarch64_sme_st1d_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7863 auto &odsProperties = odsState.getOrAddProperties<Properties>();
7864 odsState.addOperands(newOperands: predicate);
7865 odsState.addOperands(newOperands: store_address);
7866 odsState.addOperands(newOperands: tile_slice_index);
7867 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
7868 assert(resultTypes.size() == 0u && "mismatched number of results");
7869 odsState.addTypes(newTypes&: resultTypes);
7870}
7871
7872aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7873 ::mlir::OperationState __state__(location, getOperationName());
7874 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7875 auto __res__ = builder.create(state: __state__);
7876 assert((::llvm::isa<aarch64_sme_st1d_horiz>(__res__)) && "builder didn't return the right type");
7877 return ::llvm::cast<aarch64_sme_st1d_horiz>(Val: __res__);
7878}
7879
7880aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
7881 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
7882}
7883
7884void aarch64_sme_st1d_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7885 assert(operands.size() == 3u && "mismatched number of parameters");
7886 odsState.addOperands(newOperands: operands);
7887 buildPropertiesAndDiscardableAttributes(odsState, attributes);
7888 assert(resultTypes.size() == 0u && "mismatched number of return types");
7889 odsState.addTypes(newTypes&: resultTypes);
7890}
7891
7892aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7893LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
7894
7895 ::mlir::OperationState __state__(location, getOperationName());
7896 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7897 auto __res__ = builder.create(state: __state__);
7898 assert((::llvm::isa<aarch64_sme_st1d_horiz>(__res__)) && "builder didn't return the right type");
7899 return ::llvm::cast<aarch64_sme_st1d_horiz>(Val: __res__);
7900LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
7901}
7902
7903aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7904LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
7905
7906 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7907LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
7908}
7909
7910void aarch64_sme_st1d_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7911 assert(operands.size() == 3u && "mismatched number of parameters");
7912 odsState.addOperands(newOperands: operands);
7913 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
7914 odsState.addAttributes(newAttributes: discardableAttributes);
7915 assert(resultTypes.size() == 0u && "mismatched number of return types");
7916 odsState.addTypes(newTypes&: resultTypes);
7917}
7918
7919aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7920 ::mlir::OperationState __state__(location, getOperationName());
7921 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
7922 auto __res__ = builder.create(state: __state__);
7923 assert((::llvm::isa<aarch64_sme_st1d_horiz>(__res__)) && "builder didn't return the right type");
7924 return ::llvm::cast<aarch64_sme_st1d_horiz>(Val: __res__);
7925}
7926
7927aarch64_sme_st1d_horiz aarch64_sme_st1d_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7928 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
7929}
7930
7931::llvm::LogicalResult aarch64_sme_st1d_horiz::verifyInvariantsImpl() {
7932 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
7933 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
7934
7935 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
7936 return ::mlir::failure();
7937 {
7938 unsigned index = 0; (void)index;
7939 auto valueGroup0 = getODSOperands(index: 0);
7940
7941 for (auto v : valueGroup0) {
7942 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7943 return ::mlir::failure();
7944 }
7945 auto valueGroup1 = getODSOperands(index: 1);
7946
7947 for (auto v : valueGroup1) {
7948 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7949 return ::mlir::failure();
7950 }
7951 auto valueGroup2 = getODSOperands(index: 2);
7952
7953 for (auto v : valueGroup2) {
7954 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7955 return ::mlir::failure();
7956 }
7957 }
7958 return ::mlir::success();
7959}
7960
7961::llvm::LogicalResult aarch64_sme_st1d_horiz::verifyInvariants() {
7962 return verifyInvariantsImpl();
7963}
7964
7965::llvm::LogicalResult aarch64_sme_st1d_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7966 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7967 if (!dict) {
7968 emitError() << "expected DictionaryAttr to set properties";
7969 return ::mlir::failure();
7970 }
7971 // keep track of used keys in the input dictionary to be able to error out
7972 // if there are some unknown ones.
7973 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
7974 ::mlir::MLIRContext *ctx = dict.getContext();
7975 (void)ctx;
7976 {
7977
7978 auto &propStorage = prop.tile_id;
7979 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
7980 auto attr = dict.get(name: tile_idAttrName);
7981 usedKeys.insert(V: tile_idAttrName);
7982 if (attr || /*isRequired=*/true) {
7983 if (!attr) {
7984 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
7985 "Properties.";
7986 return ::mlir::failure();
7987 }
7988 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
7989 if (convertedAttr) {
7990 propStorage = convertedAttr;
7991 } else {
7992 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
7993 return ::mlir::failure();
7994 }
7995 }
7996 }
7997
7998 for (::mlir::NamedAttribute attr : dict) {
7999 if (!usedKeys.contains(V: attr.getName()))
8000 return emitError() << "unknown key '" << attr.getName() <<
8001 "' when parsing properties dictionary";
8002 }
8003 return ::mlir::success();
8004}
8005
8006void aarch64_sme_st1d_horiz::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8007 {
8008 auto valueRange = getODSOperandIndexAndLength(index: 1);
8009 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
8010 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
8011 }
8012 }
8013}
8014
8015void aarch64_sme_st1d_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8016 Properties &properties = odsState.getOrAddProperties<Properties>();
8017 populateDefaultProperties(opName: odsState.name, properties);
8018 const ::llvm::StringRef inherentNames[] = {"tile_id"};
8019 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
8020 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
8021 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
8022 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
8023 });
8024}
8025
8026
8027} // namespace mlir::arm_sme
8028MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1d_horiz)
8029MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1d_horizGenericAdaptorBase::Properties)
8030
8031namespace mlir::arm_sme {
8032
8033
8034//===----------------------------------------------------------------------===//
8035// ::mlir::arm_sme::aarch64_sme_st1d_vert definitions
8036//===----------------------------------------------------------------------===//
8037
8038namespace detail {
8039
8040aarch64_sme_st1d_vertGenericAdaptorBase::aarch64_sme_st1d_vertGenericAdaptorBase(aarch64_sme_st1d_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
8041
8042uint32_t aarch64_sme_st1d_vertGenericAdaptorBase::getTileId() {
8043 auto attr = getTileIdAttr();
8044 return attr.getValue().getZExtValue();
8045}
8046
8047
8048} // namespace detail
8049aarch64_sme_st1d_vertAdaptor::aarch64_sme_st1d_vertAdaptor(aarch64_sme_st1d_vert op) : aarch64_sme_st1d_vertGenericAdaptor(op->getOperands(), op) {}
8050
8051::llvm::LogicalResult aarch64_sme_st1d_vertAdaptor::verify(::mlir::Location loc) {
8052 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
8053 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1d.vert' op requires attribute 'tile_id'");
8054
8055 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
8056 return emitError(loc, message: "'arm_sme.intr.st1d.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
8057 return ::mlir::success();
8058}
8059
8060::llvm::LogicalResult aarch64_sme_st1d_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8061 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
8062 if (!dict) {
8063 emitError() << "expected DictionaryAttr to set properties";
8064 return ::mlir::failure();
8065 }
8066
8067 {
8068 auto attr = dict.get(name: "tile_id");
8069 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
8070 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
8071 return ::mlir::failure();
8072 }
8073 return ::mlir::success();
8074}
8075
8076::mlir::Attribute aarch64_sme_st1d_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
8077 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
8078 ::mlir::Builder odsBuilder{ctx};
8079 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
8080
8081 if (!attrs.empty())
8082 return odsBuilder.getDictionaryAttr(value: attrs);
8083 return {};
8084}
8085
8086llvm::hash_code aarch64_sme_st1d_vert::computePropertiesHash(const Properties &prop) {
8087 using llvm::hash_value;
8088 return llvm::hash_combine(
8089 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
8090}
8091
8092std::optional<mlir::Attribute> aarch64_sme_st1d_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
8093 if (name == "tile_id")
8094 return prop.tile_id;
8095 return std::nullopt;
8096}
8097
8098void aarch64_sme_st1d_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
8099 if (name == "tile_id") {
8100 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
8101 return;
8102 }
8103}
8104
8105void aarch64_sme_st1d_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
8106 if (prop.tile_id) {
8107 ::mlir::Attribute value = prop.tile_id;
8108 ::mlir::Attribute originalValue = value;
8109 visitor("tile_id", value);
8110 if (value != originalValue)
8111 setInherentAttr(prop, name: "tile_id", value);
8112 }
8113}
8114
8115::llvm::LogicalResult aarch64_sme_st1d_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8116 {
8117 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
8118 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
8119 return ::mlir::failure();
8120 }
8121 return ::mlir::success();
8122}
8123
8124::llvm::LogicalResult aarch64_sme_st1d_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
8125 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
8126 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
8127 return ::mlir::failure();
8128 return ::mlir::success();
8129}
8130
8131void aarch64_sme_st1d_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
8132 auto &prop = getProperties(); (void)prop;
8133 writer.writeAttribute(attr: prop.tile_id);
8134}
8135
8136uint32_t aarch64_sme_st1d_vert::getTileId() {
8137 auto attr = getTileIdAttr();
8138 return attr.getValue().getZExtValue();
8139}
8140
8141void aarch64_sme_st1d_vert::setTileId(uint32_t attrValue) {
8142 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
8143}
8144
8145void aarch64_sme_st1d_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8146 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
8147}
8148
8149aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8150 ::mlir::OperationState __state__(location, getOperationName());
8151 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8152 auto __res__ = builder.create(state: __state__);
8153 assert((::llvm::isa<aarch64_sme_st1d_vert>(__res__)) && "builder didn't return the right type");
8154 return ::llvm::cast<aarch64_sme_st1d_vert>(Val: __res__);
8155}
8156
8157aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8158 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8159}
8160
8161void aarch64_sme_st1d_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8162 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8163 odsState.addOperands(newOperands: predicate);
8164 odsState.addOperands(newOperands: store_address);
8165 odsState.addOperands(newOperands: tile_slice_index);
8166 odsProperties.tile_id = tile_id;
8167 assert(resultTypes.size() == 0u && "mismatched number of results");
8168 odsState.addTypes(newTypes&: resultTypes);
8169}
8170
8171aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8172 ::mlir::OperationState __state__(location, getOperationName());
8173 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8174 auto __res__ = builder.create(state: __state__);
8175 assert((::llvm::isa<aarch64_sme_st1d_vert>(__res__)) && "builder didn't return the right type");
8176 return ::llvm::cast<aarch64_sme_st1d_vert>(Val: __res__);
8177}
8178
8179aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8180 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8181}
8182
8183void aarch64_sme_st1d_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8184 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
8185}
8186
8187aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8188 ::mlir::OperationState __state__(location, getOperationName());
8189 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8190 auto __res__ = builder.create(state: __state__);
8191 assert((::llvm::isa<aarch64_sme_st1d_vert>(__res__)) && "builder didn't return the right type");
8192 return ::llvm::cast<aarch64_sme_st1d_vert>(Val: __res__);
8193}
8194
8195aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8196 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8197}
8198
8199void aarch64_sme_st1d_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8200 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8201 odsState.addOperands(newOperands: predicate);
8202 odsState.addOperands(newOperands: store_address);
8203 odsState.addOperands(newOperands: tile_slice_index);
8204 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
8205 assert(resultTypes.size() == 0u && "mismatched number of results");
8206 odsState.addTypes(newTypes&: resultTypes);
8207}
8208
8209aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8210 ::mlir::OperationState __state__(location, getOperationName());
8211 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8212 auto __res__ = builder.create(state: __state__);
8213 assert((::llvm::isa<aarch64_sme_st1d_vert>(__res__)) && "builder didn't return the right type");
8214 return ::llvm::cast<aarch64_sme_st1d_vert>(Val: __res__);
8215}
8216
8217aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8218 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8219}
8220
8221void aarch64_sme_st1d_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8222 assert(operands.size() == 3u && "mismatched number of parameters");
8223 odsState.addOperands(newOperands: operands);
8224 buildPropertiesAndDiscardableAttributes(odsState, attributes);
8225 assert(resultTypes.size() == 0u && "mismatched number of return types");
8226 odsState.addTypes(newTypes&: resultTypes);
8227}
8228
8229aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8230LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8231
8232 ::mlir::OperationState __state__(location, getOperationName());
8233 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
8234 auto __res__ = builder.create(state: __state__);
8235 assert((::llvm::isa<aarch64_sme_st1d_vert>(__res__)) && "builder didn't return the right type");
8236 return ::llvm::cast<aarch64_sme_st1d_vert>(Val: __res__);
8237LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8238}
8239
8240aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8241LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8242
8243 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
8244LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8245}
8246
8247void aarch64_sme_st1d_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8248 assert(operands.size() == 3u && "mismatched number of parameters");
8249 odsState.addOperands(newOperands: operands);
8250 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
8251 odsState.addAttributes(newAttributes: discardableAttributes);
8252 assert(resultTypes.size() == 0u && "mismatched number of return types");
8253 odsState.addTypes(newTypes&: resultTypes);
8254}
8255
8256aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8257 ::mlir::OperationState __state__(location, getOperationName());
8258 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
8259 auto __res__ = builder.create(state: __state__);
8260 assert((::llvm::isa<aarch64_sme_st1d_vert>(__res__)) && "builder didn't return the right type");
8261 return ::llvm::cast<aarch64_sme_st1d_vert>(Val: __res__);
8262}
8263
8264aarch64_sme_st1d_vert aarch64_sme_st1d_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8265 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
8266}
8267
8268::llvm::LogicalResult aarch64_sme_st1d_vert::verifyInvariantsImpl() {
8269 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
8270 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
8271
8272 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
8273 return ::mlir::failure();
8274 {
8275 unsigned index = 0; (void)index;
8276 auto valueGroup0 = getODSOperands(index: 0);
8277
8278 for (auto v : valueGroup0) {
8279 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8280 return ::mlir::failure();
8281 }
8282 auto valueGroup1 = getODSOperands(index: 1);
8283
8284 for (auto v : valueGroup1) {
8285 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8286 return ::mlir::failure();
8287 }
8288 auto valueGroup2 = getODSOperands(index: 2);
8289
8290 for (auto v : valueGroup2) {
8291 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8292 return ::mlir::failure();
8293 }
8294 }
8295 return ::mlir::success();
8296}
8297
8298::llvm::LogicalResult aarch64_sme_st1d_vert::verifyInvariants() {
8299 return verifyInvariantsImpl();
8300}
8301
8302::llvm::LogicalResult aarch64_sme_st1d_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8303 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
8304 if (!dict) {
8305 emitError() << "expected DictionaryAttr to set properties";
8306 return ::mlir::failure();
8307 }
8308 // keep track of used keys in the input dictionary to be able to error out
8309 // if there are some unknown ones.
8310 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
8311 ::mlir::MLIRContext *ctx = dict.getContext();
8312 (void)ctx;
8313 {
8314
8315 auto &propStorage = prop.tile_id;
8316 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
8317 auto attr = dict.get(name: tile_idAttrName);
8318 usedKeys.insert(V: tile_idAttrName);
8319 if (attr || /*isRequired=*/true) {
8320 if (!attr) {
8321 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
8322 "Properties.";
8323 return ::mlir::failure();
8324 }
8325 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
8326 if (convertedAttr) {
8327 propStorage = convertedAttr;
8328 } else {
8329 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
8330 return ::mlir::failure();
8331 }
8332 }
8333 }
8334
8335 for (::mlir::NamedAttribute attr : dict) {
8336 if (!usedKeys.contains(V: attr.getName()))
8337 return emitError() << "unknown key '" << attr.getName() <<
8338 "' when parsing properties dictionary";
8339 }
8340 return ::mlir::success();
8341}
8342
8343void aarch64_sme_st1d_vert::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8344 {
8345 auto valueRange = getODSOperandIndexAndLength(index: 1);
8346 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
8347 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
8348 }
8349 }
8350}
8351
8352void aarch64_sme_st1d_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8353 Properties &properties = odsState.getOrAddProperties<Properties>();
8354 populateDefaultProperties(opName: odsState.name, properties);
8355 const ::llvm::StringRef inherentNames[] = {"tile_id"};
8356 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
8357 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
8358 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
8359 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
8360 });
8361}
8362
8363
8364} // namespace mlir::arm_sme
8365MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1d_vert)
8366MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1d_vertGenericAdaptorBase::Properties)
8367
8368namespace mlir::arm_sme {
8369
8370
8371//===----------------------------------------------------------------------===//
8372// ::mlir::arm_sme::aarch64_sme_st1h_horiz definitions
8373//===----------------------------------------------------------------------===//
8374
8375namespace detail {
8376
8377aarch64_sme_st1h_horizGenericAdaptorBase::aarch64_sme_st1h_horizGenericAdaptorBase(aarch64_sme_st1h_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
8378
8379uint32_t aarch64_sme_st1h_horizGenericAdaptorBase::getTileId() {
8380 auto attr = getTileIdAttr();
8381 return attr.getValue().getZExtValue();
8382}
8383
8384
8385} // namespace detail
8386aarch64_sme_st1h_horizAdaptor::aarch64_sme_st1h_horizAdaptor(aarch64_sme_st1h_horiz op) : aarch64_sme_st1h_horizGenericAdaptor(op->getOperands(), op) {}
8387
8388::llvm::LogicalResult aarch64_sme_st1h_horizAdaptor::verify(::mlir::Location loc) {
8389 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
8390 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1h.horiz' op requires attribute 'tile_id'");
8391
8392 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
8393 return emitError(loc, message: "'arm_sme.intr.st1h.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
8394 return ::mlir::success();
8395}
8396
8397::llvm::LogicalResult aarch64_sme_st1h_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8398 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
8399 if (!dict) {
8400 emitError() << "expected DictionaryAttr to set properties";
8401 return ::mlir::failure();
8402 }
8403
8404 {
8405 auto attr = dict.get(name: "tile_id");
8406 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
8407 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
8408 return ::mlir::failure();
8409 }
8410 return ::mlir::success();
8411}
8412
8413::mlir::Attribute aarch64_sme_st1h_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
8414 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
8415 ::mlir::Builder odsBuilder{ctx};
8416 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
8417
8418 if (!attrs.empty())
8419 return odsBuilder.getDictionaryAttr(value: attrs);
8420 return {};
8421}
8422
8423llvm::hash_code aarch64_sme_st1h_horiz::computePropertiesHash(const Properties &prop) {
8424 using llvm::hash_value;
8425 return llvm::hash_combine(
8426 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
8427}
8428
8429std::optional<mlir::Attribute> aarch64_sme_st1h_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
8430 if (name == "tile_id")
8431 return prop.tile_id;
8432 return std::nullopt;
8433}
8434
8435void aarch64_sme_st1h_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
8436 if (name == "tile_id") {
8437 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
8438 return;
8439 }
8440}
8441
8442void aarch64_sme_st1h_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
8443 if (prop.tile_id) {
8444 ::mlir::Attribute value = prop.tile_id;
8445 ::mlir::Attribute originalValue = value;
8446 visitor("tile_id", value);
8447 if (value != originalValue)
8448 setInherentAttr(prop, name: "tile_id", value);
8449 }
8450}
8451
8452::llvm::LogicalResult aarch64_sme_st1h_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8453 {
8454 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
8455 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
8456 return ::mlir::failure();
8457 }
8458 return ::mlir::success();
8459}
8460
8461::llvm::LogicalResult aarch64_sme_st1h_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
8462 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
8463 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
8464 return ::mlir::failure();
8465 return ::mlir::success();
8466}
8467
8468void aarch64_sme_st1h_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
8469 auto &prop = getProperties(); (void)prop;
8470 writer.writeAttribute(attr: prop.tile_id);
8471}
8472
8473uint32_t aarch64_sme_st1h_horiz::getTileId() {
8474 auto attr = getTileIdAttr();
8475 return attr.getValue().getZExtValue();
8476}
8477
8478void aarch64_sme_st1h_horiz::setTileId(uint32_t attrValue) {
8479 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
8480}
8481
8482void aarch64_sme_st1h_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8483 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
8484}
8485
8486aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8487 ::mlir::OperationState __state__(location, getOperationName());
8488 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8489 auto __res__ = builder.create(state: __state__);
8490 assert((::llvm::isa<aarch64_sme_st1h_horiz>(__res__)) && "builder didn't return the right type");
8491 return ::llvm::cast<aarch64_sme_st1h_horiz>(Val: __res__);
8492}
8493
8494aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8495 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8496}
8497
8498void aarch64_sme_st1h_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8499 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8500 odsState.addOperands(newOperands: predicate);
8501 odsState.addOperands(newOperands: store_address);
8502 odsState.addOperands(newOperands: tile_slice_index);
8503 odsProperties.tile_id = tile_id;
8504 assert(resultTypes.size() == 0u && "mismatched number of results");
8505 odsState.addTypes(newTypes&: resultTypes);
8506}
8507
8508aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8509 ::mlir::OperationState __state__(location, getOperationName());
8510 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8511 auto __res__ = builder.create(state: __state__);
8512 assert((::llvm::isa<aarch64_sme_st1h_horiz>(__res__)) && "builder didn't return the right type");
8513 return ::llvm::cast<aarch64_sme_st1h_horiz>(Val: __res__);
8514}
8515
8516aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8517 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8518}
8519
8520void aarch64_sme_st1h_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8521 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
8522}
8523
8524aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8525 ::mlir::OperationState __state__(location, getOperationName());
8526 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8527 auto __res__ = builder.create(state: __state__);
8528 assert((::llvm::isa<aarch64_sme_st1h_horiz>(__res__)) && "builder didn't return the right type");
8529 return ::llvm::cast<aarch64_sme_st1h_horiz>(Val: __res__);
8530}
8531
8532aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8533 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8534}
8535
8536void aarch64_sme_st1h_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8537 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8538 odsState.addOperands(newOperands: predicate);
8539 odsState.addOperands(newOperands: store_address);
8540 odsState.addOperands(newOperands: tile_slice_index);
8541 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
8542 assert(resultTypes.size() == 0u && "mismatched number of results");
8543 odsState.addTypes(newTypes&: resultTypes);
8544}
8545
8546aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8547 ::mlir::OperationState __state__(location, getOperationName());
8548 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8549 auto __res__ = builder.create(state: __state__);
8550 assert((::llvm::isa<aarch64_sme_st1h_horiz>(__res__)) && "builder didn't return the right type");
8551 return ::llvm::cast<aarch64_sme_st1h_horiz>(Val: __res__);
8552}
8553
8554aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8555 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8556}
8557
8558void aarch64_sme_st1h_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8559 assert(operands.size() == 3u && "mismatched number of parameters");
8560 odsState.addOperands(newOperands: operands);
8561 buildPropertiesAndDiscardableAttributes(odsState, attributes);
8562 assert(resultTypes.size() == 0u && "mismatched number of return types");
8563 odsState.addTypes(newTypes&: resultTypes);
8564}
8565
8566aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8567LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8568
8569 ::mlir::OperationState __state__(location, getOperationName());
8570 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
8571 auto __res__ = builder.create(state: __state__);
8572 assert((::llvm::isa<aarch64_sme_st1h_horiz>(__res__)) && "builder didn't return the right type");
8573 return ::llvm::cast<aarch64_sme_st1h_horiz>(Val: __res__);
8574LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8575}
8576
8577aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8578LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8579
8580 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
8581LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8582}
8583
8584void aarch64_sme_st1h_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8585 assert(operands.size() == 3u && "mismatched number of parameters");
8586 odsState.addOperands(newOperands: operands);
8587 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
8588 odsState.addAttributes(newAttributes: discardableAttributes);
8589 assert(resultTypes.size() == 0u && "mismatched number of return types");
8590 odsState.addTypes(newTypes&: resultTypes);
8591}
8592
8593aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8594 ::mlir::OperationState __state__(location, getOperationName());
8595 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
8596 auto __res__ = builder.create(state: __state__);
8597 assert((::llvm::isa<aarch64_sme_st1h_horiz>(__res__)) && "builder didn't return the right type");
8598 return ::llvm::cast<aarch64_sme_st1h_horiz>(Val: __res__);
8599}
8600
8601aarch64_sme_st1h_horiz aarch64_sme_st1h_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8602 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
8603}
8604
8605::llvm::LogicalResult aarch64_sme_st1h_horiz::verifyInvariantsImpl() {
8606 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
8607 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
8608
8609 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
8610 return ::mlir::failure();
8611 {
8612 unsigned index = 0; (void)index;
8613 auto valueGroup0 = getODSOperands(index: 0);
8614
8615 for (auto v : valueGroup0) {
8616 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8617 return ::mlir::failure();
8618 }
8619 auto valueGroup1 = getODSOperands(index: 1);
8620
8621 for (auto v : valueGroup1) {
8622 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8623 return ::mlir::failure();
8624 }
8625 auto valueGroup2 = getODSOperands(index: 2);
8626
8627 for (auto v : valueGroup2) {
8628 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8629 return ::mlir::failure();
8630 }
8631 }
8632 return ::mlir::success();
8633}
8634
8635::llvm::LogicalResult aarch64_sme_st1h_horiz::verifyInvariants() {
8636 return verifyInvariantsImpl();
8637}
8638
8639::llvm::LogicalResult aarch64_sme_st1h_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8640 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
8641 if (!dict) {
8642 emitError() << "expected DictionaryAttr to set properties";
8643 return ::mlir::failure();
8644 }
8645 // keep track of used keys in the input dictionary to be able to error out
8646 // if there are some unknown ones.
8647 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
8648 ::mlir::MLIRContext *ctx = dict.getContext();
8649 (void)ctx;
8650 {
8651
8652 auto &propStorage = prop.tile_id;
8653 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
8654 auto attr = dict.get(name: tile_idAttrName);
8655 usedKeys.insert(V: tile_idAttrName);
8656 if (attr || /*isRequired=*/true) {
8657 if (!attr) {
8658 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
8659 "Properties.";
8660 return ::mlir::failure();
8661 }
8662 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
8663 if (convertedAttr) {
8664 propStorage = convertedAttr;
8665 } else {
8666 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
8667 return ::mlir::failure();
8668 }
8669 }
8670 }
8671
8672 for (::mlir::NamedAttribute attr : dict) {
8673 if (!usedKeys.contains(V: attr.getName()))
8674 return emitError() << "unknown key '" << attr.getName() <<
8675 "' when parsing properties dictionary";
8676 }
8677 return ::mlir::success();
8678}
8679
8680void aarch64_sme_st1h_horiz::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8681 {
8682 auto valueRange = getODSOperandIndexAndLength(index: 1);
8683 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
8684 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
8685 }
8686 }
8687}
8688
8689void aarch64_sme_st1h_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8690 Properties &properties = odsState.getOrAddProperties<Properties>();
8691 populateDefaultProperties(opName: odsState.name, properties);
8692 const ::llvm::StringRef inherentNames[] = {"tile_id"};
8693 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
8694 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
8695 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
8696 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
8697 });
8698}
8699
8700
8701} // namespace mlir::arm_sme
8702MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1h_horiz)
8703MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1h_horizGenericAdaptorBase::Properties)
8704
8705namespace mlir::arm_sme {
8706
8707
8708//===----------------------------------------------------------------------===//
8709// ::mlir::arm_sme::aarch64_sme_st1h_vert definitions
8710//===----------------------------------------------------------------------===//
8711
8712namespace detail {
8713
8714aarch64_sme_st1h_vertGenericAdaptorBase::aarch64_sme_st1h_vertGenericAdaptorBase(aarch64_sme_st1h_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
8715
8716uint32_t aarch64_sme_st1h_vertGenericAdaptorBase::getTileId() {
8717 auto attr = getTileIdAttr();
8718 return attr.getValue().getZExtValue();
8719}
8720
8721
8722} // namespace detail
8723aarch64_sme_st1h_vertAdaptor::aarch64_sme_st1h_vertAdaptor(aarch64_sme_st1h_vert op) : aarch64_sme_st1h_vertGenericAdaptor(op->getOperands(), op) {}
8724
8725::llvm::LogicalResult aarch64_sme_st1h_vertAdaptor::verify(::mlir::Location loc) {
8726 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
8727 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1h.vert' op requires attribute 'tile_id'");
8728
8729 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
8730 return emitError(loc, message: "'arm_sme.intr.st1h.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
8731 return ::mlir::success();
8732}
8733
8734::llvm::LogicalResult aarch64_sme_st1h_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8735 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
8736 if (!dict) {
8737 emitError() << "expected DictionaryAttr to set properties";
8738 return ::mlir::failure();
8739 }
8740
8741 {
8742 auto attr = dict.get(name: "tile_id");
8743 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
8744 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
8745 return ::mlir::failure();
8746 }
8747 return ::mlir::success();
8748}
8749
8750::mlir::Attribute aarch64_sme_st1h_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
8751 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
8752 ::mlir::Builder odsBuilder{ctx};
8753 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
8754
8755 if (!attrs.empty())
8756 return odsBuilder.getDictionaryAttr(value: attrs);
8757 return {};
8758}
8759
8760llvm::hash_code aarch64_sme_st1h_vert::computePropertiesHash(const Properties &prop) {
8761 using llvm::hash_value;
8762 return llvm::hash_combine(
8763 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
8764}
8765
8766std::optional<mlir::Attribute> aarch64_sme_st1h_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
8767 if (name == "tile_id")
8768 return prop.tile_id;
8769 return std::nullopt;
8770}
8771
8772void aarch64_sme_st1h_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
8773 if (name == "tile_id") {
8774 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
8775 return;
8776 }
8777}
8778
8779void aarch64_sme_st1h_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
8780 if (prop.tile_id) {
8781 ::mlir::Attribute value = prop.tile_id;
8782 ::mlir::Attribute originalValue = value;
8783 visitor("tile_id", value);
8784 if (value != originalValue)
8785 setInherentAttr(prop, name: "tile_id", value);
8786 }
8787}
8788
8789::llvm::LogicalResult aarch64_sme_st1h_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8790 {
8791 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
8792 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
8793 return ::mlir::failure();
8794 }
8795 return ::mlir::success();
8796}
8797
8798::llvm::LogicalResult aarch64_sme_st1h_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
8799 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
8800 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
8801 return ::mlir::failure();
8802 return ::mlir::success();
8803}
8804
8805void aarch64_sme_st1h_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
8806 auto &prop = getProperties(); (void)prop;
8807 writer.writeAttribute(attr: prop.tile_id);
8808}
8809
8810uint32_t aarch64_sme_st1h_vert::getTileId() {
8811 auto attr = getTileIdAttr();
8812 return attr.getValue().getZExtValue();
8813}
8814
8815void aarch64_sme_st1h_vert::setTileId(uint32_t attrValue) {
8816 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
8817}
8818
8819void aarch64_sme_st1h_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8820 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
8821}
8822
8823aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8824 ::mlir::OperationState __state__(location, getOperationName());
8825 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8826 auto __res__ = builder.create(state: __state__);
8827 assert((::llvm::isa<aarch64_sme_st1h_vert>(__res__)) && "builder didn't return the right type");
8828 return ::llvm::cast<aarch64_sme_st1h_vert>(Val: __res__);
8829}
8830
8831aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8832 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8833}
8834
8835void aarch64_sme_st1h_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8836 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8837 odsState.addOperands(newOperands: predicate);
8838 odsState.addOperands(newOperands: store_address);
8839 odsState.addOperands(newOperands: tile_slice_index);
8840 odsProperties.tile_id = tile_id;
8841 assert(resultTypes.size() == 0u && "mismatched number of results");
8842 odsState.addTypes(newTypes&: resultTypes);
8843}
8844
8845aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8846 ::mlir::OperationState __state__(location, getOperationName());
8847 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8848 auto __res__ = builder.create(state: __state__);
8849 assert((::llvm::isa<aarch64_sme_st1h_vert>(__res__)) && "builder didn't return the right type");
8850 return ::llvm::cast<aarch64_sme_st1h_vert>(Val: __res__);
8851}
8852
8853aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
8854 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8855}
8856
8857void aarch64_sme_st1h_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8858 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
8859}
8860
8861aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8862 ::mlir::OperationState __state__(location, getOperationName());
8863 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8864 auto __res__ = builder.create(state: __state__);
8865 assert((::llvm::isa<aarch64_sme_st1h_vert>(__res__)) && "builder didn't return the right type");
8866 return ::llvm::cast<aarch64_sme_st1h_vert>(Val: __res__);
8867}
8868
8869aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8870 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8871}
8872
8873void aarch64_sme_st1h_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8874 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8875 odsState.addOperands(newOperands: predicate);
8876 odsState.addOperands(newOperands: store_address);
8877 odsState.addOperands(newOperands: tile_slice_index);
8878 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
8879 assert(resultTypes.size() == 0u && "mismatched number of results");
8880 odsState.addTypes(newTypes&: resultTypes);
8881}
8882
8883aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8884 ::mlir::OperationState __state__(location, getOperationName());
8885 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8886 auto __res__ = builder.create(state: __state__);
8887 assert((::llvm::isa<aarch64_sme_st1h_vert>(__res__)) && "builder didn't return the right type");
8888 return ::llvm::cast<aarch64_sme_st1h_vert>(Val: __res__);
8889}
8890
8891aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
8892 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
8893}
8894
8895void aarch64_sme_st1h_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8896 assert(operands.size() == 3u && "mismatched number of parameters");
8897 odsState.addOperands(newOperands: operands);
8898 buildPropertiesAndDiscardableAttributes(odsState, attributes);
8899 assert(resultTypes.size() == 0u && "mismatched number of return types");
8900 odsState.addTypes(newTypes&: resultTypes);
8901}
8902
8903aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8904LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8905
8906 ::mlir::OperationState __state__(location, getOperationName());
8907 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
8908 auto __res__ = builder.create(state: __state__);
8909 assert((::llvm::isa<aarch64_sme_st1h_vert>(__res__)) && "builder didn't return the right type");
8910 return ::llvm::cast<aarch64_sme_st1h_vert>(Val: __res__);
8911LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8912}
8913
8914aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8915LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8916
8917 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
8918LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8919}
8920
8921void aarch64_sme_st1h_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8922 assert(operands.size() == 3u && "mismatched number of parameters");
8923 odsState.addOperands(newOperands: operands);
8924 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
8925 odsState.addAttributes(newAttributes: discardableAttributes);
8926 assert(resultTypes.size() == 0u && "mismatched number of return types");
8927 odsState.addTypes(newTypes&: resultTypes);
8928}
8929
8930aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8931 ::mlir::OperationState __state__(location, getOperationName());
8932 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
8933 auto __res__ = builder.create(state: __state__);
8934 assert((::llvm::isa<aarch64_sme_st1h_vert>(__res__)) && "builder didn't return the right type");
8935 return ::llvm::cast<aarch64_sme_st1h_vert>(Val: __res__);
8936}
8937
8938aarch64_sme_st1h_vert aarch64_sme_st1h_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8939 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
8940}
8941
8942::llvm::LogicalResult aarch64_sme_st1h_vert::verifyInvariantsImpl() {
8943 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
8944 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
8945
8946 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
8947 return ::mlir::failure();
8948 {
8949 unsigned index = 0; (void)index;
8950 auto valueGroup0 = getODSOperands(index: 0);
8951
8952 for (auto v : valueGroup0) {
8953 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8954 return ::mlir::failure();
8955 }
8956 auto valueGroup1 = getODSOperands(index: 1);
8957
8958 for (auto v : valueGroup1) {
8959 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8960 return ::mlir::failure();
8961 }
8962 auto valueGroup2 = getODSOperands(index: 2);
8963
8964 for (auto v : valueGroup2) {
8965 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8966 return ::mlir::failure();
8967 }
8968 }
8969 return ::mlir::success();
8970}
8971
8972::llvm::LogicalResult aarch64_sme_st1h_vert::verifyInvariants() {
8973 return verifyInvariantsImpl();
8974}
8975
8976::llvm::LogicalResult aarch64_sme_st1h_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8977 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
8978 if (!dict) {
8979 emitError() << "expected DictionaryAttr to set properties";
8980 return ::mlir::failure();
8981 }
8982 // keep track of used keys in the input dictionary to be able to error out
8983 // if there are some unknown ones.
8984 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
8985 ::mlir::MLIRContext *ctx = dict.getContext();
8986 (void)ctx;
8987 {
8988
8989 auto &propStorage = prop.tile_id;
8990 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
8991 auto attr = dict.get(name: tile_idAttrName);
8992 usedKeys.insert(V: tile_idAttrName);
8993 if (attr || /*isRequired=*/true) {
8994 if (!attr) {
8995 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
8996 "Properties.";
8997 return ::mlir::failure();
8998 }
8999 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
9000 if (convertedAttr) {
9001 propStorage = convertedAttr;
9002 } else {
9003 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
9004 return ::mlir::failure();
9005 }
9006 }
9007 }
9008
9009 for (::mlir::NamedAttribute attr : dict) {
9010 if (!usedKeys.contains(V: attr.getName()))
9011 return emitError() << "unknown key '" << attr.getName() <<
9012 "' when parsing properties dictionary";
9013 }
9014 return ::mlir::success();
9015}
9016
9017void aarch64_sme_st1h_vert::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9018 {
9019 auto valueRange = getODSOperandIndexAndLength(index: 1);
9020 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
9021 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
9022 }
9023 }
9024}
9025
9026void aarch64_sme_st1h_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9027 Properties &properties = odsState.getOrAddProperties<Properties>();
9028 populateDefaultProperties(opName: odsState.name, properties);
9029 const ::llvm::StringRef inherentNames[] = {"tile_id"};
9030 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
9031 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
9032 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
9033 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
9034 });
9035}
9036
9037
9038} // namespace mlir::arm_sme
9039MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1h_vert)
9040MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1h_vertGenericAdaptorBase::Properties)
9041
9042namespace mlir::arm_sme {
9043
9044
9045//===----------------------------------------------------------------------===//
9046// ::mlir::arm_sme::aarch64_sme_st1q_horiz definitions
9047//===----------------------------------------------------------------------===//
9048
9049namespace detail {
9050
9051aarch64_sme_st1q_horizGenericAdaptorBase::aarch64_sme_st1q_horizGenericAdaptorBase(aarch64_sme_st1q_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9052
9053uint32_t aarch64_sme_st1q_horizGenericAdaptorBase::getTileId() {
9054 auto attr = getTileIdAttr();
9055 return attr.getValue().getZExtValue();
9056}
9057
9058
9059} // namespace detail
9060aarch64_sme_st1q_horizAdaptor::aarch64_sme_st1q_horizAdaptor(aarch64_sme_st1q_horiz op) : aarch64_sme_st1q_horizGenericAdaptor(op->getOperands(), op) {}
9061
9062::llvm::LogicalResult aarch64_sme_st1q_horizAdaptor::verify(::mlir::Location loc) {
9063 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
9064 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1q.horiz' op requires attribute 'tile_id'");
9065
9066 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
9067 return emitError(loc, message: "'arm_sme.intr.st1q.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
9068 return ::mlir::success();
9069}
9070
9071::llvm::LogicalResult aarch64_sme_st1q_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9072 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9073 if (!dict) {
9074 emitError() << "expected DictionaryAttr to set properties";
9075 return ::mlir::failure();
9076 }
9077
9078 {
9079 auto attr = dict.get(name: "tile_id");
9080 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
9081 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
9082 return ::mlir::failure();
9083 }
9084 return ::mlir::success();
9085}
9086
9087::mlir::Attribute aarch64_sme_st1q_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9088 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9089 ::mlir::Builder odsBuilder{ctx};
9090 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
9091
9092 if (!attrs.empty())
9093 return odsBuilder.getDictionaryAttr(value: attrs);
9094 return {};
9095}
9096
9097llvm::hash_code aarch64_sme_st1q_horiz::computePropertiesHash(const Properties &prop) {
9098 using llvm::hash_value;
9099 return llvm::hash_combine(
9100 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
9101}
9102
9103std::optional<mlir::Attribute> aarch64_sme_st1q_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9104 if (name == "tile_id")
9105 return prop.tile_id;
9106 return std::nullopt;
9107}
9108
9109void aarch64_sme_st1q_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9110 if (name == "tile_id") {
9111 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
9112 return;
9113 }
9114}
9115
9116void aarch64_sme_st1q_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
9117 if (prop.tile_id) {
9118 ::mlir::Attribute value = prop.tile_id;
9119 ::mlir::Attribute originalValue = value;
9120 visitor("tile_id", value);
9121 if (value != originalValue)
9122 setInherentAttr(prop, name: "tile_id", value);
9123 }
9124}
9125
9126::llvm::LogicalResult aarch64_sme_st1q_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9127 {
9128 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
9129 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
9130 return ::mlir::failure();
9131 }
9132 return ::mlir::success();
9133}
9134
9135::llvm::LogicalResult aarch64_sme_st1q_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9136 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9137 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
9138 return ::mlir::failure();
9139 return ::mlir::success();
9140}
9141
9142void aarch64_sme_st1q_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9143 auto &prop = getProperties(); (void)prop;
9144 writer.writeAttribute(attr: prop.tile_id);
9145}
9146
9147uint32_t aarch64_sme_st1q_horiz::getTileId() {
9148 auto attr = getTileIdAttr();
9149 return attr.getValue().getZExtValue();
9150}
9151
9152void aarch64_sme_st1q_horiz::setTileId(uint32_t attrValue) {
9153 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
9154}
9155
9156void aarch64_sme_st1q_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9157 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
9158}
9159
9160aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9161 ::mlir::OperationState __state__(location, getOperationName());
9162 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9163 auto __res__ = builder.create(state: __state__);
9164 assert((::llvm::isa<aarch64_sme_st1q_horiz>(__res__)) && "builder didn't return the right type");
9165 return ::llvm::cast<aarch64_sme_st1q_horiz>(Val: __res__);
9166}
9167
9168aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9169 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9170}
9171
9172void aarch64_sme_st1q_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9173 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9174 odsState.addOperands(newOperands: predicate);
9175 odsState.addOperands(newOperands: store_address);
9176 odsState.addOperands(newOperands: tile_slice_index);
9177 odsProperties.tile_id = tile_id;
9178 assert(resultTypes.size() == 0u && "mismatched number of results");
9179 odsState.addTypes(newTypes&: resultTypes);
9180}
9181
9182aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9183 ::mlir::OperationState __state__(location, getOperationName());
9184 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9185 auto __res__ = builder.create(state: __state__);
9186 assert((::llvm::isa<aarch64_sme_st1q_horiz>(__res__)) && "builder didn't return the right type");
9187 return ::llvm::cast<aarch64_sme_st1q_horiz>(Val: __res__);
9188}
9189
9190aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9191 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9192}
9193
9194void aarch64_sme_st1q_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9195 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
9196}
9197
9198aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9199 ::mlir::OperationState __state__(location, getOperationName());
9200 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9201 auto __res__ = builder.create(state: __state__);
9202 assert((::llvm::isa<aarch64_sme_st1q_horiz>(__res__)) && "builder didn't return the right type");
9203 return ::llvm::cast<aarch64_sme_st1q_horiz>(Val: __res__);
9204}
9205
9206aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9207 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9208}
9209
9210void aarch64_sme_st1q_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9211 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9212 odsState.addOperands(newOperands: predicate);
9213 odsState.addOperands(newOperands: store_address);
9214 odsState.addOperands(newOperands: tile_slice_index);
9215 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
9216 assert(resultTypes.size() == 0u && "mismatched number of results");
9217 odsState.addTypes(newTypes&: resultTypes);
9218}
9219
9220aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9221 ::mlir::OperationState __state__(location, getOperationName());
9222 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9223 auto __res__ = builder.create(state: __state__);
9224 assert((::llvm::isa<aarch64_sme_st1q_horiz>(__res__)) && "builder didn't return the right type");
9225 return ::llvm::cast<aarch64_sme_st1q_horiz>(Val: __res__);
9226}
9227
9228aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9229 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9230}
9231
9232void aarch64_sme_st1q_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9233 assert(operands.size() == 3u && "mismatched number of parameters");
9234 odsState.addOperands(newOperands: operands);
9235 buildPropertiesAndDiscardableAttributes(odsState, attributes);
9236 assert(resultTypes.size() == 0u && "mismatched number of return types");
9237 odsState.addTypes(newTypes&: resultTypes);
9238}
9239
9240aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9241LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
9242
9243 ::mlir::OperationState __state__(location, getOperationName());
9244 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
9245 auto __res__ = builder.create(state: __state__);
9246 assert((::llvm::isa<aarch64_sme_st1q_horiz>(__res__)) && "builder didn't return the right type");
9247 return ::llvm::cast<aarch64_sme_st1q_horiz>(Val: __res__);
9248LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
9249}
9250
9251aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9252LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
9253
9254 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
9255LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
9256}
9257
9258void aarch64_sme_st1q_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9259 assert(operands.size() == 3u && "mismatched number of parameters");
9260 odsState.addOperands(newOperands: operands);
9261 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
9262 odsState.addAttributes(newAttributes: discardableAttributes);
9263 assert(resultTypes.size() == 0u && "mismatched number of return types");
9264 odsState.addTypes(newTypes&: resultTypes);
9265}
9266
9267aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9268 ::mlir::OperationState __state__(location, getOperationName());
9269 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
9270 auto __res__ = builder.create(state: __state__);
9271 assert((::llvm::isa<aarch64_sme_st1q_horiz>(__res__)) && "builder didn't return the right type");
9272 return ::llvm::cast<aarch64_sme_st1q_horiz>(Val: __res__);
9273}
9274
9275aarch64_sme_st1q_horiz aarch64_sme_st1q_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9276 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
9277}
9278
9279::llvm::LogicalResult aarch64_sme_st1q_horiz::verifyInvariantsImpl() {
9280 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
9281 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
9282
9283 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
9284 return ::mlir::failure();
9285 {
9286 unsigned index = 0; (void)index;
9287 auto valueGroup0 = getODSOperands(index: 0);
9288
9289 for (auto v : valueGroup0) {
9290 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9291 return ::mlir::failure();
9292 }
9293 auto valueGroup1 = getODSOperands(index: 1);
9294
9295 for (auto v : valueGroup1) {
9296 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9297 return ::mlir::failure();
9298 }
9299 auto valueGroup2 = getODSOperands(index: 2);
9300
9301 for (auto v : valueGroup2) {
9302 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9303 return ::mlir::failure();
9304 }
9305 }
9306 return ::mlir::success();
9307}
9308
9309::llvm::LogicalResult aarch64_sme_st1q_horiz::verifyInvariants() {
9310 return verifyInvariantsImpl();
9311}
9312
9313::llvm::LogicalResult aarch64_sme_st1q_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9314 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9315 if (!dict) {
9316 emitError() << "expected DictionaryAttr to set properties";
9317 return ::mlir::failure();
9318 }
9319 // keep track of used keys in the input dictionary to be able to error out
9320 // if there are some unknown ones.
9321 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
9322 ::mlir::MLIRContext *ctx = dict.getContext();
9323 (void)ctx;
9324 {
9325
9326 auto &propStorage = prop.tile_id;
9327 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
9328 auto attr = dict.get(name: tile_idAttrName);
9329 usedKeys.insert(V: tile_idAttrName);
9330 if (attr || /*isRequired=*/true) {
9331 if (!attr) {
9332 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
9333 "Properties.";
9334 return ::mlir::failure();
9335 }
9336 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
9337 if (convertedAttr) {
9338 propStorage = convertedAttr;
9339 } else {
9340 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
9341 return ::mlir::failure();
9342 }
9343 }
9344 }
9345
9346 for (::mlir::NamedAttribute attr : dict) {
9347 if (!usedKeys.contains(V: attr.getName()))
9348 return emitError() << "unknown key '" << attr.getName() <<
9349 "' when parsing properties dictionary";
9350 }
9351 return ::mlir::success();
9352}
9353
9354void aarch64_sme_st1q_horiz::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9355 {
9356 auto valueRange = getODSOperandIndexAndLength(index: 1);
9357 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
9358 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
9359 }
9360 }
9361}
9362
9363void aarch64_sme_st1q_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9364 Properties &properties = odsState.getOrAddProperties<Properties>();
9365 populateDefaultProperties(opName: odsState.name, properties);
9366 const ::llvm::StringRef inherentNames[] = {"tile_id"};
9367 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
9368 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
9369 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
9370 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
9371 });
9372}
9373
9374
9375} // namespace mlir::arm_sme
9376MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1q_horiz)
9377MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1q_horizGenericAdaptorBase::Properties)
9378
9379namespace mlir::arm_sme {
9380
9381
9382//===----------------------------------------------------------------------===//
9383// ::mlir::arm_sme::aarch64_sme_st1q_vert definitions
9384//===----------------------------------------------------------------------===//
9385
9386namespace detail {
9387
9388aarch64_sme_st1q_vertGenericAdaptorBase::aarch64_sme_st1q_vertGenericAdaptorBase(aarch64_sme_st1q_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9389
9390uint32_t aarch64_sme_st1q_vertGenericAdaptorBase::getTileId() {
9391 auto attr = getTileIdAttr();
9392 return attr.getValue().getZExtValue();
9393}
9394
9395
9396} // namespace detail
9397aarch64_sme_st1q_vertAdaptor::aarch64_sme_st1q_vertAdaptor(aarch64_sme_st1q_vert op) : aarch64_sme_st1q_vertGenericAdaptor(op->getOperands(), op) {}
9398
9399::llvm::LogicalResult aarch64_sme_st1q_vertAdaptor::verify(::mlir::Location loc) {
9400 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
9401 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1q.vert' op requires attribute 'tile_id'");
9402
9403 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
9404 return emitError(loc, message: "'arm_sme.intr.st1q.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
9405 return ::mlir::success();
9406}
9407
9408::llvm::LogicalResult aarch64_sme_st1q_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9409 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9410 if (!dict) {
9411 emitError() << "expected DictionaryAttr to set properties";
9412 return ::mlir::failure();
9413 }
9414
9415 {
9416 auto attr = dict.get(name: "tile_id");
9417 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
9418 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
9419 return ::mlir::failure();
9420 }
9421 return ::mlir::success();
9422}
9423
9424::mlir::Attribute aarch64_sme_st1q_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9425 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9426 ::mlir::Builder odsBuilder{ctx};
9427 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
9428
9429 if (!attrs.empty())
9430 return odsBuilder.getDictionaryAttr(value: attrs);
9431 return {};
9432}
9433
9434llvm::hash_code aarch64_sme_st1q_vert::computePropertiesHash(const Properties &prop) {
9435 using llvm::hash_value;
9436 return llvm::hash_combine(
9437 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
9438}
9439
9440std::optional<mlir::Attribute> aarch64_sme_st1q_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9441 if (name == "tile_id")
9442 return prop.tile_id;
9443 return std::nullopt;
9444}
9445
9446void aarch64_sme_st1q_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9447 if (name == "tile_id") {
9448 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
9449 return;
9450 }
9451}
9452
9453void aarch64_sme_st1q_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
9454 if (prop.tile_id) {
9455 ::mlir::Attribute value = prop.tile_id;
9456 ::mlir::Attribute originalValue = value;
9457 visitor("tile_id", value);
9458 if (value != originalValue)
9459 setInherentAttr(prop, name: "tile_id", value);
9460 }
9461}
9462
9463::llvm::LogicalResult aarch64_sme_st1q_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9464 {
9465 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
9466 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
9467 return ::mlir::failure();
9468 }
9469 return ::mlir::success();
9470}
9471
9472::llvm::LogicalResult aarch64_sme_st1q_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9473 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9474 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
9475 return ::mlir::failure();
9476 return ::mlir::success();
9477}
9478
9479void aarch64_sme_st1q_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9480 auto &prop = getProperties(); (void)prop;
9481 writer.writeAttribute(attr: prop.tile_id);
9482}
9483
9484uint32_t aarch64_sme_st1q_vert::getTileId() {
9485 auto attr = getTileIdAttr();
9486 return attr.getValue().getZExtValue();
9487}
9488
9489void aarch64_sme_st1q_vert::setTileId(uint32_t attrValue) {
9490 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
9491}
9492
9493void aarch64_sme_st1q_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9494 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
9495}
9496
9497aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9498 ::mlir::OperationState __state__(location, getOperationName());
9499 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9500 auto __res__ = builder.create(state: __state__);
9501 assert((::llvm::isa<aarch64_sme_st1q_vert>(__res__)) && "builder didn't return the right type");
9502 return ::llvm::cast<aarch64_sme_st1q_vert>(Val: __res__);
9503}
9504
9505aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9506 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9507}
9508
9509void aarch64_sme_st1q_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9510 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9511 odsState.addOperands(newOperands: predicate);
9512 odsState.addOperands(newOperands: store_address);
9513 odsState.addOperands(newOperands: tile_slice_index);
9514 odsProperties.tile_id = tile_id;
9515 assert(resultTypes.size() == 0u && "mismatched number of results");
9516 odsState.addTypes(newTypes&: resultTypes);
9517}
9518
9519aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9520 ::mlir::OperationState __state__(location, getOperationName());
9521 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9522 auto __res__ = builder.create(state: __state__);
9523 assert((::llvm::isa<aarch64_sme_st1q_vert>(__res__)) && "builder didn't return the right type");
9524 return ::llvm::cast<aarch64_sme_st1q_vert>(Val: __res__);
9525}
9526
9527aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9528 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9529}
9530
9531void aarch64_sme_st1q_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9532 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
9533}
9534
9535aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9536 ::mlir::OperationState __state__(location, getOperationName());
9537 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9538 auto __res__ = builder.create(state: __state__);
9539 assert((::llvm::isa<aarch64_sme_st1q_vert>(__res__)) && "builder didn't return the right type");
9540 return ::llvm::cast<aarch64_sme_st1q_vert>(Val: __res__);
9541}
9542
9543aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9544 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9545}
9546
9547void aarch64_sme_st1q_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9548 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9549 odsState.addOperands(newOperands: predicate);
9550 odsState.addOperands(newOperands: store_address);
9551 odsState.addOperands(newOperands: tile_slice_index);
9552 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
9553 assert(resultTypes.size() == 0u && "mismatched number of results");
9554 odsState.addTypes(newTypes&: resultTypes);
9555}
9556
9557aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9558 ::mlir::OperationState __state__(location, getOperationName());
9559 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9560 auto __res__ = builder.create(state: __state__);
9561 assert((::llvm::isa<aarch64_sme_st1q_vert>(__res__)) && "builder didn't return the right type");
9562 return ::llvm::cast<aarch64_sme_st1q_vert>(Val: __res__);
9563}
9564
9565aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9566 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9567}
9568
9569void aarch64_sme_st1q_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9570 assert(operands.size() == 3u && "mismatched number of parameters");
9571 odsState.addOperands(newOperands: operands);
9572 buildPropertiesAndDiscardableAttributes(odsState, attributes);
9573 assert(resultTypes.size() == 0u && "mismatched number of return types");
9574 odsState.addTypes(newTypes&: resultTypes);
9575}
9576
9577aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9578LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
9579
9580 ::mlir::OperationState __state__(location, getOperationName());
9581 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
9582 auto __res__ = builder.create(state: __state__);
9583 assert((::llvm::isa<aarch64_sme_st1q_vert>(__res__)) && "builder didn't return the right type");
9584 return ::llvm::cast<aarch64_sme_st1q_vert>(Val: __res__);
9585LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
9586}
9587
9588aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9589LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
9590
9591 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
9592LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
9593}
9594
9595void aarch64_sme_st1q_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9596 assert(operands.size() == 3u && "mismatched number of parameters");
9597 odsState.addOperands(newOperands: operands);
9598 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
9599 odsState.addAttributes(newAttributes: discardableAttributes);
9600 assert(resultTypes.size() == 0u && "mismatched number of return types");
9601 odsState.addTypes(newTypes&: resultTypes);
9602}
9603
9604aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9605 ::mlir::OperationState __state__(location, getOperationName());
9606 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
9607 auto __res__ = builder.create(state: __state__);
9608 assert((::llvm::isa<aarch64_sme_st1q_vert>(__res__)) && "builder didn't return the right type");
9609 return ::llvm::cast<aarch64_sme_st1q_vert>(Val: __res__);
9610}
9611
9612aarch64_sme_st1q_vert aarch64_sme_st1q_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9613 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
9614}
9615
9616::llvm::LogicalResult aarch64_sme_st1q_vert::verifyInvariantsImpl() {
9617 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
9618 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
9619
9620 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
9621 return ::mlir::failure();
9622 {
9623 unsigned index = 0; (void)index;
9624 auto valueGroup0 = getODSOperands(index: 0);
9625
9626 for (auto v : valueGroup0) {
9627 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9628 return ::mlir::failure();
9629 }
9630 auto valueGroup1 = getODSOperands(index: 1);
9631
9632 for (auto v : valueGroup1) {
9633 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9634 return ::mlir::failure();
9635 }
9636 auto valueGroup2 = getODSOperands(index: 2);
9637
9638 for (auto v : valueGroup2) {
9639 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9640 return ::mlir::failure();
9641 }
9642 }
9643 return ::mlir::success();
9644}
9645
9646::llvm::LogicalResult aarch64_sme_st1q_vert::verifyInvariants() {
9647 return verifyInvariantsImpl();
9648}
9649
9650::llvm::LogicalResult aarch64_sme_st1q_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9651 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9652 if (!dict) {
9653 emitError() << "expected DictionaryAttr to set properties";
9654 return ::mlir::failure();
9655 }
9656 // keep track of used keys in the input dictionary to be able to error out
9657 // if there are some unknown ones.
9658 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
9659 ::mlir::MLIRContext *ctx = dict.getContext();
9660 (void)ctx;
9661 {
9662
9663 auto &propStorage = prop.tile_id;
9664 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
9665 auto attr = dict.get(name: tile_idAttrName);
9666 usedKeys.insert(V: tile_idAttrName);
9667 if (attr || /*isRequired=*/true) {
9668 if (!attr) {
9669 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
9670 "Properties.";
9671 return ::mlir::failure();
9672 }
9673 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
9674 if (convertedAttr) {
9675 propStorage = convertedAttr;
9676 } else {
9677 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
9678 return ::mlir::failure();
9679 }
9680 }
9681 }
9682
9683 for (::mlir::NamedAttribute attr : dict) {
9684 if (!usedKeys.contains(V: attr.getName()))
9685 return emitError() << "unknown key '" << attr.getName() <<
9686 "' when parsing properties dictionary";
9687 }
9688 return ::mlir::success();
9689}
9690
9691void aarch64_sme_st1q_vert::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9692 {
9693 auto valueRange = getODSOperandIndexAndLength(index: 1);
9694 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
9695 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
9696 }
9697 }
9698}
9699
9700void aarch64_sme_st1q_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9701 Properties &properties = odsState.getOrAddProperties<Properties>();
9702 populateDefaultProperties(opName: odsState.name, properties);
9703 const ::llvm::StringRef inherentNames[] = {"tile_id"};
9704 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
9705 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
9706 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
9707 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
9708 });
9709}
9710
9711
9712} // namespace mlir::arm_sme
9713MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1q_vert)
9714MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1q_vertGenericAdaptorBase::Properties)
9715
9716namespace mlir::arm_sme {
9717
9718
9719//===----------------------------------------------------------------------===//
9720// ::mlir::arm_sme::aarch64_sme_st1w_horiz definitions
9721//===----------------------------------------------------------------------===//
9722
9723namespace detail {
9724
9725aarch64_sme_st1w_horizGenericAdaptorBase::aarch64_sme_st1w_horizGenericAdaptorBase(aarch64_sme_st1w_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9726
9727uint32_t aarch64_sme_st1w_horizGenericAdaptorBase::getTileId() {
9728 auto attr = getTileIdAttr();
9729 return attr.getValue().getZExtValue();
9730}
9731
9732
9733} // namespace detail
9734aarch64_sme_st1w_horizAdaptor::aarch64_sme_st1w_horizAdaptor(aarch64_sme_st1w_horiz op) : aarch64_sme_st1w_horizGenericAdaptor(op->getOperands(), op) {}
9735
9736::llvm::LogicalResult aarch64_sme_st1w_horizAdaptor::verify(::mlir::Location loc) {
9737 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
9738 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1w.horiz' op requires attribute 'tile_id'");
9739
9740 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
9741 return emitError(loc, message: "'arm_sme.intr.st1w.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
9742 return ::mlir::success();
9743}
9744
9745::llvm::LogicalResult aarch64_sme_st1w_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9746 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9747 if (!dict) {
9748 emitError() << "expected DictionaryAttr to set properties";
9749 return ::mlir::failure();
9750 }
9751
9752 {
9753 auto attr = dict.get(name: "tile_id");
9754 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
9755 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
9756 return ::mlir::failure();
9757 }
9758 return ::mlir::success();
9759}
9760
9761::mlir::Attribute aarch64_sme_st1w_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9762 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9763 ::mlir::Builder odsBuilder{ctx};
9764 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
9765
9766 if (!attrs.empty())
9767 return odsBuilder.getDictionaryAttr(value: attrs);
9768 return {};
9769}
9770
9771llvm::hash_code aarch64_sme_st1w_horiz::computePropertiesHash(const Properties &prop) {
9772 using llvm::hash_value;
9773 return llvm::hash_combine(
9774 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
9775}
9776
9777std::optional<mlir::Attribute> aarch64_sme_st1w_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9778 if (name == "tile_id")
9779 return prop.tile_id;
9780 return std::nullopt;
9781}
9782
9783void aarch64_sme_st1w_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9784 if (name == "tile_id") {
9785 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
9786 return;
9787 }
9788}
9789
9790void aarch64_sme_st1w_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
9791 if (prop.tile_id) {
9792 ::mlir::Attribute value = prop.tile_id;
9793 ::mlir::Attribute originalValue = value;
9794 visitor("tile_id", value);
9795 if (value != originalValue)
9796 setInherentAttr(prop, name: "tile_id", value);
9797 }
9798}
9799
9800::llvm::LogicalResult aarch64_sme_st1w_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9801 {
9802 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
9803 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
9804 return ::mlir::failure();
9805 }
9806 return ::mlir::success();
9807}
9808
9809::llvm::LogicalResult aarch64_sme_st1w_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9810 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9811 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
9812 return ::mlir::failure();
9813 return ::mlir::success();
9814}
9815
9816void aarch64_sme_st1w_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9817 auto &prop = getProperties(); (void)prop;
9818 writer.writeAttribute(attr: prop.tile_id);
9819}
9820
9821uint32_t aarch64_sme_st1w_horiz::getTileId() {
9822 auto attr = getTileIdAttr();
9823 return attr.getValue().getZExtValue();
9824}
9825
9826void aarch64_sme_st1w_horiz::setTileId(uint32_t attrValue) {
9827 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
9828}
9829
9830void aarch64_sme_st1w_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9831 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
9832}
9833
9834aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9835 ::mlir::OperationState __state__(location, getOperationName());
9836 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9837 auto __res__ = builder.create(state: __state__);
9838 assert((::llvm::isa<aarch64_sme_st1w_horiz>(__res__)) && "builder didn't return the right type");
9839 return ::llvm::cast<aarch64_sme_st1w_horiz>(Val: __res__);
9840}
9841
9842aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9843 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9844}
9845
9846void aarch64_sme_st1w_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9847 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9848 odsState.addOperands(newOperands: predicate);
9849 odsState.addOperands(newOperands: store_address);
9850 odsState.addOperands(newOperands: tile_slice_index);
9851 odsProperties.tile_id = tile_id;
9852 assert(resultTypes.size() == 0u && "mismatched number of results");
9853 odsState.addTypes(newTypes&: resultTypes);
9854}
9855
9856aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9857 ::mlir::OperationState __state__(location, getOperationName());
9858 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9859 auto __res__ = builder.create(state: __state__);
9860 assert((::llvm::isa<aarch64_sme_st1w_horiz>(__res__)) && "builder didn't return the right type");
9861 return ::llvm::cast<aarch64_sme_st1w_horiz>(Val: __res__);
9862}
9863
9864aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
9865 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9866}
9867
9868void aarch64_sme_st1w_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9869 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
9870}
9871
9872aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9873 ::mlir::OperationState __state__(location, getOperationName());
9874 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9875 auto __res__ = builder.create(state: __state__);
9876 assert((::llvm::isa<aarch64_sme_st1w_horiz>(__res__)) && "builder didn't return the right type");
9877 return ::llvm::cast<aarch64_sme_st1w_horiz>(Val: __res__);
9878}
9879
9880aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9881 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9882}
9883
9884void aarch64_sme_st1w_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9885 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9886 odsState.addOperands(newOperands: predicate);
9887 odsState.addOperands(newOperands: store_address);
9888 odsState.addOperands(newOperands: tile_slice_index);
9889 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
9890 assert(resultTypes.size() == 0u && "mismatched number of results");
9891 odsState.addTypes(newTypes&: resultTypes);
9892}
9893
9894aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9895 ::mlir::OperationState __state__(location, getOperationName());
9896 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9897 auto __res__ = builder.create(state: __state__);
9898 assert((::llvm::isa<aarch64_sme_st1w_horiz>(__res__)) && "builder didn't return the right type");
9899 return ::llvm::cast<aarch64_sme_st1w_horiz>(Val: __res__);
9900}
9901
9902aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
9903 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
9904}
9905
9906void aarch64_sme_st1w_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9907 assert(operands.size() == 3u && "mismatched number of parameters");
9908 odsState.addOperands(newOperands: operands);
9909 buildPropertiesAndDiscardableAttributes(odsState, attributes);
9910 assert(resultTypes.size() == 0u && "mismatched number of return types");
9911 odsState.addTypes(newTypes&: resultTypes);
9912}
9913
9914aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9915LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
9916
9917 ::mlir::OperationState __state__(location, getOperationName());
9918 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
9919 auto __res__ = builder.create(state: __state__);
9920 assert((::llvm::isa<aarch64_sme_st1w_horiz>(__res__)) && "builder didn't return the right type");
9921 return ::llvm::cast<aarch64_sme_st1w_horiz>(Val: __res__);
9922LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
9923}
9924
9925aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9926LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
9927
9928 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
9929LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
9930}
9931
9932void aarch64_sme_st1w_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9933 assert(operands.size() == 3u && "mismatched number of parameters");
9934 odsState.addOperands(newOperands: operands);
9935 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
9936 odsState.addAttributes(newAttributes: discardableAttributes);
9937 assert(resultTypes.size() == 0u && "mismatched number of return types");
9938 odsState.addTypes(newTypes&: resultTypes);
9939}
9940
9941aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9942 ::mlir::OperationState __state__(location, getOperationName());
9943 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
9944 auto __res__ = builder.create(state: __state__);
9945 assert((::llvm::isa<aarch64_sme_st1w_horiz>(__res__)) && "builder didn't return the right type");
9946 return ::llvm::cast<aarch64_sme_st1w_horiz>(Val: __res__);
9947}
9948
9949aarch64_sme_st1w_horiz aarch64_sme_st1w_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9950 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
9951}
9952
9953::llvm::LogicalResult aarch64_sme_st1w_horiz::verifyInvariantsImpl() {
9954 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
9955 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
9956
9957 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
9958 return ::mlir::failure();
9959 {
9960 unsigned index = 0; (void)index;
9961 auto valueGroup0 = getODSOperands(index: 0);
9962
9963 for (auto v : valueGroup0) {
9964 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9965 return ::mlir::failure();
9966 }
9967 auto valueGroup1 = getODSOperands(index: 1);
9968
9969 for (auto v : valueGroup1) {
9970 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9971 return ::mlir::failure();
9972 }
9973 auto valueGroup2 = getODSOperands(index: 2);
9974
9975 for (auto v : valueGroup2) {
9976 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9977 return ::mlir::failure();
9978 }
9979 }
9980 return ::mlir::success();
9981}
9982
9983::llvm::LogicalResult aarch64_sme_st1w_horiz::verifyInvariants() {
9984 return verifyInvariantsImpl();
9985}
9986
9987::llvm::LogicalResult aarch64_sme_st1w_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9988 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9989 if (!dict) {
9990 emitError() << "expected DictionaryAttr to set properties";
9991 return ::mlir::failure();
9992 }
9993 // keep track of used keys in the input dictionary to be able to error out
9994 // if there are some unknown ones.
9995 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
9996 ::mlir::MLIRContext *ctx = dict.getContext();
9997 (void)ctx;
9998 {
9999
10000 auto &propStorage = prop.tile_id;
10001 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
10002 auto attr = dict.get(name: tile_idAttrName);
10003 usedKeys.insert(V: tile_idAttrName);
10004 if (attr || /*isRequired=*/true) {
10005 if (!attr) {
10006 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
10007 "Properties.";
10008 return ::mlir::failure();
10009 }
10010 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
10011 if (convertedAttr) {
10012 propStorage = convertedAttr;
10013 } else {
10014 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
10015 return ::mlir::failure();
10016 }
10017 }
10018 }
10019
10020 for (::mlir::NamedAttribute attr : dict) {
10021 if (!usedKeys.contains(V: attr.getName()))
10022 return emitError() << "unknown key '" << attr.getName() <<
10023 "' when parsing properties dictionary";
10024 }
10025 return ::mlir::success();
10026}
10027
10028void aarch64_sme_st1w_horiz::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10029 {
10030 auto valueRange = getODSOperandIndexAndLength(index: 1);
10031 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
10032 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
10033 }
10034 }
10035}
10036
10037void aarch64_sme_st1w_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10038 Properties &properties = odsState.getOrAddProperties<Properties>();
10039 populateDefaultProperties(opName: odsState.name, properties);
10040 const ::llvm::StringRef inherentNames[] = {"tile_id"};
10041 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
10042 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
10043 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
10044 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
10045 });
10046}
10047
10048
10049} // namespace mlir::arm_sme
10050MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1w_horiz)
10051MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1w_horizGenericAdaptorBase::Properties)
10052
10053namespace mlir::arm_sme {
10054
10055
10056//===----------------------------------------------------------------------===//
10057// ::mlir::arm_sme::aarch64_sme_st1w_vert definitions
10058//===----------------------------------------------------------------------===//
10059
10060namespace detail {
10061
10062aarch64_sme_st1w_vertGenericAdaptorBase::aarch64_sme_st1w_vertGenericAdaptorBase(aarch64_sme_st1w_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10063
10064uint32_t aarch64_sme_st1w_vertGenericAdaptorBase::getTileId() {
10065 auto attr = getTileIdAttr();
10066 return attr.getValue().getZExtValue();
10067}
10068
10069
10070} // namespace detail
10071aarch64_sme_st1w_vertAdaptor::aarch64_sme_st1w_vertAdaptor(aarch64_sme_st1w_vert op) : aarch64_sme_st1w_vertGenericAdaptor(op->getOperands(), op) {}
10072
10073::llvm::LogicalResult aarch64_sme_st1w_vertAdaptor::verify(::mlir::Location loc) {
10074 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
10075 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.st1w.vert' op requires attribute 'tile_id'");
10076
10077 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
10078 return emitError(loc, message: "'arm_sme.intr.st1w.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
10079 return ::mlir::success();
10080}
10081
10082::llvm::LogicalResult aarch64_sme_st1w_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10083 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10084 if (!dict) {
10085 emitError() << "expected DictionaryAttr to set properties";
10086 return ::mlir::failure();
10087 }
10088
10089 {
10090 auto attr = dict.get(name: "tile_id");
10091 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
10092 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
10093 return ::mlir::failure();
10094 }
10095 return ::mlir::success();
10096}
10097
10098::mlir::Attribute aarch64_sme_st1w_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10099 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10100 ::mlir::Builder odsBuilder{ctx};
10101 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
10102
10103 if (!attrs.empty())
10104 return odsBuilder.getDictionaryAttr(value: attrs);
10105 return {};
10106}
10107
10108llvm::hash_code aarch64_sme_st1w_vert::computePropertiesHash(const Properties &prop) {
10109 using llvm::hash_value;
10110 return llvm::hash_combine(
10111 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
10112}
10113
10114std::optional<mlir::Attribute> aarch64_sme_st1w_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10115 if (name == "tile_id")
10116 return prop.tile_id;
10117 return std::nullopt;
10118}
10119
10120void aarch64_sme_st1w_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10121 if (name == "tile_id") {
10122 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
10123 return;
10124 }
10125}
10126
10127void aarch64_sme_st1w_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
10128 if (prop.tile_id) {
10129 ::mlir::Attribute value = prop.tile_id;
10130 ::mlir::Attribute originalValue = value;
10131 visitor("tile_id", value);
10132 if (value != originalValue)
10133 setInherentAttr(prop, name: "tile_id", value);
10134 }
10135}
10136
10137::llvm::LogicalResult aarch64_sme_st1w_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10138 {
10139 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
10140 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
10141 return ::mlir::failure();
10142 }
10143 return ::mlir::success();
10144}
10145
10146::llvm::LogicalResult aarch64_sme_st1w_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
10147 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
10148 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
10149 return ::mlir::failure();
10150 return ::mlir::success();
10151}
10152
10153void aarch64_sme_st1w_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
10154 auto &prop = getProperties(); (void)prop;
10155 writer.writeAttribute(attr: prop.tile_id);
10156}
10157
10158uint32_t aarch64_sme_st1w_vert::getTileId() {
10159 auto attr = getTileIdAttr();
10160 return attr.getValue().getZExtValue();
10161}
10162
10163void aarch64_sme_st1w_vert::setTileId(uint32_t attrValue) {
10164 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
10165}
10166
10167void aarch64_sme_st1w_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
10168 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
10169}
10170
10171aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
10172 ::mlir::OperationState __state__(location, getOperationName());
10173 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
10174 auto __res__ = builder.create(state: __state__);
10175 assert((::llvm::isa<aarch64_sme_st1w_vert>(__res__)) && "builder didn't return the right type");
10176 return ::llvm::cast<aarch64_sme_st1w_vert>(Val: __res__);
10177}
10178
10179aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
10180 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
10181}
10182
10183void aarch64_sme_st1w_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
10184 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10185 odsState.addOperands(newOperands: predicate);
10186 odsState.addOperands(newOperands: store_address);
10187 odsState.addOperands(newOperands: tile_slice_index);
10188 odsProperties.tile_id = tile_id;
10189 assert(resultTypes.size() == 0u && "mismatched number of results");
10190 odsState.addTypes(newTypes&: resultTypes);
10191}
10192
10193aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
10194 ::mlir::OperationState __state__(location, getOperationName());
10195 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
10196 auto __res__ = builder.create(state: __state__);
10197 assert((::llvm::isa<aarch64_sme_st1w_vert>(__res__)) && "builder didn't return the right type");
10198 return ::llvm::cast<aarch64_sme_st1w_vert>(Val: __res__);
10199}
10200
10201aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index) {
10202 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
10203}
10204
10205void aarch64_sme_st1w_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
10206 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, predicate, store_address, tile_id, tile_slice_index);
10207}
10208
10209aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
10210 ::mlir::OperationState __state__(location, getOperationName());
10211 build(odsBuilder&: builder, odsState&: __state__, predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
10212 auto __res__ = builder.create(state: __state__);
10213 assert((::llvm::isa<aarch64_sme_st1w_vert>(__res__)) && "builder didn't return the right type");
10214 return ::llvm::cast<aarch64_sme_st1w_vert>(Val: __res__);
10215}
10216
10217aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
10218 return create(builder, location: builder.getLoc(), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
10219}
10220
10221void aarch64_sme_st1w_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
10222 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10223 odsState.addOperands(newOperands: predicate);
10224 odsState.addOperands(newOperands: store_address);
10225 odsState.addOperands(newOperands: tile_slice_index);
10226 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
10227 assert(resultTypes.size() == 0u && "mismatched number of results");
10228 odsState.addTypes(newTypes&: resultTypes);
10229}
10230
10231aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
10232 ::mlir::OperationState __state__(location, getOperationName());
10233 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
10234 auto __res__ = builder.create(state: __state__);
10235 assert((::llvm::isa<aarch64_sme_st1w_vert>(__res__)) && "builder didn't return the right type");
10236 return ::llvm::cast<aarch64_sme_st1w_vert>(Val: __res__);
10237}
10238
10239aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value predicate, ::mlir::Value store_address, uint32_t tile_id, ::mlir::Value tile_slice_index) {
10240 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), predicate: std::forward<decltype(predicate)>(t&: predicate), store_address: std::forward<decltype(store_address)>(t&: store_address), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index));
10241}
10242
10243void aarch64_sme_st1w_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10244 assert(operands.size() == 3u && "mismatched number of parameters");
10245 odsState.addOperands(newOperands: operands);
10246 buildPropertiesAndDiscardableAttributes(odsState, attributes);
10247 assert(resultTypes.size() == 0u && "mismatched number of return types");
10248 odsState.addTypes(newTypes&: resultTypes);
10249}
10250
10251aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10252LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10253
10254 ::mlir::OperationState __state__(location, getOperationName());
10255 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
10256 auto __res__ = builder.create(state: __state__);
10257 assert((::llvm::isa<aarch64_sme_st1w_vert>(__res__)) && "builder didn't return the right type");
10258 return ::llvm::cast<aarch64_sme_st1w_vert>(Val: __res__);
10259LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10260}
10261
10262aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10263LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10264
10265 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
10266LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10267}
10268
10269void aarch64_sme_st1w_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10270 assert(operands.size() == 3u && "mismatched number of parameters");
10271 odsState.addOperands(newOperands: operands);
10272 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
10273 odsState.addAttributes(newAttributes: discardableAttributes);
10274 assert(resultTypes.size() == 0u && "mismatched number of return types");
10275 odsState.addTypes(newTypes&: resultTypes);
10276}
10277
10278aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10279 ::mlir::OperationState __state__(location, getOperationName());
10280 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
10281 auto __res__ = builder.create(state: __state__);
10282 assert((::llvm::isa<aarch64_sme_st1w_vert>(__res__)) && "builder didn't return the right type");
10283 return ::llvm::cast<aarch64_sme_st1w_vert>(Val: __res__);
10284}
10285
10286aarch64_sme_st1w_vert aarch64_sme_st1w_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10287 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
10288}
10289
10290::llvm::LogicalResult aarch64_sme_st1w_vert::verifyInvariantsImpl() {
10291 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
10292 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
10293
10294 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
10295 return ::mlir::failure();
10296 {
10297 unsigned index = 0; (void)index;
10298 auto valueGroup0 = getODSOperands(index: 0);
10299
10300 for (auto v : valueGroup0) {
10301 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10302 return ::mlir::failure();
10303 }
10304 auto valueGroup1 = getODSOperands(index: 1);
10305
10306 for (auto v : valueGroup1) {
10307 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10308 return ::mlir::failure();
10309 }
10310 auto valueGroup2 = getODSOperands(index: 2);
10311
10312 for (auto v : valueGroup2) {
10313 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10314 return ::mlir::failure();
10315 }
10316 }
10317 return ::mlir::success();
10318}
10319
10320::llvm::LogicalResult aarch64_sme_st1w_vert::verifyInvariants() {
10321 return verifyInvariantsImpl();
10322}
10323
10324::llvm::LogicalResult aarch64_sme_st1w_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10325 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10326 if (!dict) {
10327 emitError() << "expected DictionaryAttr to set properties";
10328 return ::mlir::failure();
10329 }
10330 // keep track of used keys in the input dictionary to be able to error out
10331 // if there are some unknown ones.
10332 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
10333 ::mlir::MLIRContext *ctx = dict.getContext();
10334 (void)ctx;
10335 {
10336
10337 auto &propStorage = prop.tile_id;
10338 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
10339 auto attr = dict.get(name: tile_idAttrName);
10340 usedKeys.insert(V: tile_idAttrName);
10341 if (attr || /*isRequired=*/true) {
10342 if (!attr) {
10343 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
10344 "Properties.";
10345 return ::mlir::failure();
10346 }
10347 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
10348 if (convertedAttr) {
10349 propStorage = convertedAttr;
10350 } else {
10351 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
10352 return ::mlir::failure();
10353 }
10354 }
10355 }
10356
10357 for (::mlir::NamedAttribute attr : dict) {
10358 if (!usedKeys.contains(V: attr.getName()))
10359 return emitError() << "unknown key '" << attr.getName() <<
10360 "' when parsing properties dictionary";
10361 }
10362 return ::mlir::success();
10363}
10364
10365void aarch64_sme_st1w_vert::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10366 {
10367 auto valueRange = getODSOperandIndexAndLength(index: 1);
10368 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
10369 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
10370 }
10371 }
10372}
10373
10374void aarch64_sme_st1w_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10375 Properties &properties = odsState.getOrAddProperties<Properties>();
10376 populateDefaultProperties(opName: odsState.name, properties);
10377 const ::llvm::StringRef inherentNames[] = {"tile_id"};
10378 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
10379 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
10380 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
10381 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
10382 });
10383}
10384
10385
10386} // namespace mlir::arm_sme
10387MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_st1w_vert)
10388MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_st1w_vertGenericAdaptorBase::Properties)
10389
10390namespace mlir::arm_sme {
10391
10392
10393//===----------------------------------------------------------------------===//
10394// ::mlir::arm_sme::aarch64_sme_str definitions
10395//===----------------------------------------------------------------------===//
10396
10397namespace detail {
10398
10399aarch64_sme_strGenericAdaptorBase::aarch64_sme_strGenericAdaptorBase(aarch64_sme_str op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10400
10401
10402} // namespace detail
10403aarch64_sme_strAdaptor::aarch64_sme_strAdaptor(aarch64_sme_str op) : aarch64_sme_strGenericAdaptor(op->getOperands(), op) {}
10404
10405::llvm::LogicalResult aarch64_sme_strAdaptor::verify(::mlir::Location loc) {
10406 return ::mlir::success();
10407}
10408
10409::llvm::LogicalResult aarch64_sme_str::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10410 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10411 if (!dict) {
10412 emitError() << "expected DictionaryAttr to set properties";
10413 return ::mlir::failure();
10414 }
10415 return ::mlir::success();
10416}
10417
10418::mlir::Attribute aarch64_sme_str::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10419 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10420 ::mlir::Builder odsBuilder{ctx};
10421
10422 if (!attrs.empty())
10423 return odsBuilder.getDictionaryAttr(value: attrs);
10424 return {};
10425}
10426
10427llvm::hash_code aarch64_sme_str::computePropertiesHash(const Properties &prop) {
10428 using llvm::hash_value;
10429 return llvm::hash_combine();
10430}
10431
10432std::optional<mlir::Attribute> aarch64_sme_str::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10433 return std::nullopt;
10434}
10435
10436void aarch64_sme_str::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10437}
10438
10439void aarch64_sme_str::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
10440}
10441
10442::llvm::LogicalResult aarch64_sme_str::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10443 return ::mlir::success();
10444}
10445
10446void aarch64_sme_str::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value index, ::mlir::Value store_address, ::mlir::Value offset) {
10447 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, index, store_address, offset);
10448}
10449
10450aarch64_sme_str aarch64_sme_str::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value index, ::mlir::Value store_address, ::mlir::Value offset) {
10451 ::mlir::OperationState __state__(location, getOperationName());
10452 build(odsBuilder&: builder, odsState&: __state__, index: std::forward<decltype(index)>(t&: index), store_address: std::forward<decltype(store_address)>(t&: store_address), offset: std::forward<decltype(offset)>(t&: offset));
10453 auto __res__ = builder.create(state: __state__);
10454 assert((::llvm::isa<aarch64_sme_str>(__res__)) && "builder didn't return the right type");
10455 return ::llvm::cast<aarch64_sme_str>(Val: __res__);
10456}
10457
10458aarch64_sme_str aarch64_sme_str::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value index, ::mlir::Value store_address, ::mlir::Value offset) {
10459 return create(builder, location: builder.getLoc(), index: std::forward<decltype(index)>(t&: index), store_address: std::forward<decltype(store_address)>(t&: store_address), offset: std::forward<decltype(offset)>(t&: offset));
10460}
10461
10462void aarch64_sme_str::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value index, ::mlir::Value store_address, ::mlir::Value offset) {
10463 odsState.addOperands(newOperands: index);
10464 odsState.addOperands(newOperands: store_address);
10465 odsState.addOperands(newOperands: offset);
10466 assert(resultTypes.size() == 0u && "mismatched number of results");
10467 odsState.addTypes(newTypes&: resultTypes);
10468}
10469
10470aarch64_sme_str aarch64_sme_str::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value index, ::mlir::Value store_address, ::mlir::Value offset) {
10471 ::mlir::OperationState __state__(location, getOperationName());
10472 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), index: std::forward<decltype(index)>(t&: index), store_address: std::forward<decltype(store_address)>(t&: store_address), offset: std::forward<decltype(offset)>(t&: offset));
10473 auto __res__ = builder.create(state: __state__);
10474 assert((::llvm::isa<aarch64_sme_str>(__res__)) && "builder didn't return the right type");
10475 return ::llvm::cast<aarch64_sme_str>(Val: __res__);
10476}
10477
10478aarch64_sme_str aarch64_sme_str::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value index, ::mlir::Value store_address, ::mlir::Value offset) {
10479 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), index: std::forward<decltype(index)>(t&: index), store_address: std::forward<decltype(store_address)>(t&: store_address), offset: std::forward<decltype(offset)>(t&: offset));
10480}
10481
10482void aarch64_sme_str::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10483 assert(operands.size() == 3u && "mismatched number of parameters");
10484 odsState.addOperands(newOperands: operands);
10485 odsState.addAttributes(newAttributes: attributes);
10486 assert(resultTypes.size() == 0u && "mismatched number of return types");
10487 odsState.addTypes(newTypes&: resultTypes);
10488}
10489
10490aarch64_sme_str aarch64_sme_str::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10491 ::mlir::OperationState __state__(location, getOperationName());
10492 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
10493 auto __res__ = builder.create(state: __state__);
10494 assert((::llvm::isa<aarch64_sme_str>(__res__)) && "builder didn't return the right type");
10495 return ::llvm::cast<aarch64_sme_str>(Val: __res__);
10496}
10497
10498aarch64_sme_str aarch64_sme_str::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10499 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
10500}
10501
10502void aarch64_sme_str::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10503 assert(operands.size() == 3u && "mismatched number of parameters");
10504 odsState.addOperands(newOperands: operands);
10505 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
10506 odsState.addAttributes(newAttributes: discardableAttributes);
10507 assert(resultTypes.size() == 0u && "mismatched number of return types");
10508 odsState.addTypes(newTypes&: resultTypes);
10509}
10510
10511aarch64_sme_str aarch64_sme_str::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10512 ::mlir::OperationState __state__(location, getOperationName());
10513 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
10514 auto __res__ = builder.create(state: __state__);
10515 assert((::llvm::isa<aarch64_sme_str>(__res__)) && "builder didn't return the right type");
10516 return ::llvm::cast<aarch64_sme_str>(Val: __res__);
10517}
10518
10519aarch64_sme_str aarch64_sme_str::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10520 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
10521}
10522
10523::llvm::LogicalResult aarch64_sme_str::verifyInvariantsImpl() {
10524 {
10525 unsigned index = 0; (void)index;
10526 auto valueGroup0 = getODSOperands(index: 0);
10527
10528 for (auto v : valueGroup0) {
10529 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10530 return ::mlir::failure();
10531 }
10532 auto valueGroup1 = getODSOperands(index: 1);
10533
10534 for (auto v : valueGroup1) {
10535 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10536 return ::mlir::failure();
10537 }
10538 auto valueGroup2 = getODSOperands(index: 2);
10539
10540 for (auto v : valueGroup2) {
10541 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10542 return ::mlir::failure();
10543 }
10544 }
10545 return ::mlir::success();
10546}
10547
10548::llvm::LogicalResult aarch64_sme_str::verifyInvariants() {
10549 return verifyInvariantsImpl();
10550}
10551
10552::llvm::LogicalResult aarch64_sme_str::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10553 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10554 if (!dict) {
10555 emitError() << "expected DictionaryAttr to set properties";
10556 return ::mlir::failure();
10557 }
10558 // keep track of used keys in the input dictionary to be able to error out
10559 // if there are some unknown ones.
10560 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
10561 ::mlir::MLIRContext *ctx = dict.getContext();
10562 (void)ctx;
10563
10564 for (::mlir::NamedAttribute attr : dict) {
10565 if (!usedKeys.contains(V: attr.getName()))
10566 return emitError() << "unknown key '" << attr.getName() <<
10567 "' when parsing properties dictionary";
10568 }
10569 return ::mlir::success();
10570}
10571
10572void aarch64_sme_str::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10573 {
10574 auto valueRange = getODSOperandIndexAndLength(index: 1);
10575 for (unsigned idx = valueRange.first; idx < valueRange.first + valueRange.second; idx++) {
10576 effects.emplace_back(Args: ::mlir::MemoryEffects::Write::get(), Args: &getOperation()->getOpOperand(idx), Args: 0, Args: false, Args: ::mlir::SideEffects::DefaultResource::get());
10577 }
10578 }
10579}
10580
10581
10582} // namespace mlir::arm_sme
10583MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_str)
10584
10585namespace mlir::arm_sme {
10586
10587
10588//===----------------------------------------------------------------------===//
10589// ::mlir::arm_sme::aarch64_sme_sumopa_wide definitions
10590//===----------------------------------------------------------------------===//
10591
10592namespace detail {
10593
10594aarch64_sme_sumopa_wideGenericAdaptorBase::aarch64_sme_sumopa_wideGenericAdaptorBase(aarch64_sme_sumopa_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10595
10596uint32_t aarch64_sme_sumopa_wideGenericAdaptorBase::getTileId() {
10597 auto attr = getTileIdAttr();
10598 return attr.getValue().getZExtValue();
10599}
10600
10601
10602} // namespace detail
10603aarch64_sme_sumopa_wideAdaptor::aarch64_sme_sumopa_wideAdaptor(aarch64_sme_sumopa_wide op) : aarch64_sme_sumopa_wideGenericAdaptor(op->getOperands(), op) {}
10604
10605::llvm::LogicalResult aarch64_sme_sumopa_wideAdaptor::verify(::mlir::Location loc) {
10606 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
10607 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.sumopa.wide' op requires attribute 'tile_id'");
10608
10609 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
10610 return emitError(loc, message: "'arm_sme.intr.sumopa.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
10611 return ::mlir::success();
10612}
10613
10614::llvm::LogicalResult aarch64_sme_sumopa_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10615 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10616 if (!dict) {
10617 emitError() << "expected DictionaryAttr to set properties";
10618 return ::mlir::failure();
10619 }
10620
10621 {
10622 auto attr = dict.get(name: "tile_id");
10623 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
10624 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
10625 return ::mlir::failure();
10626 }
10627 return ::mlir::success();
10628}
10629
10630::mlir::Attribute aarch64_sme_sumopa_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10631 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10632 ::mlir::Builder odsBuilder{ctx};
10633 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
10634
10635 if (!attrs.empty())
10636 return odsBuilder.getDictionaryAttr(value: attrs);
10637 return {};
10638}
10639
10640llvm::hash_code aarch64_sme_sumopa_wide::computePropertiesHash(const Properties &prop) {
10641 using llvm::hash_value;
10642 return llvm::hash_combine(
10643 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
10644}
10645
10646std::optional<mlir::Attribute> aarch64_sme_sumopa_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10647 if (name == "tile_id")
10648 return prop.tile_id;
10649 return std::nullopt;
10650}
10651
10652void aarch64_sme_sumopa_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10653 if (name == "tile_id") {
10654 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
10655 return;
10656 }
10657}
10658
10659void aarch64_sme_sumopa_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
10660 if (prop.tile_id) {
10661 ::mlir::Attribute value = prop.tile_id;
10662 ::mlir::Attribute originalValue = value;
10663 visitor("tile_id", value);
10664 if (value != originalValue)
10665 setInherentAttr(prop, name: "tile_id", value);
10666 }
10667}
10668
10669::llvm::LogicalResult aarch64_sme_sumopa_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10670 {
10671 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
10672 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
10673 return ::mlir::failure();
10674 }
10675 return ::mlir::success();
10676}
10677
10678::llvm::LogicalResult aarch64_sme_sumopa_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
10679 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
10680 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
10681 return ::mlir::failure();
10682 return ::mlir::success();
10683}
10684
10685void aarch64_sme_sumopa_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
10686 auto &prop = getProperties(); (void)prop;
10687 writer.writeAttribute(attr: prop.tile_id);
10688}
10689
10690uint32_t aarch64_sme_sumopa_wide::getTileId() {
10691 auto attr = getTileIdAttr();
10692 return attr.getValue().getZExtValue();
10693}
10694
10695void aarch64_sme_sumopa_wide::setTileId(uint32_t attrValue) {
10696 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
10697}
10698
10699void aarch64_sme_sumopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10700 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
10701}
10702
10703aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10704 ::mlir::OperationState __state__(location, getOperationName());
10705 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
10706 auto __res__ = builder.create(state: __state__);
10707 assert((::llvm::isa<aarch64_sme_sumopa_wide>(__res__)) && "builder didn't return the right type");
10708 return ::llvm::cast<aarch64_sme_sumopa_wide>(Val: __res__);
10709}
10710
10711aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10712 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
10713}
10714
10715void aarch64_sme_sumopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10716 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10717 odsState.addOperands(newOperands: lhs_predicate);
10718 odsState.addOperands(newOperands: rhs_predicate);
10719 odsState.addOperands(newOperands: lhs_vector);
10720 odsState.addOperands(newOperands: rhs_vector);
10721 odsProperties.tile_id = tile_id;
10722 assert(resultTypes.size() == 0u && "mismatched number of results");
10723 odsState.addTypes(newTypes&: resultTypes);
10724}
10725
10726aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10727 ::mlir::OperationState __state__(location, getOperationName());
10728 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
10729 auto __res__ = builder.create(state: __state__);
10730 assert((::llvm::isa<aarch64_sme_sumopa_wide>(__res__)) && "builder didn't return the right type");
10731 return ::llvm::cast<aarch64_sme_sumopa_wide>(Val: __res__);
10732}
10733
10734aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10735 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
10736}
10737
10738void aarch64_sme_sumopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10739 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
10740}
10741
10742aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10743 ::mlir::OperationState __state__(location, getOperationName());
10744 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
10745 auto __res__ = builder.create(state: __state__);
10746 assert((::llvm::isa<aarch64_sme_sumopa_wide>(__res__)) && "builder didn't return the right type");
10747 return ::llvm::cast<aarch64_sme_sumopa_wide>(Val: __res__);
10748}
10749
10750aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10751 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
10752}
10753
10754void aarch64_sme_sumopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10755 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10756 odsState.addOperands(newOperands: lhs_predicate);
10757 odsState.addOperands(newOperands: rhs_predicate);
10758 odsState.addOperands(newOperands: lhs_vector);
10759 odsState.addOperands(newOperands: rhs_vector);
10760 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
10761 assert(resultTypes.size() == 0u && "mismatched number of results");
10762 odsState.addTypes(newTypes&: resultTypes);
10763}
10764
10765aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10766 ::mlir::OperationState __state__(location, getOperationName());
10767 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
10768 auto __res__ = builder.create(state: __state__);
10769 assert((::llvm::isa<aarch64_sme_sumopa_wide>(__res__)) && "builder didn't return the right type");
10770 return ::llvm::cast<aarch64_sme_sumopa_wide>(Val: __res__);
10771}
10772
10773aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
10774 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
10775}
10776
10777void aarch64_sme_sumopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10778 assert(operands.size() == 4u && "mismatched number of parameters");
10779 odsState.addOperands(newOperands: operands);
10780 buildPropertiesAndDiscardableAttributes(odsState, attributes);
10781 assert(resultTypes.size() == 0u && "mismatched number of return types");
10782 odsState.addTypes(newTypes&: resultTypes);
10783}
10784
10785aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10786LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10787
10788 ::mlir::OperationState __state__(location, getOperationName());
10789 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
10790 auto __res__ = builder.create(state: __state__);
10791 assert((::llvm::isa<aarch64_sme_sumopa_wide>(__res__)) && "builder didn't return the right type");
10792 return ::llvm::cast<aarch64_sme_sumopa_wide>(Val: __res__);
10793LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10794}
10795
10796aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10797LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10798
10799 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
10800LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10801}
10802
10803void aarch64_sme_sumopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10804 assert(operands.size() == 4u && "mismatched number of parameters");
10805 odsState.addOperands(newOperands: operands);
10806 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
10807 odsState.addAttributes(newAttributes: discardableAttributes);
10808 assert(resultTypes.size() == 0u && "mismatched number of return types");
10809 odsState.addTypes(newTypes&: resultTypes);
10810}
10811
10812aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10813 ::mlir::OperationState __state__(location, getOperationName());
10814 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
10815 auto __res__ = builder.create(state: __state__);
10816 assert((::llvm::isa<aarch64_sme_sumopa_wide>(__res__)) && "builder didn't return the right type");
10817 return ::llvm::cast<aarch64_sme_sumopa_wide>(Val: __res__);
10818}
10819
10820aarch64_sme_sumopa_wide aarch64_sme_sumopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10821 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
10822}
10823
10824::llvm::LogicalResult aarch64_sme_sumopa_wide::verifyInvariantsImpl() {
10825 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
10826 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
10827
10828 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
10829 return ::mlir::failure();
10830 {
10831 unsigned index = 0; (void)index;
10832 auto valueGroup0 = getODSOperands(index: 0);
10833
10834 for (auto v : valueGroup0) {
10835 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10836 return ::mlir::failure();
10837 }
10838 auto valueGroup1 = getODSOperands(index: 1);
10839
10840 for (auto v : valueGroup1) {
10841 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10842 return ::mlir::failure();
10843 }
10844 auto valueGroup2 = getODSOperands(index: 2);
10845
10846 for (auto v : valueGroup2) {
10847 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10848 return ::mlir::failure();
10849 }
10850 auto valueGroup3 = getODSOperands(index: 3);
10851
10852 for (auto v : valueGroup3) {
10853 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10854 return ::mlir::failure();
10855 }
10856 }
10857 return ::mlir::success();
10858}
10859
10860::llvm::LogicalResult aarch64_sme_sumopa_wide::verifyInvariants() {
10861 return verifyInvariantsImpl();
10862}
10863
10864::llvm::LogicalResult aarch64_sme_sumopa_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10865 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10866 if (!dict) {
10867 emitError() << "expected DictionaryAttr to set properties";
10868 return ::mlir::failure();
10869 }
10870 // keep track of used keys in the input dictionary to be able to error out
10871 // if there are some unknown ones.
10872 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
10873 ::mlir::MLIRContext *ctx = dict.getContext();
10874 (void)ctx;
10875 {
10876
10877 auto &propStorage = prop.tile_id;
10878 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
10879 auto attr = dict.get(name: tile_idAttrName);
10880 usedKeys.insert(V: tile_idAttrName);
10881 if (attr || /*isRequired=*/true) {
10882 if (!attr) {
10883 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
10884 "Properties.";
10885 return ::mlir::failure();
10886 }
10887 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
10888 if (convertedAttr) {
10889 propStorage = convertedAttr;
10890 } else {
10891 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
10892 return ::mlir::failure();
10893 }
10894 }
10895 }
10896
10897 for (::mlir::NamedAttribute attr : dict) {
10898 if (!usedKeys.contains(V: attr.getName()))
10899 return emitError() << "unknown key '" << attr.getName() <<
10900 "' when parsing properties dictionary";
10901 }
10902 return ::mlir::success();
10903}
10904
10905void aarch64_sme_sumopa_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10906 Properties &properties = odsState.getOrAddProperties<Properties>();
10907 populateDefaultProperties(opName: odsState.name, properties);
10908 const ::llvm::StringRef inherentNames[] = {"tile_id"};
10909 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
10910 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
10911 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
10912 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
10913 });
10914}
10915
10916
10917} // namespace mlir::arm_sme
10918MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_sumopa_wide)
10919MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_sumopa_wideGenericAdaptorBase::Properties)
10920
10921namespace mlir::arm_sme {
10922
10923
10924//===----------------------------------------------------------------------===//
10925// ::mlir::arm_sme::aarch64_sme_sumops_wide definitions
10926//===----------------------------------------------------------------------===//
10927
10928namespace detail {
10929
10930aarch64_sme_sumops_wideGenericAdaptorBase::aarch64_sme_sumops_wideGenericAdaptorBase(aarch64_sme_sumops_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10931
10932uint32_t aarch64_sme_sumops_wideGenericAdaptorBase::getTileId() {
10933 auto attr = getTileIdAttr();
10934 return attr.getValue().getZExtValue();
10935}
10936
10937
10938} // namespace detail
10939aarch64_sme_sumops_wideAdaptor::aarch64_sme_sumops_wideAdaptor(aarch64_sme_sumops_wide op) : aarch64_sme_sumops_wideGenericAdaptor(op->getOperands(), op) {}
10940
10941::llvm::LogicalResult aarch64_sme_sumops_wideAdaptor::verify(::mlir::Location loc) {
10942 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
10943 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.sumops.wide' op requires attribute 'tile_id'");
10944
10945 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
10946 return emitError(loc, message: "'arm_sme.intr.sumops.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
10947 return ::mlir::success();
10948}
10949
10950::llvm::LogicalResult aarch64_sme_sumops_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10951 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10952 if (!dict) {
10953 emitError() << "expected DictionaryAttr to set properties";
10954 return ::mlir::failure();
10955 }
10956
10957 {
10958 auto attr = dict.get(name: "tile_id");
10959 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
10960 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
10961 return ::mlir::failure();
10962 }
10963 return ::mlir::success();
10964}
10965
10966::mlir::Attribute aarch64_sme_sumops_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10967 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10968 ::mlir::Builder odsBuilder{ctx};
10969 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
10970
10971 if (!attrs.empty())
10972 return odsBuilder.getDictionaryAttr(value: attrs);
10973 return {};
10974}
10975
10976llvm::hash_code aarch64_sme_sumops_wide::computePropertiesHash(const Properties &prop) {
10977 using llvm::hash_value;
10978 return llvm::hash_combine(
10979 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
10980}
10981
10982std::optional<mlir::Attribute> aarch64_sme_sumops_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10983 if (name == "tile_id")
10984 return prop.tile_id;
10985 return std::nullopt;
10986}
10987
10988void aarch64_sme_sumops_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10989 if (name == "tile_id") {
10990 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
10991 return;
10992 }
10993}
10994
10995void aarch64_sme_sumops_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
10996 if (prop.tile_id) {
10997 ::mlir::Attribute value = prop.tile_id;
10998 ::mlir::Attribute originalValue = value;
10999 visitor("tile_id", value);
11000 if (value != originalValue)
11001 setInherentAttr(prop, name: "tile_id", value);
11002 }
11003}
11004
11005::llvm::LogicalResult aarch64_sme_sumops_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11006 {
11007 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
11008 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
11009 return ::mlir::failure();
11010 }
11011 return ::mlir::success();
11012}
11013
11014::llvm::LogicalResult aarch64_sme_sumops_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
11015 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
11016 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
11017 return ::mlir::failure();
11018 return ::mlir::success();
11019}
11020
11021void aarch64_sme_sumops_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
11022 auto &prop = getProperties(); (void)prop;
11023 writer.writeAttribute(attr: prop.tile_id);
11024}
11025
11026uint32_t aarch64_sme_sumops_wide::getTileId() {
11027 auto attr = getTileIdAttr();
11028 return attr.getValue().getZExtValue();
11029}
11030
11031void aarch64_sme_sumops_wide::setTileId(uint32_t attrValue) {
11032 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
11033}
11034
11035void aarch64_sme_sumops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11036 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
11037}
11038
11039aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11040 ::mlir::OperationState __state__(location, getOperationName());
11041 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11042 auto __res__ = builder.create(state: __state__);
11043 assert((::llvm::isa<aarch64_sme_sumops_wide>(__res__)) && "builder didn't return the right type");
11044 return ::llvm::cast<aarch64_sme_sumops_wide>(Val: __res__);
11045}
11046
11047aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11048 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11049}
11050
11051void aarch64_sme_sumops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11052 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11053 odsState.addOperands(newOperands: lhs_predicate);
11054 odsState.addOperands(newOperands: rhs_predicate);
11055 odsState.addOperands(newOperands: lhs_vector);
11056 odsState.addOperands(newOperands: rhs_vector);
11057 odsProperties.tile_id = tile_id;
11058 assert(resultTypes.size() == 0u && "mismatched number of results");
11059 odsState.addTypes(newTypes&: resultTypes);
11060}
11061
11062aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11063 ::mlir::OperationState __state__(location, getOperationName());
11064 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11065 auto __res__ = builder.create(state: __state__);
11066 assert((::llvm::isa<aarch64_sme_sumops_wide>(__res__)) && "builder didn't return the right type");
11067 return ::llvm::cast<aarch64_sme_sumops_wide>(Val: __res__);
11068}
11069
11070aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11071 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11072}
11073
11074void aarch64_sme_sumops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11075 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
11076}
11077
11078aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11079 ::mlir::OperationState __state__(location, getOperationName());
11080 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11081 auto __res__ = builder.create(state: __state__);
11082 assert((::llvm::isa<aarch64_sme_sumops_wide>(__res__)) && "builder didn't return the right type");
11083 return ::llvm::cast<aarch64_sme_sumops_wide>(Val: __res__);
11084}
11085
11086aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11087 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11088}
11089
11090void aarch64_sme_sumops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11091 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11092 odsState.addOperands(newOperands: lhs_predicate);
11093 odsState.addOperands(newOperands: rhs_predicate);
11094 odsState.addOperands(newOperands: lhs_vector);
11095 odsState.addOperands(newOperands: rhs_vector);
11096 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
11097 assert(resultTypes.size() == 0u && "mismatched number of results");
11098 odsState.addTypes(newTypes&: resultTypes);
11099}
11100
11101aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11102 ::mlir::OperationState __state__(location, getOperationName());
11103 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11104 auto __res__ = builder.create(state: __state__);
11105 assert((::llvm::isa<aarch64_sme_sumops_wide>(__res__)) && "builder didn't return the right type");
11106 return ::llvm::cast<aarch64_sme_sumops_wide>(Val: __res__);
11107}
11108
11109aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11110 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11111}
11112
11113void aarch64_sme_sumops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11114 assert(operands.size() == 4u && "mismatched number of parameters");
11115 odsState.addOperands(newOperands: operands);
11116 buildPropertiesAndDiscardableAttributes(odsState, attributes);
11117 assert(resultTypes.size() == 0u && "mismatched number of return types");
11118 odsState.addTypes(newTypes&: resultTypes);
11119}
11120
11121aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11122LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11123
11124 ::mlir::OperationState __state__(location, getOperationName());
11125 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
11126 auto __res__ = builder.create(state: __state__);
11127 assert((::llvm::isa<aarch64_sme_sumops_wide>(__res__)) && "builder didn't return the right type");
11128 return ::llvm::cast<aarch64_sme_sumops_wide>(Val: __res__);
11129LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11130}
11131
11132aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11133LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11134
11135 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
11136LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11137}
11138
11139void aarch64_sme_sumops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11140 assert(operands.size() == 4u && "mismatched number of parameters");
11141 odsState.addOperands(newOperands: operands);
11142 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
11143 odsState.addAttributes(newAttributes: discardableAttributes);
11144 assert(resultTypes.size() == 0u && "mismatched number of return types");
11145 odsState.addTypes(newTypes&: resultTypes);
11146}
11147
11148aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11149 ::mlir::OperationState __state__(location, getOperationName());
11150 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
11151 auto __res__ = builder.create(state: __state__);
11152 assert((::llvm::isa<aarch64_sme_sumops_wide>(__res__)) && "builder didn't return the right type");
11153 return ::llvm::cast<aarch64_sme_sumops_wide>(Val: __res__);
11154}
11155
11156aarch64_sme_sumops_wide aarch64_sme_sumops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11157 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
11158}
11159
11160::llvm::LogicalResult aarch64_sme_sumops_wide::verifyInvariantsImpl() {
11161 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
11162 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
11163
11164 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
11165 return ::mlir::failure();
11166 {
11167 unsigned index = 0; (void)index;
11168 auto valueGroup0 = getODSOperands(index: 0);
11169
11170 for (auto v : valueGroup0) {
11171 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11172 return ::mlir::failure();
11173 }
11174 auto valueGroup1 = getODSOperands(index: 1);
11175
11176 for (auto v : valueGroup1) {
11177 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11178 return ::mlir::failure();
11179 }
11180 auto valueGroup2 = getODSOperands(index: 2);
11181
11182 for (auto v : valueGroup2) {
11183 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11184 return ::mlir::failure();
11185 }
11186 auto valueGroup3 = getODSOperands(index: 3);
11187
11188 for (auto v : valueGroup3) {
11189 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11190 return ::mlir::failure();
11191 }
11192 }
11193 return ::mlir::success();
11194}
11195
11196::llvm::LogicalResult aarch64_sme_sumops_wide::verifyInvariants() {
11197 return verifyInvariantsImpl();
11198}
11199
11200::llvm::LogicalResult aarch64_sme_sumops_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11201 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11202 if (!dict) {
11203 emitError() << "expected DictionaryAttr to set properties";
11204 return ::mlir::failure();
11205 }
11206 // keep track of used keys in the input dictionary to be able to error out
11207 // if there are some unknown ones.
11208 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
11209 ::mlir::MLIRContext *ctx = dict.getContext();
11210 (void)ctx;
11211 {
11212
11213 auto &propStorage = prop.tile_id;
11214 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
11215 auto attr = dict.get(name: tile_idAttrName);
11216 usedKeys.insert(V: tile_idAttrName);
11217 if (attr || /*isRequired=*/true) {
11218 if (!attr) {
11219 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
11220 "Properties.";
11221 return ::mlir::failure();
11222 }
11223 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
11224 if (convertedAttr) {
11225 propStorage = convertedAttr;
11226 } else {
11227 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
11228 return ::mlir::failure();
11229 }
11230 }
11231 }
11232
11233 for (::mlir::NamedAttribute attr : dict) {
11234 if (!usedKeys.contains(V: attr.getName()))
11235 return emitError() << "unknown key '" << attr.getName() <<
11236 "' when parsing properties dictionary";
11237 }
11238 return ::mlir::success();
11239}
11240
11241void aarch64_sme_sumops_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11242 Properties &properties = odsState.getOrAddProperties<Properties>();
11243 populateDefaultProperties(opName: odsState.name, properties);
11244 const ::llvm::StringRef inherentNames[] = {"tile_id"};
11245 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
11246 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
11247 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
11248 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
11249 });
11250}
11251
11252
11253} // namespace mlir::arm_sme
11254MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_sumops_wide)
11255MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_sumops_wideGenericAdaptorBase::Properties)
11256
11257namespace mlir::arm_sme {
11258
11259
11260//===----------------------------------------------------------------------===//
11261// ::mlir::arm_sme::aarch64_sme_umopa_wide definitions
11262//===----------------------------------------------------------------------===//
11263
11264namespace detail {
11265
11266aarch64_sme_umopa_wideGenericAdaptorBase::aarch64_sme_umopa_wideGenericAdaptorBase(aarch64_sme_umopa_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
11267
11268uint32_t aarch64_sme_umopa_wideGenericAdaptorBase::getTileId() {
11269 auto attr = getTileIdAttr();
11270 return attr.getValue().getZExtValue();
11271}
11272
11273
11274} // namespace detail
11275aarch64_sme_umopa_wideAdaptor::aarch64_sme_umopa_wideAdaptor(aarch64_sme_umopa_wide op) : aarch64_sme_umopa_wideGenericAdaptor(op->getOperands(), op) {}
11276
11277::llvm::LogicalResult aarch64_sme_umopa_wideAdaptor::verify(::mlir::Location loc) {
11278 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
11279 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.umopa.wide' op requires attribute 'tile_id'");
11280
11281 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
11282 return emitError(loc, message: "'arm_sme.intr.umopa.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
11283 return ::mlir::success();
11284}
11285
11286::llvm::LogicalResult aarch64_sme_umopa_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11287 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11288 if (!dict) {
11289 emitError() << "expected DictionaryAttr to set properties";
11290 return ::mlir::failure();
11291 }
11292
11293 {
11294 auto attr = dict.get(name: "tile_id");
11295 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
11296 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
11297 return ::mlir::failure();
11298 }
11299 return ::mlir::success();
11300}
11301
11302::mlir::Attribute aarch64_sme_umopa_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
11303 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
11304 ::mlir::Builder odsBuilder{ctx};
11305 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
11306
11307 if (!attrs.empty())
11308 return odsBuilder.getDictionaryAttr(value: attrs);
11309 return {};
11310}
11311
11312llvm::hash_code aarch64_sme_umopa_wide::computePropertiesHash(const Properties &prop) {
11313 using llvm::hash_value;
11314 return llvm::hash_combine(
11315 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
11316}
11317
11318std::optional<mlir::Attribute> aarch64_sme_umopa_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
11319 if (name == "tile_id")
11320 return prop.tile_id;
11321 return std::nullopt;
11322}
11323
11324void aarch64_sme_umopa_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
11325 if (name == "tile_id") {
11326 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
11327 return;
11328 }
11329}
11330
11331void aarch64_sme_umopa_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
11332 if (prop.tile_id) {
11333 ::mlir::Attribute value = prop.tile_id;
11334 ::mlir::Attribute originalValue = value;
11335 visitor("tile_id", value);
11336 if (value != originalValue)
11337 setInherentAttr(prop, name: "tile_id", value);
11338 }
11339}
11340
11341::llvm::LogicalResult aarch64_sme_umopa_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11342 {
11343 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
11344 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
11345 return ::mlir::failure();
11346 }
11347 return ::mlir::success();
11348}
11349
11350::llvm::LogicalResult aarch64_sme_umopa_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
11351 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
11352 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
11353 return ::mlir::failure();
11354 return ::mlir::success();
11355}
11356
11357void aarch64_sme_umopa_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
11358 auto &prop = getProperties(); (void)prop;
11359 writer.writeAttribute(attr: prop.tile_id);
11360}
11361
11362uint32_t aarch64_sme_umopa_wide::getTileId() {
11363 auto attr = getTileIdAttr();
11364 return attr.getValue().getZExtValue();
11365}
11366
11367void aarch64_sme_umopa_wide::setTileId(uint32_t attrValue) {
11368 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
11369}
11370
11371void aarch64_sme_umopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11372 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
11373}
11374
11375aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11376 ::mlir::OperationState __state__(location, getOperationName());
11377 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11378 auto __res__ = builder.create(state: __state__);
11379 assert((::llvm::isa<aarch64_sme_umopa_wide>(__res__)) && "builder didn't return the right type");
11380 return ::llvm::cast<aarch64_sme_umopa_wide>(Val: __res__);
11381}
11382
11383aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11384 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11385}
11386
11387void aarch64_sme_umopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11388 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11389 odsState.addOperands(newOperands: lhs_predicate);
11390 odsState.addOperands(newOperands: rhs_predicate);
11391 odsState.addOperands(newOperands: lhs_vector);
11392 odsState.addOperands(newOperands: rhs_vector);
11393 odsProperties.tile_id = tile_id;
11394 assert(resultTypes.size() == 0u && "mismatched number of results");
11395 odsState.addTypes(newTypes&: resultTypes);
11396}
11397
11398aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11399 ::mlir::OperationState __state__(location, getOperationName());
11400 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11401 auto __res__ = builder.create(state: __state__);
11402 assert((::llvm::isa<aarch64_sme_umopa_wide>(__res__)) && "builder didn't return the right type");
11403 return ::llvm::cast<aarch64_sme_umopa_wide>(Val: __res__);
11404}
11405
11406aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11407 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11408}
11409
11410void aarch64_sme_umopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11411 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
11412}
11413
11414aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11415 ::mlir::OperationState __state__(location, getOperationName());
11416 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11417 auto __res__ = builder.create(state: __state__);
11418 assert((::llvm::isa<aarch64_sme_umopa_wide>(__res__)) && "builder didn't return the right type");
11419 return ::llvm::cast<aarch64_sme_umopa_wide>(Val: __res__);
11420}
11421
11422aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11423 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11424}
11425
11426void aarch64_sme_umopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11427 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11428 odsState.addOperands(newOperands: lhs_predicate);
11429 odsState.addOperands(newOperands: rhs_predicate);
11430 odsState.addOperands(newOperands: lhs_vector);
11431 odsState.addOperands(newOperands: rhs_vector);
11432 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
11433 assert(resultTypes.size() == 0u && "mismatched number of results");
11434 odsState.addTypes(newTypes&: resultTypes);
11435}
11436
11437aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11438 ::mlir::OperationState __state__(location, getOperationName());
11439 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11440 auto __res__ = builder.create(state: __state__);
11441 assert((::llvm::isa<aarch64_sme_umopa_wide>(__res__)) && "builder didn't return the right type");
11442 return ::llvm::cast<aarch64_sme_umopa_wide>(Val: __res__);
11443}
11444
11445aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11446 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11447}
11448
11449void aarch64_sme_umopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11450 assert(operands.size() == 4u && "mismatched number of parameters");
11451 odsState.addOperands(newOperands: operands);
11452 buildPropertiesAndDiscardableAttributes(odsState, attributes);
11453 assert(resultTypes.size() == 0u && "mismatched number of return types");
11454 odsState.addTypes(newTypes&: resultTypes);
11455}
11456
11457aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11458LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11459
11460 ::mlir::OperationState __state__(location, getOperationName());
11461 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
11462 auto __res__ = builder.create(state: __state__);
11463 assert((::llvm::isa<aarch64_sme_umopa_wide>(__res__)) && "builder didn't return the right type");
11464 return ::llvm::cast<aarch64_sme_umopa_wide>(Val: __res__);
11465LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11466}
11467
11468aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11469LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11470
11471 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
11472LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11473}
11474
11475void aarch64_sme_umopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11476 assert(operands.size() == 4u && "mismatched number of parameters");
11477 odsState.addOperands(newOperands: operands);
11478 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
11479 odsState.addAttributes(newAttributes: discardableAttributes);
11480 assert(resultTypes.size() == 0u && "mismatched number of return types");
11481 odsState.addTypes(newTypes&: resultTypes);
11482}
11483
11484aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11485 ::mlir::OperationState __state__(location, getOperationName());
11486 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
11487 auto __res__ = builder.create(state: __state__);
11488 assert((::llvm::isa<aarch64_sme_umopa_wide>(__res__)) && "builder didn't return the right type");
11489 return ::llvm::cast<aarch64_sme_umopa_wide>(Val: __res__);
11490}
11491
11492aarch64_sme_umopa_wide aarch64_sme_umopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11493 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
11494}
11495
11496::llvm::LogicalResult aarch64_sme_umopa_wide::verifyInvariantsImpl() {
11497 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
11498 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
11499
11500 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
11501 return ::mlir::failure();
11502 {
11503 unsigned index = 0; (void)index;
11504 auto valueGroup0 = getODSOperands(index: 0);
11505
11506 for (auto v : valueGroup0) {
11507 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11508 return ::mlir::failure();
11509 }
11510 auto valueGroup1 = getODSOperands(index: 1);
11511
11512 for (auto v : valueGroup1) {
11513 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11514 return ::mlir::failure();
11515 }
11516 auto valueGroup2 = getODSOperands(index: 2);
11517
11518 for (auto v : valueGroup2) {
11519 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11520 return ::mlir::failure();
11521 }
11522 auto valueGroup3 = getODSOperands(index: 3);
11523
11524 for (auto v : valueGroup3) {
11525 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11526 return ::mlir::failure();
11527 }
11528 }
11529 return ::mlir::success();
11530}
11531
11532::llvm::LogicalResult aarch64_sme_umopa_wide::verifyInvariants() {
11533 return verifyInvariantsImpl();
11534}
11535
11536::llvm::LogicalResult aarch64_sme_umopa_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11537 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11538 if (!dict) {
11539 emitError() << "expected DictionaryAttr to set properties";
11540 return ::mlir::failure();
11541 }
11542 // keep track of used keys in the input dictionary to be able to error out
11543 // if there are some unknown ones.
11544 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
11545 ::mlir::MLIRContext *ctx = dict.getContext();
11546 (void)ctx;
11547 {
11548
11549 auto &propStorage = prop.tile_id;
11550 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
11551 auto attr = dict.get(name: tile_idAttrName);
11552 usedKeys.insert(V: tile_idAttrName);
11553 if (attr || /*isRequired=*/true) {
11554 if (!attr) {
11555 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
11556 "Properties.";
11557 return ::mlir::failure();
11558 }
11559 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
11560 if (convertedAttr) {
11561 propStorage = convertedAttr;
11562 } else {
11563 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
11564 return ::mlir::failure();
11565 }
11566 }
11567 }
11568
11569 for (::mlir::NamedAttribute attr : dict) {
11570 if (!usedKeys.contains(V: attr.getName()))
11571 return emitError() << "unknown key '" << attr.getName() <<
11572 "' when parsing properties dictionary";
11573 }
11574 return ::mlir::success();
11575}
11576
11577void aarch64_sme_umopa_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11578 Properties &properties = odsState.getOrAddProperties<Properties>();
11579 populateDefaultProperties(opName: odsState.name, properties);
11580 const ::llvm::StringRef inherentNames[] = {"tile_id"};
11581 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
11582 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
11583 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
11584 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
11585 });
11586}
11587
11588
11589} // namespace mlir::arm_sme
11590MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_umopa_wide)
11591MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_umopa_wideGenericAdaptorBase::Properties)
11592
11593namespace mlir::arm_sme {
11594
11595
11596//===----------------------------------------------------------------------===//
11597// ::mlir::arm_sme::aarch64_sme_umopa_za32 definitions
11598//===----------------------------------------------------------------------===//
11599
11600namespace detail {
11601
11602aarch64_sme_umopa_za32GenericAdaptorBase::aarch64_sme_umopa_za32GenericAdaptorBase(aarch64_sme_umopa_za32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
11603
11604uint32_t aarch64_sme_umopa_za32GenericAdaptorBase::getTileId() {
11605 auto attr = getTileIdAttr();
11606 return attr.getValue().getZExtValue();
11607}
11608
11609
11610} // namespace detail
11611aarch64_sme_umopa_za32Adaptor::aarch64_sme_umopa_za32Adaptor(aarch64_sme_umopa_za32 op) : aarch64_sme_umopa_za32GenericAdaptor(op->getOperands(), op) {}
11612
11613::llvm::LogicalResult aarch64_sme_umopa_za32Adaptor::verify(::mlir::Location loc) {
11614 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
11615 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.umopa.za32' op requires attribute 'tile_id'");
11616
11617 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
11618 return emitError(loc, message: "'arm_sme.intr.umopa.za32' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
11619 return ::mlir::success();
11620}
11621
11622::llvm::LogicalResult aarch64_sme_umopa_za32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11623 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11624 if (!dict) {
11625 emitError() << "expected DictionaryAttr to set properties";
11626 return ::mlir::failure();
11627 }
11628
11629 {
11630 auto attr = dict.get(name: "tile_id");
11631 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
11632 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
11633 return ::mlir::failure();
11634 }
11635 return ::mlir::success();
11636}
11637
11638::mlir::Attribute aarch64_sme_umopa_za32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
11639 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
11640 ::mlir::Builder odsBuilder{ctx};
11641 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
11642
11643 if (!attrs.empty())
11644 return odsBuilder.getDictionaryAttr(value: attrs);
11645 return {};
11646}
11647
11648llvm::hash_code aarch64_sme_umopa_za32::computePropertiesHash(const Properties &prop) {
11649 using llvm::hash_value;
11650 return llvm::hash_combine(
11651 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
11652}
11653
11654std::optional<mlir::Attribute> aarch64_sme_umopa_za32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
11655 if (name == "tile_id")
11656 return prop.tile_id;
11657 return std::nullopt;
11658}
11659
11660void aarch64_sme_umopa_za32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
11661 if (name == "tile_id") {
11662 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
11663 return;
11664 }
11665}
11666
11667void aarch64_sme_umopa_za32::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
11668 if (prop.tile_id) {
11669 ::mlir::Attribute value = prop.tile_id;
11670 ::mlir::Attribute originalValue = value;
11671 visitor("tile_id", value);
11672 if (value != originalValue)
11673 setInherentAttr(prop, name: "tile_id", value);
11674 }
11675}
11676
11677::llvm::LogicalResult aarch64_sme_umopa_za32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11678 {
11679 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
11680 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
11681 return ::mlir::failure();
11682 }
11683 return ::mlir::success();
11684}
11685
11686::llvm::LogicalResult aarch64_sme_umopa_za32::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
11687 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
11688 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
11689 return ::mlir::failure();
11690 return ::mlir::success();
11691}
11692
11693void aarch64_sme_umopa_za32::writeProperties(::mlir::DialectBytecodeWriter &writer) {
11694 auto &prop = getProperties(); (void)prop;
11695 writer.writeAttribute(attr: prop.tile_id);
11696}
11697
11698uint32_t aarch64_sme_umopa_za32::getTileId() {
11699 auto attr = getTileIdAttr();
11700 return attr.getValue().getZExtValue();
11701}
11702
11703void aarch64_sme_umopa_za32::setTileId(uint32_t attrValue) {
11704 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
11705}
11706
11707void aarch64_sme_umopa_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11708 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
11709}
11710
11711aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11712 ::mlir::OperationState __state__(location, getOperationName());
11713 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11714 auto __res__ = builder.create(state: __state__);
11715 assert((::llvm::isa<aarch64_sme_umopa_za32>(__res__)) && "builder didn't return the right type");
11716 return ::llvm::cast<aarch64_sme_umopa_za32>(Val: __res__);
11717}
11718
11719aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11720 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11721}
11722
11723void aarch64_sme_umopa_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11724 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11725 odsState.addOperands(newOperands: lhs_predicate);
11726 odsState.addOperands(newOperands: rhs_predicate);
11727 odsState.addOperands(newOperands: lhs_vector);
11728 odsState.addOperands(newOperands: rhs_vector);
11729 odsProperties.tile_id = tile_id;
11730 assert(resultTypes.size() == 0u && "mismatched number of results");
11731 odsState.addTypes(newTypes&: resultTypes);
11732}
11733
11734aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11735 ::mlir::OperationState __state__(location, getOperationName());
11736 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11737 auto __res__ = builder.create(state: __state__);
11738 assert((::llvm::isa<aarch64_sme_umopa_za32>(__res__)) && "builder didn't return the right type");
11739 return ::llvm::cast<aarch64_sme_umopa_za32>(Val: __res__);
11740}
11741
11742aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11743 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11744}
11745
11746void aarch64_sme_umopa_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11747 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
11748}
11749
11750aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11751 ::mlir::OperationState __state__(location, getOperationName());
11752 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11753 auto __res__ = builder.create(state: __state__);
11754 assert((::llvm::isa<aarch64_sme_umopa_za32>(__res__)) && "builder didn't return the right type");
11755 return ::llvm::cast<aarch64_sme_umopa_za32>(Val: __res__);
11756}
11757
11758aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11759 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11760}
11761
11762void aarch64_sme_umopa_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11763 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11764 odsState.addOperands(newOperands: lhs_predicate);
11765 odsState.addOperands(newOperands: rhs_predicate);
11766 odsState.addOperands(newOperands: lhs_vector);
11767 odsState.addOperands(newOperands: rhs_vector);
11768 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
11769 assert(resultTypes.size() == 0u && "mismatched number of results");
11770 odsState.addTypes(newTypes&: resultTypes);
11771}
11772
11773aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11774 ::mlir::OperationState __state__(location, getOperationName());
11775 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11776 auto __res__ = builder.create(state: __state__);
11777 assert((::llvm::isa<aarch64_sme_umopa_za32>(__res__)) && "builder didn't return the right type");
11778 return ::llvm::cast<aarch64_sme_umopa_za32>(Val: __res__);
11779}
11780
11781aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
11782 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
11783}
11784
11785void aarch64_sme_umopa_za32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11786 assert(operands.size() == 4u && "mismatched number of parameters");
11787 odsState.addOperands(newOperands: operands);
11788 buildPropertiesAndDiscardableAttributes(odsState, attributes);
11789 assert(resultTypes.size() == 0u && "mismatched number of return types");
11790 odsState.addTypes(newTypes&: resultTypes);
11791}
11792
11793aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11794LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11795
11796 ::mlir::OperationState __state__(location, getOperationName());
11797 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
11798 auto __res__ = builder.create(state: __state__);
11799 assert((::llvm::isa<aarch64_sme_umopa_za32>(__res__)) && "builder didn't return the right type");
11800 return ::llvm::cast<aarch64_sme_umopa_za32>(Val: __res__);
11801LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11802}
11803
11804aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11805LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11806
11807 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
11808LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11809}
11810
11811void aarch64_sme_umopa_za32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11812 assert(operands.size() == 4u && "mismatched number of parameters");
11813 odsState.addOperands(newOperands: operands);
11814 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
11815 odsState.addAttributes(newAttributes: discardableAttributes);
11816 assert(resultTypes.size() == 0u && "mismatched number of return types");
11817 odsState.addTypes(newTypes&: resultTypes);
11818}
11819
11820aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11821 ::mlir::OperationState __state__(location, getOperationName());
11822 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
11823 auto __res__ = builder.create(state: __state__);
11824 assert((::llvm::isa<aarch64_sme_umopa_za32>(__res__)) && "builder didn't return the right type");
11825 return ::llvm::cast<aarch64_sme_umopa_za32>(Val: __res__);
11826}
11827
11828aarch64_sme_umopa_za32 aarch64_sme_umopa_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11829 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
11830}
11831
11832::llvm::LogicalResult aarch64_sme_umopa_za32::verifyInvariantsImpl() {
11833 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
11834 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
11835
11836 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
11837 return ::mlir::failure();
11838 {
11839 unsigned index = 0; (void)index;
11840 auto valueGroup0 = getODSOperands(index: 0);
11841
11842 for (auto v : valueGroup0) {
11843 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11844 return ::mlir::failure();
11845 }
11846 auto valueGroup1 = getODSOperands(index: 1);
11847
11848 for (auto v : valueGroup1) {
11849 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11850 return ::mlir::failure();
11851 }
11852 auto valueGroup2 = getODSOperands(index: 2);
11853
11854 for (auto v : valueGroup2) {
11855 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11856 return ::mlir::failure();
11857 }
11858 auto valueGroup3 = getODSOperands(index: 3);
11859
11860 for (auto v : valueGroup3) {
11861 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11862 return ::mlir::failure();
11863 }
11864 }
11865 return ::mlir::success();
11866}
11867
11868::llvm::LogicalResult aarch64_sme_umopa_za32::verifyInvariants() {
11869 return verifyInvariantsImpl();
11870}
11871
11872::llvm::LogicalResult aarch64_sme_umopa_za32::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11873 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11874 if (!dict) {
11875 emitError() << "expected DictionaryAttr to set properties";
11876 return ::mlir::failure();
11877 }
11878 // keep track of used keys in the input dictionary to be able to error out
11879 // if there are some unknown ones.
11880 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
11881 ::mlir::MLIRContext *ctx = dict.getContext();
11882 (void)ctx;
11883 {
11884
11885 auto &propStorage = prop.tile_id;
11886 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
11887 auto attr = dict.get(name: tile_idAttrName);
11888 usedKeys.insert(V: tile_idAttrName);
11889 if (attr || /*isRequired=*/true) {
11890 if (!attr) {
11891 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
11892 "Properties.";
11893 return ::mlir::failure();
11894 }
11895 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
11896 if (convertedAttr) {
11897 propStorage = convertedAttr;
11898 } else {
11899 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
11900 return ::mlir::failure();
11901 }
11902 }
11903 }
11904
11905 for (::mlir::NamedAttribute attr : dict) {
11906 if (!usedKeys.contains(V: attr.getName()))
11907 return emitError() << "unknown key '" << attr.getName() <<
11908 "' when parsing properties dictionary";
11909 }
11910 return ::mlir::success();
11911}
11912
11913void aarch64_sme_umopa_za32::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11914 Properties &properties = odsState.getOrAddProperties<Properties>();
11915 populateDefaultProperties(opName: odsState.name, properties);
11916 const ::llvm::StringRef inherentNames[] = {"tile_id"};
11917 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
11918 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
11919 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
11920 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
11921 });
11922}
11923
11924
11925} // namespace mlir::arm_sme
11926MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_umopa_za32)
11927MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_umopa_za32GenericAdaptorBase::Properties)
11928
11929namespace mlir::arm_sme {
11930
11931
11932//===----------------------------------------------------------------------===//
11933// ::mlir::arm_sme::aarch64_sme_umops_wide definitions
11934//===----------------------------------------------------------------------===//
11935
11936namespace detail {
11937
11938aarch64_sme_umops_wideGenericAdaptorBase::aarch64_sme_umops_wideGenericAdaptorBase(aarch64_sme_umops_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
11939
11940uint32_t aarch64_sme_umops_wideGenericAdaptorBase::getTileId() {
11941 auto attr = getTileIdAttr();
11942 return attr.getValue().getZExtValue();
11943}
11944
11945
11946} // namespace detail
11947aarch64_sme_umops_wideAdaptor::aarch64_sme_umops_wideAdaptor(aarch64_sme_umops_wide op) : aarch64_sme_umops_wideGenericAdaptor(op->getOperands(), op) {}
11948
11949::llvm::LogicalResult aarch64_sme_umops_wideAdaptor::verify(::mlir::Location loc) {
11950 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
11951 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.umops.wide' op requires attribute 'tile_id'");
11952
11953 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
11954 return emitError(loc, message: "'arm_sme.intr.umops.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
11955 return ::mlir::success();
11956}
11957
11958::llvm::LogicalResult aarch64_sme_umops_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11959 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11960 if (!dict) {
11961 emitError() << "expected DictionaryAttr to set properties";
11962 return ::mlir::failure();
11963 }
11964
11965 {
11966 auto attr = dict.get(name: "tile_id");
11967 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
11968 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
11969 return ::mlir::failure();
11970 }
11971 return ::mlir::success();
11972}
11973
11974::mlir::Attribute aarch64_sme_umops_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
11975 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
11976 ::mlir::Builder odsBuilder{ctx};
11977 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
11978
11979 if (!attrs.empty())
11980 return odsBuilder.getDictionaryAttr(value: attrs);
11981 return {};
11982}
11983
11984llvm::hash_code aarch64_sme_umops_wide::computePropertiesHash(const Properties &prop) {
11985 using llvm::hash_value;
11986 return llvm::hash_combine(
11987 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
11988}
11989
11990std::optional<mlir::Attribute> aarch64_sme_umops_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
11991 if (name == "tile_id")
11992 return prop.tile_id;
11993 return std::nullopt;
11994}
11995
11996void aarch64_sme_umops_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
11997 if (name == "tile_id") {
11998 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
11999 return;
12000 }
12001}
12002
12003void aarch64_sme_umops_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
12004 if (prop.tile_id) {
12005 ::mlir::Attribute value = prop.tile_id;
12006 ::mlir::Attribute originalValue = value;
12007 visitor("tile_id", value);
12008 if (value != originalValue)
12009 setInherentAttr(prop, name: "tile_id", value);
12010 }
12011}
12012
12013::llvm::LogicalResult aarch64_sme_umops_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12014 {
12015 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
12016 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
12017 return ::mlir::failure();
12018 }
12019 return ::mlir::success();
12020}
12021
12022::llvm::LogicalResult aarch64_sme_umops_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
12023 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
12024 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
12025 return ::mlir::failure();
12026 return ::mlir::success();
12027}
12028
12029void aarch64_sme_umops_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
12030 auto &prop = getProperties(); (void)prop;
12031 writer.writeAttribute(attr: prop.tile_id);
12032}
12033
12034uint32_t aarch64_sme_umops_wide::getTileId() {
12035 auto attr = getTileIdAttr();
12036 return attr.getValue().getZExtValue();
12037}
12038
12039void aarch64_sme_umops_wide::setTileId(uint32_t attrValue) {
12040 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
12041}
12042
12043void aarch64_sme_umops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12044 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
12045}
12046
12047aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12048 ::mlir::OperationState __state__(location, getOperationName());
12049 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12050 auto __res__ = builder.create(state: __state__);
12051 assert((::llvm::isa<aarch64_sme_umops_wide>(__res__)) && "builder didn't return the right type");
12052 return ::llvm::cast<aarch64_sme_umops_wide>(Val: __res__);
12053}
12054
12055aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12056 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12057}
12058
12059void aarch64_sme_umops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12060 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12061 odsState.addOperands(newOperands: lhs_predicate);
12062 odsState.addOperands(newOperands: rhs_predicate);
12063 odsState.addOperands(newOperands: lhs_vector);
12064 odsState.addOperands(newOperands: rhs_vector);
12065 odsProperties.tile_id = tile_id;
12066 assert(resultTypes.size() == 0u && "mismatched number of results");
12067 odsState.addTypes(newTypes&: resultTypes);
12068}
12069
12070aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12071 ::mlir::OperationState __state__(location, getOperationName());
12072 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12073 auto __res__ = builder.create(state: __state__);
12074 assert((::llvm::isa<aarch64_sme_umops_wide>(__res__)) && "builder didn't return the right type");
12075 return ::llvm::cast<aarch64_sme_umops_wide>(Val: __res__);
12076}
12077
12078aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12079 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12080}
12081
12082void aarch64_sme_umops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12083 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
12084}
12085
12086aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12087 ::mlir::OperationState __state__(location, getOperationName());
12088 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12089 auto __res__ = builder.create(state: __state__);
12090 assert((::llvm::isa<aarch64_sme_umops_wide>(__res__)) && "builder didn't return the right type");
12091 return ::llvm::cast<aarch64_sme_umops_wide>(Val: __res__);
12092}
12093
12094aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12095 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12096}
12097
12098void aarch64_sme_umops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12099 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12100 odsState.addOperands(newOperands: lhs_predicate);
12101 odsState.addOperands(newOperands: rhs_predicate);
12102 odsState.addOperands(newOperands: lhs_vector);
12103 odsState.addOperands(newOperands: rhs_vector);
12104 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
12105 assert(resultTypes.size() == 0u && "mismatched number of results");
12106 odsState.addTypes(newTypes&: resultTypes);
12107}
12108
12109aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12110 ::mlir::OperationState __state__(location, getOperationName());
12111 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12112 auto __res__ = builder.create(state: __state__);
12113 assert((::llvm::isa<aarch64_sme_umops_wide>(__res__)) && "builder didn't return the right type");
12114 return ::llvm::cast<aarch64_sme_umops_wide>(Val: __res__);
12115}
12116
12117aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12118 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12119}
12120
12121void aarch64_sme_umops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12122 assert(operands.size() == 4u && "mismatched number of parameters");
12123 odsState.addOperands(newOperands: operands);
12124 buildPropertiesAndDiscardableAttributes(odsState, attributes);
12125 assert(resultTypes.size() == 0u && "mismatched number of return types");
12126 odsState.addTypes(newTypes&: resultTypes);
12127}
12128
12129aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12130LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
12131
12132 ::mlir::OperationState __state__(location, getOperationName());
12133 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
12134 auto __res__ = builder.create(state: __state__);
12135 assert((::llvm::isa<aarch64_sme_umops_wide>(__res__)) && "builder didn't return the right type");
12136 return ::llvm::cast<aarch64_sme_umops_wide>(Val: __res__);
12137LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
12138}
12139
12140aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12141LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
12142
12143 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
12144LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
12145}
12146
12147void aarch64_sme_umops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12148 assert(operands.size() == 4u && "mismatched number of parameters");
12149 odsState.addOperands(newOperands: operands);
12150 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
12151 odsState.addAttributes(newAttributes: discardableAttributes);
12152 assert(resultTypes.size() == 0u && "mismatched number of return types");
12153 odsState.addTypes(newTypes&: resultTypes);
12154}
12155
12156aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12157 ::mlir::OperationState __state__(location, getOperationName());
12158 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
12159 auto __res__ = builder.create(state: __state__);
12160 assert((::llvm::isa<aarch64_sme_umops_wide>(__res__)) && "builder didn't return the right type");
12161 return ::llvm::cast<aarch64_sme_umops_wide>(Val: __res__);
12162}
12163
12164aarch64_sme_umops_wide aarch64_sme_umops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12165 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
12166}
12167
12168::llvm::LogicalResult aarch64_sme_umops_wide::verifyInvariantsImpl() {
12169 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
12170 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
12171
12172 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
12173 return ::mlir::failure();
12174 {
12175 unsigned index = 0; (void)index;
12176 auto valueGroup0 = getODSOperands(index: 0);
12177
12178 for (auto v : valueGroup0) {
12179 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12180 return ::mlir::failure();
12181 }
12182 auto valueGroup1 = getODSOperands(index: 1);
12183
12184 for (auto v : valueGroup1) {
12185 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12186 return ::mlir::failure();
12187 }
12188 auto valueGroup2 = getODSOperands(index: 2);
12189
12190 for (auto v : valueGroup2) {
12191 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12192 return ::mlir::failure();
12193 }
12194 auto valueGroup3 = getODSOperands(index: 3);
12195
12196 for (auto v : valueGroup3) {
12197 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12198 return ::mlir::failure();
12199 }
12200 }
12201 return ::mlir::success();
12202}
12203
12204::llvm::LogicalResult aarch64_sme_umops_wide::verifyInvariants() {
12205 return verifyInvariantsImpl();
12206}
12207
12208::llvm::LogicalResult aarch64_sme_umops_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12209 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12210 if (!dict) {
12211 emitError() << "expected DictionaryAttr to set properties";
12212 return ::mlir::failure();
12213 }
12214 // keep track of used keys in the input dictionary to be able to error out
12215 // if there are some unknown ones.
12216 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
12217 ::mlir::MLIRContext *ctx = dict.getContext();
12218 (void)ctx;
12219 {
12220
12221 auto &propStorage = prop.tile_id;
12222 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
12223 auto attr = dict.get(name: tile_idAttrName);
12224 usedKeys.insert(V: tile_idAttrName);
12225 if (attr || /*isRequired=*/true) {
12226 if (!attr) {
12227 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
12228 "Properties.";
12229 return ::mlir::failure();
12230 }
12231 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
12232 if (convertedAttr) {
12233 propStorage = convertedAttr;
12234 } else {
12235 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
12236 return ::mlir::failure();
12237 }
12238 }
12239 }
12240
12241 for (::mlir::NamedAttribute attr : dict) {
12242 if (!usedKeys.contains(V: attr.getName()))
12243 return emitError() << "unknown key '" << attr.getName() <<
12244 "' when parsing properties dictionary";
12245 }
12246 return ::mlir::success();
12247}
12248
12249void aarch64_sme_umops_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12250 Properties &properties = odsState.getOrAddProperties<Properties>();
12251 populateDefaultProperties(opName: odsState.name, properties);
12252 const ::llvm::StringRef inherentNames[] = {"tile_id"};
12253 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
12254 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
12255 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
12256 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
12257 });
12258}
12259
12260
12261} // namespace mlir::arm_sme
12262MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_umops_wide)
12263MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_umops_wideGenericAdaptorBase::Properties)
12264
12265namespace mlir::arm_sme {
12266
12267
12268//===----------------------------------------------------------------------===//
12269// ::mlir::arm_sme::aarch64_sme_umops_za32 definitions
12270//===----------------------------------------------------------------------===//
12271
12272namespace detail {
12273
12274aarch64_sme_umops_za32GenericAdaptorBase::aarch64_sme_umops_za32GenericAdaptorBase(aarch64_sme_umops_za32 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
12275
12276uint32_t aarch64_sme_umops_za32GenericAdaptorBase::getTileId() {
12277 auto attr = getTileIdAttr();
12278 return attr.getValue().getZExtValue();
12279}
12280
12281
12282} // namespace detail
12283aarch64_sme_umops_za32Adaptor::aarch64_sme_umops_za32Adaptor(aarch64_sme_umops_za32 op) : aarch64_sme_umops_za32GenericAdaptor(op->getOperands(), op) {}
12284
12285::llvm::LogicalResult aarch64_sme_umops_za32Adaptor::verify(::mlir::Location loc) {
12286 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
12287 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.umops.za32' op requires attribute 'tile_id'");
12288
12289 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
12290 return emitError(loc, message: "'arm_sme.intr.umops.za32' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
12291 return ::mlir::success();
12292}
12293
12294::llvm::LogicalResult aarch64_sme_umops_za32::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12295 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12296 if (!dict) {
12297 emitError() << "expected DictionaryAttr to set properties";
12298 return ::mlir::failure();
12299 }
12300
12301 {
12302 auto attr = dict.get(name: "tile_id");
12303 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
12304 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
12305 return ::mlir::failure();
12306 }
12307 return ::mlir::success();
12308}
12309
12310::mlir::Attribute aarch64_sme_umops_za32::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
12311 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
12312 ::mlir::Builder odsBuilder{ctx};
12313 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
12314
12315 if (!attrs.empty())
12316 return odsBuilder.getDictionaryAttr(value: attrs);
12317 return {};
12318}
12319
12320llvm::hash_code aarch64_sme_umops_za32::computePropertiesHash(const Properties &prop) {
12321 using llvm::hash_value;
12322 return llvm::hash_combine(
12323 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
12324}
12325
12326std::optional<mlir::Attribute> aarch64_sme_umops_za32::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
12327 if (name == "tile_id")
12328 return prop.tile_id;
12329 return std::nullopt;
12330}
12331
12332void aarch64_sme_umops_za32::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
12333 if (name == "tile_id") {
12334 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
12335 return;
12336 }
12337}
12338
12339void aarch64_sme_umops_za32::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
12340 if (prop.tile_id) {
12341 ::mlir::Attribute value = prop.tile_id;
12342 ::mlir::Attribute originalValue = value;
12343 visitor("tile_id", value);
12344 if (value != originalValue)
12345 setInherentAttr(prop, name: "tile_id", value);
12346 }
12347}
12348
12349::llvm::LogicalResult aarch64_sme_umops_za32::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12350 {
12351 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
12352 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
12353 return ::mlir::failure();
12354 }
12355 return ::mlir::success();
12356}
12357
12358::llvm::LogicalResult aarch64_sme_umops_za32::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
12359 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
12360 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
12361 return ::mlir::failure();
12362 return ::mlir::success();
12363}
12364
12365void aarch64_sme_umops_za32::writeProperties(::mlir::DialectBytecodeWriter &writer) {
12366 auto &prop = getProperties(); (void)prop;
12367 writer.writeAttribute(attr: prop.tile_id);
12368}
12369
12370uint32_t aarch64_sme_umops_za32::getTileId() {
12371 auto attr = getTileIdAttr();
12372 return attr.getValue().getZExtValue();
12373}
12374
12375void aarch64_sme_umops_za32::setTileId(uint32_t attrValue) {
12376 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
12377}
12378
12379void aarch64_sme_umops_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12380 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
12381}
12382
12383aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12384 ::mlir::OperationState __state__(location, getOperationName());
12385 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12386 auto __res__ = builder.create(state: __state__);
12387 assert((::llvm::isa<aarch64_sme_umops_za32>(__res__)) && "builder didn't return the right type");
12388 return ::llvm::cast<aarch64_sme_umops_za32>(Val: __res__);
12389}
12390
12391aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12392 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12393}
12394
12395void aarch64_sme_umops_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12396 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12397 odsState.addOperands(newOperands: lhs_predicate);
12398 odsState.addOperands(newOperands: rhs_predicate);
12399 odsState.addOperands(newOperands: lhs_vector);
12400 odsState.addOperands(newOperands: rhs_vector);
12401 odsProperties.tile_id = tile_id;
12402 assert(resultTypes.size() == 0u && "mismatched number of results");
12403 odsState.addTypes(newTypes&: resultTypes);
12404}
12405
12406aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12407 ::mlir::OperationState __state__(location, getOperationName());
12408 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12409 auto __res__ = builder.create(state: __state__);
12410 assert((::llvm::isa<aarch64_sme_umops_za32>(__res__)) && "builder didn't return the right type");
12411 return ::llvm::cast<aarch64_sme_umops_za32>(Val: __res__);
12412}
12413
12414aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12415 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12416}
12417
12418void aarch64_sme_umops_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12419 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
12420}
12421
12422aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12423 ::mlir::OperationState __state__(location, getOperationName());
12424 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12425 auto __res__ = builder.create(state: __state__);
12426 assert((::llvm::isa<aarch64_sme_umops_za32>(__res__)) && "builder didn't return the right type");
12427 return ::llvm::cast<aarch64_sme_umops_za32>(Val: __res__);
12428}
12429
12430aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12431 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12432}
12433
12434void aarch64_sme_umops_za32::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12435 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12436 odsState.addOperands(newOperands: lhs_predicate);
12437 odsState.addOperands(newOperands: rhs_predicate);
12438 odsState.addOperands(newOperands: lhs_vector);
12439 odsState.addOperands(newOperands: rhs_vector);
12440 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
12441 assert(resultTypes.size() == 0u && "mismatched number of results");
12442 odsState.addTypes(newTypes&: resultTypes);
12443}
12444
12445aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12446 ::mlir::OperationState __state__(location, getOperationName());
12447 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12448 auto __res__ = builder.create(state: __state__);
12449 assert((::llvm::isa<aarch64_sme_umops_za32>(__res__)) && "builder didn't return the right type");
12450 return ::llvm::cast<aarch64_sme_umops_za32>(Val: __res__);
12451}
12452
12453aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12454 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12455}
12456
12457void aarch64_sme_umops_za32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12458 assert(operands.size() == 4u && "mismatched number of parameters");
12459 odsState.addOperands(newOperands: operands);
12460 buildPropertiesAndDiscardableAttributes(odsState, attributes);
12461 assert(resultTypes.size() == 0u && "mismatched number of return types");
12462 odsState.addTypes(newTypes&: resultTypes);
12463}
12464
12465aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12466LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
12467
12468 ::mlir::OperationState __state__(location, getOperationName());
12469 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
12470 auto __res__ = builder.create(state: __state__);
12471 assert((::llvm::isa<aarch64_sme_umops_za32>(__res__)) && "builder didn't return the right type");
12472 return ::llvm::cast<aarch64_sme_umops_za32>(Val: __res__);
12473LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
12474}
12475
12476aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12477LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
12478
12479 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
12480LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
12481}
12482
12483void aarch64_sme_umops_za32::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12484 assert(operands.size() == 4u && "mismatched number of parameters");
12485 odsState.addOperands(newOperands: operands);
12486 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
12487 odsState.addAttributes(newAttributes: discardableAttributes);
12488 assert(resultTypes.size() == 0u && "mismatched number of return types");
12489 odsState.addTypes(newTypes&: resultTypes);
12490}
12491
12492aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12493 ::mlir::OperationState __state__(location, getOperationName());
12494 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
12495 auto __res__ = builder.create(state: __state__);
12496 assert((::llvm::isa<aarch64_sme_umops_za32>(__res__)) && "builder didn't return the right type");
12497 return ::llvm::cast<aarch64_sme_umops_za32>(Val: __res__);
12498}
12499
12500aarch64_sme_umops_za32 aarch64_sme_umops_za32::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12501 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
12502}
12503
12504::llvm::LogicalResult aarch64_sme_umops_za32::verifyInvariantsImpl() {
12505 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
12506 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
12507
12508 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
12509 return ::mlir::failure();
12510 {
12511 unsigned index = 0; (void)index;
12512 auto valueGroup0 = getODSOperands(index: 0);
12513
12514 for (auto v : valueGroup0) {
12515 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12516 return ::mlir::failure();
12517 }
12518 auto valueGroup1 = getODSOperands(index: 1);
12519
12520 for (auto v : valueGroup1) {
12521 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12522 return ::mlir::failure();
12523 }
12524 auto valueGroup2 = getODSOperands(index: 2);
12525
12526 for (auto v : valueGroup2) {
12527 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12528 return ::mlir::failure();
12529 }
12530 auto valueGroup3 = getODSOperands(index: 3);
12531
12532 for (auto v : valueGroup3) {
12533 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12534 return ::mlir::failure();
12535 }
12536 }
12537 return ::mlir::success();
12538}
12539
12540::llvm::LogicalResult aarch64_sme_umops_za32::verifyInvariants() {
12541 return verifyInvariantsImpl();
12542}
12543
12544::llvm::LogicalResult aarch64_sme_umops_za32::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12545 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12546 if (!dict) {
12547 emitError() << "expected DictionaryAttr to set properties";
12548 return ::mlir::failure();
12549 }
12550 // keep track of used keys in the input dictionary to be able to error out
12551 // if there are some unknown ones.
12552 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
12553 ::mlir::MLIRContext *ctx = dict.getContext();
12554 (void)ctx;
12555 {
12556
12557 auto &propStorage = prop.tile_id;
12558 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
12559 auto attr = dict.get(name: tile_idAttrName);
12560 usedKeys.insert(V: tile_idAttrName);
12561 if (attr || /*isRequired=*/true) {
12562 if (!attr) {
12563 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
12564 "Properties.";
12565 return ::mlir::failure();
12566 }
12567 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
12568 if (convertedAttr) {
12569 propStorage = convertedAttr;
12570 } else {
12571 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
12572 return ::mlir::failure();
12573 }
12574 }
12575 }
12576
12577 for (::mlir::NamedAttribute attr : dict) {
12578 if (!usedKeys.contains(V: attr.getName()))
12579 return emitError() << "unknown key '" << attr.getName() <<
12580 "' when parsing properties dictionary";
12581 }
12582 return ::mlir::success();
12583}
12584
12585void aarch64_sme_umops_za32::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12586 Properties &properties = odsState.getOrAddProperties<Properties>();
12587 populateDefaultProperties(opName: odsState.name, properties);
12588 const ::llvm::StringRef inherentNames[] = {"tile_id"};
12589 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
12590 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
12591 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
12592 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
12593 });
12594}
12595
12596
12597} // namespace mlir::arm_sme
12598MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_umops_za32)
12599MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_umops_za32GenericAdaptorBase::Properties)
12600
12601namespace mlir::arm_sme {
12602
12603
12604//===----------------------------------------------------------------------===//
12605// ::mlir::arm_sme::aarch64_sme_usmopa_wide definitions
12606//===----------------------------------------------------------------------===//
12607
12608namespace detail {
12609
12610aarch64_sme_usmopa_wideGenericAdaptorBase::aarch64_sme_usmopa_wideGenericAdaptorBase(aarch64_sme_usmopa_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
12611
12612uint32_t aarch64_sme_usmopa_wideGenericAdaptorBase::getTileId() {
12613 auto attr = getTileIdAttr();
12614 return attr.getValue().getZExtValue();
12615}
12616
12617
12618} // namespace detail
12619aarch64_sme_usmopa_wideAdaptor::aarch64_sme_usmopa_wideAdaptor(aarch64_sme_usmopa_wide op) : aarch64_sme_usmopa_wideGenericAdaptor(op->getOperands(), op) {}
12620
12621::llvm::LogicalResult aarch64_sme_usmopa_wideAdaptor::verify(::mlir::Location loc) {
12622 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
12623 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.usmopa.wide' op requires attribute 'tile_id'");
12624
12625 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
12626 return emitError(loc, message: "'arm_sme.intr.usmopa.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
12627 return ::mlir::success();
12628}
12629
12630::llvm::LogicalResult aarch64_sme_usmopa_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12631 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12632 if (!dict) {
12633 emitError() << "expected DictionaryAttr to set properties";
12634 return ::mlir::failure();
12635 }
12636
12637 {
12638 auto attr = dict.get(name: "tile_id");
12639 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
12640 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
12641 return ::mlir::failure();
12642 }
12643 return ::mlir::success();
12644}
12645
12646::mlir::Attribute aarch64_sme_usmopa_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
12647 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
12648 ::mlir::Builder odsBuilder{ctx};
12649 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
12650
12651 if (!attrs.empty())
12652 return odsBuilder.getDictionaryAttr(value: attrs);
12653 return {};
12654}
12655
12656llvm::hash_code aarch64_sme_usmopa_wide::computePropertiesHash(const Properties &prop) {
12657 using llvm::hash_value;
12658 return llvm::hash_combine(
12659 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
12660}
12661
12662std::optional<mlir::Attribute> aarch64_sme_usmopa_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
12663 if (name == "tile_id")
12664 return prop.tile_id;
12665 return std::nullopt;
12666}
12667
12668void aarch64_sme_usmopa_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
12669 if (name == "tile_id") {
12670 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
12671 return;
12672 }
12673}
12674
12675void aarch64_sme_usmopa_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
12676 if (prop.tile_id) {
12677 ::mlir::Attribute value = prop.tile_id;
12678 ::mlir::Attribute originalValue = value;
12679 visitor("tile_id", value);
12680 if (value != originalValue)
12681 setInherentAttr(prop, name: "tile_id", value);
12682 }
12683}
12684
12685::llvm::LogicalResult aarch64_sme_usmopa_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12686 {
12687 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
12688 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
12689 return ::mlir::failure();
12690 }
12691 return ::mlir::success();
12692}
12693
12694::llvm::LogicalResult aarch64_sme_usmopa_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
12695 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
12696 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
12697 return ::mlir::failure();
12698 return ::mlir::success();
12699}
12700
12701void aarch64_sme_usmopa_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
12702 auto &prop = getProperties(); (void)prop;
12703 writer.writeAttribute(attr: prop.tile_id);
12704}
12705
12706uint32_t aarch64_sme_usmopa_wide::getTileId() {
12707 auto attr = getTileIdAttr();
12708 return attr.getValue().getZExtValue();
12709}
12710
12711void aarch64_sme_usmopa_wide::setTileId(uint32_t attrValue) {
12712 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
12713}
12714
12715void aarch64_sme_usmopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12716 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
12717}
12718
12719aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12720 ::mlir::OperationState __state__(location, getOperationName());
12721 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12722 auto __res__ = builder.create(state: __state__);
12723 assert((::llvm::isa<aarch64_sme_usmopa_wide>(__res__)) && "builder didn't return the right type");
12724 return ::llvm::cast<aarch64_sme_usmopa_wide>(Val: __res__);
12725}
12726
12727aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12728 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12729}
12730
12731void aarch64_sme_usmopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12732 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12733 odsState.addOperands(newOperands: lhs_predicate);
12734 odsState.addOperands(newOperands: rhs_predicate);
12735 odsState.addOperands(newOperands: lhs_vector);
12736 odsState.addOperands(newOperands: rhs_vector);
12737 odsProperties.tile_id = tile_id;
12738 assert(resultTypes.size() == 0u && "mismatched number of results");
12739 odsState.addTypes(newTypes&: resultTypes);
12740}
12741
12742aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12743 ::mlir::OperationState __state__(location, getOperationName());
12744 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12745 auto __res__ = builder.create(state: __state__);
12746 assert((::llvm::isa<aarch64_sme_usmopa_wide>(__res__)) && "builder didn't return the right type");
12747 return ::llvm::cast<aarch64_sme_usmopa_wide>(Val: __res__);
12748}
12749
12750aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12751 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12752}
12753
12754void aarch64_sme_usmopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12755 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
12756}
12757
12758aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12759 ::mlir::OperationState __state__(location, getOperationName());
12760 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12761 auto __res__ = builder.create(state: __state__);
12762 assert((::llvm::isa<aarch64_sme_usmopa_wide>(__res__)) && "builder didn't return the right type");
12763 return ::llvm::cast<aarch64_sme_usmopa_wide>(Val: __res__);
12764}
12765
12766aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12767 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12768}
12769
12770void aarch64_sme_usmopa_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12771 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12772 odsState.addOperands(newOperands: lhs_predicate);
12773 odsState.addOperands(newOperands: rhs_predicate);
12774 odsState.addOperands(newOperands: lhs_vector);
12775 odsState.addOperands(newOperands: rhs_vector);
12776 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
12777 assert(resultTypes.size() == 0u && "mismatched number of results");
12778 odsState.addTypes(newTypes&: resultTypes);
12779}
12780
12781aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12782 ::mlir::OperationState __state__(location, getOperationName());
12783 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12784 auto __res__ = builder.create(state: __state__);
12785 assert((::llvm::isa<aarch64_sme_usmopa_wide>(__res__)) && "builder didn't return the right type");
12786 return ::llvm::cast<aarch64_sme_usmopa_wide>(Val: __res__);
12787}
12788
12789aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
12790 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
12791}
12792
12793void aarch64_sme_usmopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12794 assert(operands.size() == 4u && "mismatched number of parameters");
12795 odsState.addOperands(newOperands: operands);
12796 buildPropertiesAndDiscardableAttributes(odsState, attributes);
12797 assert(resultTypes.size() == 0u && "mismatched number of return types");
12798 odsState.addTypes(newTypes&: resultTypes);
12799}
12800
12801aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12802LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
12803
12804 ::mlir::OperationState __state__(location, getOperationName());
12805 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
12806 auto __res__ = builder.create(state: __state__);
12807 assert((::llvm::isa<aarch64_sme_usmopa_wide>(__res__)) && "builder didn't return the right type");
12808 return ::llvm::cast<aarch64_sme_usmopa_wide>(Val: __res__);
12809LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
12810}
12811
12812aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12813LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
12814
12815 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
12816LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
12817}
12818
12819void aarch64_sme_usmopa_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12820 assert(operands.size() == 4u && "mismatched number of parameters");
12821 odsState.addOperands(newOperands: operands);
12822 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
12823 odsState.addAttributes(newAttributes: discardableAttributes);
12824 assert(resultTypes.size() == 0u && "mismatched number of return types");
12825 odsState.addTypes(newTypes&: resultTypes);
12826}
12827
12828aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12829 ::mlir::OperationState __state__(location, getOperationName());
12830 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
12831 auto __res__ = builder.create(state: __state__);
12832 assert((::llvm::isa<aarch64_sme_usmopa_wide>(__res__)) && "builder didn't return the right type");
12833 return ::llvm::cast<aarch64_sme_usmopa_wide>(Val: __res__);
12834}
12835
12836aarch64_sme_usmopa_wide aarch64_sme_usmopa_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12837 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
12838}
12839
12840::llvm::LogicalResult aarch64_sme_usmopa_wide::verifyInvariantsImpl() {
12841 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
12842 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
12843
12844 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
12845 return ::mlir::failure();
12846 {
12847 unsigned index = 0; (void)index;
12848 auto valueGroup0 = getODSOperands(index: 0);
12849
12850 for (auto v : valueGroup0) {
12851 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12852 return ::mlir::failure();
12853 }
12854 auto valueGroup1 = getODSOperands(index: 1);
12855
12856 for (auto v : valueGroup1) {
12857 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12858 return ::mlir::failure();
12859 }
12860 auto valueGroup2 = getODSOperands(index: 2);
12861
12862 for (auto v : valueGroup2) {
12863 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12864 return ::mlir::failure();
12865 }
12866 auto valueGroup3 = getODSOperands(index: 3);
12867
12868 for (auto v : valueGroup3) {
12869 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12870 return ::mlir::failure();
12871 }
12872 }
12873 return ::mlir::success();
12874}
12875
12876::llvm::LogicalResult aarch64_sme_usmopa_wide::verifyInvariants() {
12877 return verifyInvariantsImpl();
12878}
12879
12880::llvm::LogicalResult aarch64_sme_usmopa_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12881 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12882 if (!dict) {
12883 emitError() << "expected DictionaryAttr to set properties";
12884 return ::mlir::failure();
12885 }
12886 // keep track of used keys in the input dictionary to be able to error out
12887 // if there are some unknown ones.
12888 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
12889 ::mlir::MLIRContext *ctx = dict.getContext();
12890 (void)ctx;
12891 {
12892
12893 auto &propStorage = prop.tile_id;
12894 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
12895 auto attr = dict.get(name: tile_idAttrName);
12896 usedKeys.insert(V: tile_idAttrName);
12897 if (attr || /*isRequired=*/true) {
12898 if (!attr) {
12899 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
12900 "Properties.";
12901 return ::mlir::failure();
12902 }
12903 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
12904 if (convertedAttr) {
12905 propStorage = convertedAttr;
12906 } else {
12907 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
12908 return ::mlir::failure();
12909 }
12910 }
12911 }
12912
12913 for (::mlir::NamedAttribute attr : dict) {
12914 if (!usedKeys.contains(V: attr.getName()))
12915 return emitError() << "unknown key '" << attr.getName() <<
12916 "' when parsing properties dictionary";
12917 }
12918 return ::mlir::success();
12919}
12920
12921void aarch64_sme_usmopa_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12922 Properties &properties = odsState.getOrAddProperties<Properties>();
12923 populateDefaultProperties(opName: odsState.name, properties);
12924 const ::llvm::StringRef inherentNames[] = {"tile_id"};
12925 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
12926 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
12927 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
12928 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
12929 });
12930}
12931
12932
12933} // namespace mlir::arm_sme
12934MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_usmopa_wide)
12935MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_usmopa_wideGenericAdaptorBase::Properties)
12936
12937namespace mlir::arm_sme {
12938
12939
12940//===----------------------------------------------------------------------===//
12941// ::mlir::arm_sme::aarch64_sme_usmops_wide definitions
12942//===----------------------------------------------------------------------===//
12943
12944namespace detail {
12945
12946aarch64_sme_usmops_wideGenericAdaptorBase::aarch64_sme_usmops_wideGenericAdaptorBase(aarch64_sme_usmops_wide op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
12947
12948uint32_t aarch64_sme_usmops_wideGenericAdaptorBase::getTileId() {
12949 auto attr = getTileIdAttr();
12950 return attr.getValue().getZExtValue();
12951}
12952
12953
12954} // namespace detail
12955aarch64_sme_usmops_wideAdaptor::aarch64_sme_usmops_wideAdaptor(aarch64_sme_usmops_wide op) : aarch64_sme_usmops_wideGenericAdaptor(op->getOperands(), op) {}
12956
12957::llvm::LogicalResult aarch64_sme_usmops_wideAdaptor::verify(::mlir::Location loc) {
12958 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
12959 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.usmops.wide' op requires attribute 'tile_id'");
12960
12961 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
12962 return emitError(loc, message: "'arm_sme.intr.usmops.wide' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
12963 return ::mlir::success();
12964}
12965
12966::llvm::LogicalResult aarch64_sme_usmops_wide::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12967 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12968 if (!dict) {
12969 emitError() << "expected DictionaryAttr to set properties";
12970 return ::mlir::failure();
12971 }
12972
12973 {
12974 auto attr = dict.get(name: "tile_id");
12975 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
12976 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
12977 return ::mlir::failure();
12978 }
12979 return ::mlir::success();
12980}
12981
12982::mlir::Attribute aarch64_sme_usmops_wide::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
12983 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
12984 ::mlir::Builder odsBuilder{ctx};
12985 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
12986
12987 if (!attrs.empty())
12988 return odsBuilder.getDictionaryAttr(value: attrs);
12989 return {};
12990}
12991
12992llvm::hash_code aarch64_sme_usmops_wide::computePropertiesHash(const Properties &prop) {
12993 using llvm::hash_value;
12994 return llvm::hash_combine(
12995 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
12996}
12997
12998std::optional<mlir::Attribute> aarch64_sme_usmops_wide::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
12999 if (name == "tile_id")
13000 return prop.tile_id;
13001 return std::nullopt;
13002}
13003
13004void aarch64_sme_usmops_wide::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
13005 if (name == "tile_id") {
13006 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
13007 return;
13008 }
13009}
13010
13011void aarch64_sme_usmops_wide::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
13012 if (prop.tile_id) {
13013 ::mlir::Attribute value = prop.tile_id;
13014 ::mlir::Attribute originalValue = value;
13015 visitor("tile_id", value);
13016 if (value != originalValue)
13017 setInherentAttr(prop, name: "tile_id", value);
13018 }
13019}
13020
13021::llvm::LogicalResult aarch64_sme_usmops_wide::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13022 {
13023 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
13024 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
13025 return ::mlir::failure();
13026 }
13027 return ::mlir::success();
13028}
13029
13030::llvm::LogicalResult aarch64_sme_usmops_wide::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
13031 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
13032 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
13033 return ::mlir::failure();
13034 return ::mlir::success();
13035}
13036
13037void aarch64_sme_usmops_wide::writeProperties(::mlir::DialectBytecodeWriter &writer) {
13038 auto &prop = getProperties(); (void)prop;
13039 writer.writeAttribute(attr: prop.tile_id);
13040}
13041
13042uint32_t aarch64_sme_usmops_wide::getTileId() {
13043 auto attr = getTileIdAttr();
13044 return attr.getValue().getZExtValue();
13045}
13046
13047void aarch64_sme_usmops_wide::setTileId(uint32_t attrValue) {
13048 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
13049}
13050
13051void aarch64_sme_usmops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13052 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
13053}
13054
13055aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13056 ::mlir::OperationState __state__(location, getOperationName());
13057 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
13058 auto __res__ = builder.create(state: __state__);
13059 assert((::llvm::isa<aarch64_sme_usmops_wide>(__res__)) && "builder didn't return the right type");
13060 return ::llvm::cast<aarch64_sme_usmops_wide>(Val: __res__);
13061}
13062
13063aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13064 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
13065}
13066
13067void aarch64_sme_usmops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13068 auto &odsProperties = odsState.getOrAddProperties<Properties>();
13069 odsState.addOperands(newOperands: lhs_predicate);
13070 odsState.addOperands(newOperands: rhs_predicate);
13071 odsState.addOperands(newOperands: lhs_vector);
13072 odsState.addOperands(newOperands: rhs_vector);
13073 odsProperties.tile_id = tile_id;
13074 assert(resultTypes.size() == 0u && "mismatched number of results");
13075 odsState.addTypes(newTypes&: resultTypes);
13076}
13077
13078aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13079 ::mlir::OperationState __state__(location, getOperationName());
13080 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
13081 auto __res__ = builder.create(state: __state__);
13082 assert((::llvm::isa<aarch64_sme_usmops_wide>(__res__)) && "builder didn't return the right type");
13083 return ::llvm::cast<aarch64_sme_usmops_wide>(Val: __res__);
13084}
13085
13086aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13087 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
13088}
13089
13090void aarch64_sme_usmops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13091 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, lhs_predicate, rhs_predicate, lhs_vector, rhs_vector);
13092}
13093
13094aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13095 ::mlir::OperationState __state__(location, getOperationName());
13096 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
13097 auto __res__ = builder.create(state: __state__);
13098 assert((::llvm::isa<aarch64_sme_usmops_wide>(__res__)) && "builder didn't return the right type");
13099 return ::llvm::cast<aarch64_sme_usmops_wide>(Val: __res__);
13100}
13101
13102aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13103 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
13104}
13105
13106void aarch64_sme_usmops_wide::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13107 auto &odsProperties = odsState.getOrAddProperties<Properties>();
13108 odsState.addOperands(newOperands: lhs_predicate);
13109 odsState.addOperands(newOperands: rhs_predicate);
13110 odsState.addOperands(newOperands: lhs_vector);
13111 odsState.addOperands(newOperands: rhs_vector);
13112 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
13113 assert(resultTypes.size() == 0u && "mismatched number of results");
13114 odsState.addTypes(newTypes&: resultTypes);
13115}
13116
13117aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13118 ::mlir::OperationState __state__(location, getOperationName());
13119 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
13120 auto __res__ = builder.create(state: __state__);
13121 assert((::llvm::isa<aarch64_sme_usmops_wide>(__res__)) && "builder didn't return the right type");
13122 return ::llvm::cast<aarch64_sme_usmops_wide>(Val: __res__);
13123}
13124
13125aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value lhs_predicate, ::mlir::Value rhs_predicate, ::mlir::Value lhs_vector, ::mlir::Value rhs_vector) {
13126 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), lhs_predicate: std::forward<decltype(lhs_predicate)>(t&: lhs_predicate), rhs_predicate: std::forward<decltype(rhs_predicate)>(t&: rhs_predicate), lhs_vector: std::forward<decltype(lhs_vector)>(t&: lhs_vector), rhs_vector: std::forward<decltype(rhs_vector)>(t&: rhs_vector));
13127}
13128
13129void aarch64_sme_usmops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13130 assert(operands.size() == 4u && "mismatched number of parameters");
13131 odsState.addOperands(newOperands: operands);
13132 buildPropertiesAndDiscardableAttributes(odsState, attributes);
13133 assert(resultTypes.size() == 0u && "mismatched number of return types");
13134 odsState.addTypes(newTypes&: resultTypes);
13135}
13136
13137aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13138LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
13139
13140 ::mlir::OperationState __state__(location, getOperationName());
13141 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
13142 auto __res__ = builder.create(state: __state__);
13143 assert((::llvm::isa<aarch64_sme_usmops_wide>(__res__)) && "builder didn't return the right type");
13144 return ::llvm::cast<aarch64_sme_usmops_wide>(Val: __res__);
13145LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
13146}
13147
13148aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13149LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
13150
13151 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
13152LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
13153}
13154
13155void aarch64_sme_usmops_wide::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13156 assert(operands.size() == 4u && "mismatched number of parameters");
13157 odsState.addOperands(newOperands: operands);
13158 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
13159 odsState.addAttributes(newAttributes: discardableAttributes);
13160 assert(resultTypes.size() == 0u && "mismatched number of return types");
13161 odsState.addTypes(newTypes&: resultTypes);
13162}
13163
13164aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13165 ::mlir::OperationState __state__(location, getOperationName());
13166 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
13167 auto __res__ = builder.create(state: __state__);
13168 assert((::llvm::isa<aarch64_sme_usmops_wide>(__res__)) && "builder didn't return the right type");
13169 return ::llvm::cast<aarch64_sme_usmops_wide>(Val: __res__);
13170}
13171
13172aarch64_sme_usmops_wide aarch64_sme_usmops_wide::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13173 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
13174}
13175
13176::llvm::LogicalResult aarch64_sme_usmops_wide::verifyInvariantsImpl() {
13177 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
13178 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
13179
13180 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
13181 return ::mlir::failure();
13182 {
13183 unsigned index = 0; (void)index;
13184 auto valueGroup0 = getODSOperands(index: 0);
13185
13186 for (auto v : valueGroup0) {
13187 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13188 return ::mlir::failure();
13189 }
13190 auto valueGroup1 = getODSOperands(index: 1);
13191
13192 for (auto v : valueGroup1) {
13193 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13194 return ::mlir::failure();
13195 }
13196 auto valueGroup2 = getODSOperands(index: 2);
13197
13198 for (auto v : valueGroup2) {
13199 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13200 return ::mlir::failure();
13201 }
13202 auto valueGroup3 = getODSOperands(index: 3);
13203
13204 for (auto v : valueGroup3) {
13205 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13206 return ::mlir::failure();
13207 }
13208 }
13209 return ::mlir::success();
13210}
13211
13212::llvm::LogicalResult aarch64_sme_usmops_wide::verifyInvariants() {
13213 return verifyInvariantsImpl();
13214}
13215
13216::llvm::LogicalResult aarch64_sme_usmops_wide::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13217 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13218 if (!dict) {
13219 emitError() << "expected DictionaryAttr to set properties";
13220 return ::mlir::failure();
13221 }
13222 // keep track of used keys in the input dictionary to be able to error out
13223 // if there are some unknown ones.
13224 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
13225 ::mlir::MLIRContext *ctx = dict.getContext();
13226 (void)ctx;
13227 {
13228
13229 auto &propStorage = prop.tile_id;
13230 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
13231 auto attr = dict.get(name: tile_idAttrName);
13232 usedKeys.insert(V: tile_idAttrName);
13233 if (attr || /*isRequired=*/true) {
13234 if (!attr) {
13235 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
13236 "Properties.";
13237 return ::mlir::failure();
13238 }
13239 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
13240 if (convertedAttr) {
13241 propStorage = convertedAttr;
13242 } else {
13243 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
13244 return ::mlir::failure();
13245 }
13246 }
13247 }
13248
13249 for (::mlir::NamedAttribute attr : dict) {
13250 if (!usedKeys.contains(V: attr.getName()))
13251 return emitError() << "unknown key '" << attr.getName() <<
13252 "' when parsing properties dictionary";
13253 }
13254 return ::mlir::success();
13255}
13256
13257void aarch64_sme_usmops_wide::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13258 Properties &properties = odsState.getOrAddProperties<Properties>();
13259 populateDefaultProperties(opName: odsState.name, properties);
13260 const ::llvm::StringRef inherentNames[] = {"tile_id"};
13261 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
13262 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
13263 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
13264 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
13265 });
13266}
13267
13268
13269} // namespace mlir::arm_sme
13270MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_usmops_wide)
13271MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_usmops_wideGenericAdaptorBase::Properties)
13272
13273namespace mlir::arm_sme {
13274
13275
13276//===----------------------------------------------------------------------===//
13277// ::mlir::arm_sme::aarch64_sme_write_horiz definitions
13278//===----------------------------------------------------------------------===//
13279
13280namespace detail {
13281
13282aarch64_sme_write_horizGenericAdaptorBase::aarch64_sme_write_horizGenericAdaptorBase(aarch64_sme_write_horiz op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
13283
13284uint32_t aarch64_sme_write_horizGenericAdaptorBase::getTileId() {
13285 auto attr = getTileIdAttr();
13286 return attr.getValue().getZExtValue();
13287}
13288
13289
13290} // namespace detail
13291aarch64_sme_write_horizAdaptor::aarch64_sme_write_horizAdaptor(aarch64_sme_write_horiz op) : aarch64_sme_write_horizGenericAdaptor(op->getOperands(), op) {}
13292
13293::llvm::LogicalResult aarch64_sme_write_horizAdaptor::verify(::mlir::Location loc) {
13294 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
13295 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.write.horiz' op requires attribute 'tile_id'");
13296
13297 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
13298 return emitError(loc, message: "'arm_sme.intr.write.horiz' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
13299 return ::mlir::success();
13300}
13301
13302::llvm::LogicalResult aarch64_sme_write_horiz::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13303 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13304 if (!dict) {
13305 emitError() << "expected DictionaryAttr to set properties";
13306 return ::mlir::failure();
13307 }
13308
13309 {
13310 auto attr = dict.get(name: "tile_id");
13311 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
13312 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
13313 return ::mlir::failure();
13314 }
13315 return ::mlir::success();
13316}
13317
13318::mlir::Attribute aarch64_sme_write_horiz::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
13319 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
13320 ::mlir::Builder odsBuilder{ctx};
13321 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
13322
13323 if (!attrs.empty())
13324 return odsBuilder.getDictionaryAttr(value: attrs);
13325 return {};
13326}
13327
13328llvm::hash_code aarch64_sme_write_horiz::computePropertiesHash(const Properties &prop) {
13329 using llvm::hash_value;
13330 return llvm::hash_combine(
13331 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
13332}
13333
13334std::optional<mlir::Attribute> aarch64_sme_write_horiz::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
13335 if (name == "tile_id")
13336 return prop.tile_id;
13337 return std::nullopt;
13338}
13339
13340void aarch64_sme_write_horiz::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
13341 if (name == "tile_id") {
13342 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
13343 return;
13344 }
13345}
13346
13347void aarch64_sme_write_horiz::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
13348 if (prop.tile_id) {
13349 ::mlir::Attribute value = prop.tile_id;
13350 ::mlir::Attribute originalValue = value;
13351 visitor("tile_id", value);
13352 if (value != originalValue)
13353 setInherentAttr(prop, name: "tile_id", value);
13354 }
13355}
13356
13357::llvm::LogicalResult aarch64_sme_write_horiz::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13358 {
13359 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
13360 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
13361 return ::mlir::failure();
13362 }
13363 return ::mlir::success();
13364}
13365
13366::llvm::LogicalResult aarch64_sme_write_horiz::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
13367 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
13368 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
13369 return ::mlir::failure();
13370 return ::mlir::success();
13371}
13372
13373void aarch64_sme_write_horiz::writeProperties(::mlir::DialectBytecodeWriter &writer) {
13374 auto &prop = getProperties(); (void)prop;
13375 writer.writeAttribute(attr: prop.tile_id);
13376}
13377
13378uint32_t aarch64_sme_write_horiz::getTileId() {
13379 auto attr = getTileIdAttr();
13380 return attr.getValue().getZExtValue();
13381}
13382
13383void aarch64_sme_write_horiz::setTileId(uint32_t attrValue) {
13384 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
13385}
13386
13387void aarch64_sme_write_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13388 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, tile_slice_index, predicate, vector);
13389}
13390
13391aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13392 ::mlir::OperationState __state__(location, getOperationName());
13393 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13394 auto __res__ = builder.create(state: __state__);
13395 assert((::llvm::isa<aarch64_sme_write_horiz>(__res__)) && "builder didn't return the right type");
13396 return ::llvm::cast<aarch64_sme_write_horiz>(Val: __res__);
13397}
13398
13399aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13400 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13401}
13402
13403void aarch64_sme_write_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13404 auto &odsProperties = odsState.getOrAddProperties<Properties>();
13405 odsState.addOperands(newOperands: tile_slice_index);
13406 odsState.addOperands(newOperands: predicate);
13407 odsState.addOperands(newOperands: vector);
13408 odsProperties.tile_id = tile_id;
13409 assert(resultTypes.size() == 0u && "mismatched number of results");
13410 odsState.addTypes(newTypes&: resultTypes);
13411}
13412
13413aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13414 ::mlir::OperationState __state__(location, getOperationName());
13415 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13416 auto __res__ = builder.create(state: __state__);
13417 assert((::llvm::isa<aarch64_sme_write_horiz>(__res__)) && "builder didn't return the right type");
13418 return ::llvm::cast<aarch64_sme_write_horiz>(Val: __res__);
13419}
13420
13421aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13422 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13423}
13424
13425void aarch64_sme_write_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13426 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, tile_slice_index, predicate, vector);
13427}
13428
13429aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13430 ::mlir::OperationState __state__(location, getOperationName());
13431 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13432 auto __res__ = builder.create(state: __state__);
13433 assert((::llvm::isa<aarch64_sme_write_horiz>(__res__)) && "builder didn't return the right type");
13434 return ::llvm::cast<aarch64_sme_write_horiz>(Val: __res__);
13435}
13436
13437aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13438 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13439}
13440
13441void aarch64_sme_write_horiz::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13442 auto &odsProperties = odsState.getOrAddProperties<Properties>();
13443 odsState.addOperands(newOperands: tile_slice_index);
13444 odsState.addOperands(newOperands: predicate);
13445 odsState.addOperands(newOperands: vector);
13446 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
13447 assert(resultTypes.size() == 0u && "mismatched number of results");
13448 odsState.addTypes(newTypes&: resultTypes);
13449}
13450
13451aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13452 ::mlir::OperationState __state__(location, getOperationName());
13453 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13454 auto __res__ = builder.create(state: __state__);
13455 assert((::llvm::isa<aarch64_sme_write_horiz>(__res__)) && "builder didn't return the right type");
13456 return ::llvm::cast<aarch64_sme_write_horiz>(Val: __res__);
13457}
13458
13459aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13460 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13461}
13462
13463void aarch64_sme_write_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13464 assert(operands.size() == 3u && "mismatched number of parameters");
13465 odsState.addOperands(newOperands: operands);
13466 buildPropertiesAndDiscardableAttributes(odsState, attributes);
13467 assert(resultTypes.size() == 0u && "mismatched number of return types");
13468 odsState.addTypes(newTypes&: resultTypes);
13469}
13470
13471aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13472LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
13473
13474 ::mlir::OperationState __state__(location, getOperationName());
13475 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
13476 auto __res__ = builder.create(state: __state__);
13477 assert((::llvm::isa<aarch64_sme_write_horiz>(__res__)) && "builder didn't return the right type");
13478 return ::llvm::cast<aarch64_sme_write_horiz>(Val: __res__);
13479LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
13480}
13481
13482aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13483LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
13484
13485 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
13486LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
13487}
13488
13489void aarch64_sme_write_horiz::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13490 assert(operands.size() == 3u && "mismatched number of parameters");
13491 odsState.addOperands(newOperands: operands);
13492 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
13493 odsState.addAttributes(newAttributes: discardableAttributes);
13494 assert(resultTypes.size() == 0u && "mismatched number of return types");
13495 odsState.addTypes(newTypes&: resultTypes);
13496}
13497
13498aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13499 ::mlir::OperationState __state__(location, getOperationName());
13500 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
13501 auto __res__ = builder.create(state: __state__);
13502 assert((::llvm::isa<aarch64_sme_write_horiz>(__res__)) && "builder didn't return the right type");
13503 return ::llvm::cast<aarch64_sme_write_horiz>(Val: __res__);
13504}
13505
13506aarch64_sme_write_horiz aarch64_sme_write_horiz::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13507 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
13508}
13509
13510::llvm::LogicalResult aarch64_sme_write_horiz::verifyInvariantsImpl() {
13511 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
13512 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
13513
13514 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
13515 return ::mlir::failure();
13516 {
13517 unsigned index = 0; (void)index;
13518 auto valueGroup0 = getODSOperands(index: 0);
13519
13520 for (auto v : valueGroup0) {
13521 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13522 return ::mlir::failure();
13523 }
13524 auto valueGroup1 = getODSOperands(index: 1);
13525
13526 for (auto v : valueGroup1) {
13527 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13528 return ::mlir::failure();
13529 }
13530 auto valueGroup2 = getODSOperands(index: 2);
13531
13532 for (auto v : valueGroup2) {
13533 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps7(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13534 return ::mlir::failure();
13535 }
13536 }
13537 if (!(((::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 1).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 2).begin()).getType()).getShape()) && (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 2).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 1).begin()).getType()).getShape()))))
13538 return emitOpError(message: "failed to verify that all of {predicate, vector} have same shape");
13539 return ::mlir::success();
13540}
13541
13542::llvm::LogicalResult aarch64_sme_write_horiz::verifyInvariants() {
13543 return verifyInvariantsImpl();
13544}
13545
13546::llvm::LogicalResult aarch64_sme_write_horiz::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13547 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13548 if (!dict) {
13549 emitError() << "expected DictionaryAttr to set properties";
13550 return ::mlir::failure();
13551 }
13552 // keep track of used keys in the input dictionary to be able to error out
13553 // if there are some unknown ones.
13554 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
13555 ::mlir::MLIRContext *ctx = dict.getContext();
13556 (void)ctx;
13557 {
13558
13559 auto &propStorage = prop.tile_id;
13560 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
13561 auto attr = dict.get(name: tile_idAttrName);
13562 usedKeys.insert(V: tile_idAttrName);
13563 if (attr || /*isRequired=*/true) {
13564 if (!attr) {
13565 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
13566 "Properties.";
13567 return ::mlir::failure();
13568 }
13569 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
13570 if (convertedAttr) {
13571 propStorage = convertedAttr;
13572 } else {
13573 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
13574 return ::mlir::failure();
13575 }
13576 }
13577 }
13578
13579 for (::mlir::NamedAttribute attr : dict) {
13580 if (!usedKeys.contains(V: attr.getName()))
13581 return emitError() << "unknown key '" << attr.getName() <<
13582 "' when parsing properties dictionary";
13583 }
13584 return ::mlir::success();
13585}
13586
13587void aarch64_sme_write_horiz::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13588 Properties &properties = odsState.getOrAddProperties<Properties>();
13589 populateDefaultProperties(opName: odsState.name, properties);
13590 const ::llvm::StringRef inherentNames[] = {"tile_id"};
13591 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
13592 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
13593 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
13594 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
13595 });
13596}
13597
13598
13599} // namespace mlir::arm_sme
13600MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_write_horiz)
13601MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_write_horizGenericAdaptorBase::Properties)
13602
13603namespace mlir::arm_sme {
13604
13605
13606//===----------------------------------------------------------------------===//
13607// ::mlir::arm_sme::aarch64_sme_write_vert definitions
13608//===----------------------------------------------------------------------===//
13609
13610namespace detail {
13611
13612aarch64_sme_write_vertGenericAdaptorBase::aarch64_sme_write_vertGenericAdaptorBase(aarch64_sme_write_vert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
13613
13614uint32_t aarch64_sme_write_vertGenericAdaptorBase::getTileId() {
13615 auto attr = getTileIdAttr();
13616 return attr.getValue().getZExtValue();
13617}
13618
13619
13620} // namespace detail
13621aarch64_sme_write_vertAdaptor::aarch64_sme_write_vertAdaptor(aarch64_sme_write_vert op) : aarch64_sme_write_vertGenericAdaptor(op->getOperands(), op) {}
13622
13623::llvm::LogicalResult aarch64_sme_write_vertAdaptor::verify(::mlir::Location loc) {
13624 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
13625 if (!tblgen_tile_id) return emitError(loc, message: "'arm_sme.intr.write.vert' op requires attribute 'tile_id'");
13626
13627 if (tblgen_tile_id && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_id))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_id).getType().isSignlessInteger(width: 32)))))
13628 return emitError(loc, message: "'arm_sme.intr.write.vert' op attribute 'tile_id' failed to satisfy constraint: 32-bit signless integer attribute");
13629 return ::mlir::success();
13630}
13631
13632::llvm::LogicalResult aarch64_sme_write_vert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13633 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13634 if (!dict) {
13635 emitError() << "expected DictionaryAttr to set properties";
13636 return ::mlir::failure();
13637 }
13638
13639 {
13640 auto attr = dict.get(name: "tile_id");
13641 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
13642 storage&: prop.tile_id, attr, name: "tile_id", emitError)))
13643 return ::mlir::failure();
13644 }
13645 return ::mlir::success();
13646}
13647
13648::mlir::Attribute aarch64_sme_write_vert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
13649 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
13650 ::mlir::Builder odsBuilder{ctx};
13651 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_id", attr: prop.tile_id);
13652
13653 if (!attrs.empty())
13654 return odsBuilder.getDictionaryAttr(value: attrs);
13655 return {};
13656}
13657
13658llvm::hash_code aarch64_sme_write_vert::computePropertiesHash(const Properties &prop) {
13659 using llvm::hash_value;
13660 return llvm::hash_combine(
13661 args: llvm::hash_value(ptr: prop.tile_id.getAsOpaquePointer()));
13662}
13663
13664std::optional<mlir::Attribute> aarch64_sme_write_vert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
13665 if (name == "tile_id")
13666 return prop.tile_id;
13667 return std::nullopt;
13668}
13669
13670void aarch64_sme_write_vert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
13671 if (name == "tile_id") {
13672 prop.tile_id = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_id)>>(Val&: value);
13673 return;
13674 }
13675}
13676
13677void aarch64_sme_write_vert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
13678 if (prop.tile_id) {
13679 ::mlir::Attribute value = prop.tile_id;
13680 ::mlir::Attribute originalValue = value;
13681 visitor("tile_id", value);
13682 if (value != originalValue)
13683 setInherentAttr(prop, name: "tile_id", value);
13684 }
13685}
13686
13687::llvm::LogicalResult aarch64_sme_write_vert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13688 {
13689 ::mlir::Attribute attr = attrs.get(name: getTileIdAttrName(name: opName));
13690 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_id", emitError)))
13691 return ::mlir::failure();
13692 }
13693 return ::mlir::success();
13694}
13695
13696::llvm::LogicalResult aarch64_sme_write_vert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
13697 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
13698 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_id)))
13699 return ::mlir::failure();
13700 return ::mlir::success();
13701}
13702
13703void aarch64_sme_write_vert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
13704 auto &prop = getProperties(); (void)prop;
13705 writer.writeAttribute(attr: prop.tile_id);
13706}
13707
13708uint32_t aarch64_sme_write_vert::getTileId() {
13709 auto attr = getTileIdAttr();
13710 return attr.getValue().getZExtValue();
13711}
13712
13713void aarch64_sme_write_vert::setTileId(uint32_t attrValue) {
13714 getProperties().tile_id = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
13715}
13716
13717void aarch64_sme_write_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13718 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, tile_slice_index, predicate, vector);
13719}
13720
13721aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13722 ::mlir::OperationState __state__(location, getOperationName());
13723 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13724 auto __res__ = builder.create(state: __state__);
13725 assert((::llvm::isa<aarch64_sme_write_vert>(__res__)) && "builder didn't return the right type");
13726 return ::llvm::cast<aarch64_sme_write_vert>(Val: __res__);
13727}
13728
13729aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13730 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13731}
13732
13733void aarch64_sme_write_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13734 auto &odsProperties = odsState.getOrAddProperties<Properties>();
13735 odsState.addOperands(newOperands: tile_slice_index);
13736 odsState.addOperands(newOperands: predicate);
13737 odsState.addOperands(newOperands: vector);
13738 odsProperties.tile_id = tile_id;
13739 assert(resultTypes.size() == 0u && "mismatched number of results");
13740 odsState.addTypes(newTypes&: resultTypes);
13741}
13742
13743aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13744 ::mlir::OperationState __state__(location, getOperationName());
13745 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13746 auto __res__ = builder.create(state: __state__);
13747 assert((::llvm::isa<aarch64_sme_write_vert>(__res__)) && "builder didn't return the right type");
13748 return ::llvm::cast<aarch64_sme_write_vert>(Val: __res__);
13749}
13750
13751aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13752 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13753}
13754
13755void aarch64_sme_write_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13756 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_id, tile_slice_index, predicate, vector);
13757}
13758
13759aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13760 ::mlir::OperationState __state__(location, getOperationName());
13761 build(odsBuilder&: builder, odsState&: __state__, tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13762 auto __res__ = builder.create(state: __state__);
13763 assert((::llvm::isa<aarch64_sme_write_vert>(__res__)) && "builder didn't return the right type");
13764 return ::llvm::cast<aarch64_sme_write_vert>(Val: __res__);
13765}
13766
13767aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13768 return create(builder, location: builder.getLoc(), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13769}
13770
13771void aarch64_sme_write_vert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13772 auto &odsProperties = odsState.getOrAddProperties<Properties>();
13773 odsState.addOperands(newOperands: tile_slice_index);
13774 odsState.addOperands(newOperands: predicate);
13775 odsState.addOperands(newOperands: vector);
13776 odsProperties.tile_id = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_id);
13777 assert(resultTypes.size() == 0u && "mismatched number of results");
13778 odsState.addTypes(newTypes&: resultTypes);
13779}
13780
13781aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13782 ::mlir::OperationState __state__(location, getOperationName());
13783 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13784 auto __res__ = builder.create(state: __state__);
13785 assert((::llvm::isa<aarch64_sme_write_vert>(__res__)) && "builder didn't return the right type");
13786 return ::llvm::cast<aarch64_sme_write_vert>(Val: __res__);
13787}
13788
13789aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_id, ::mlir::Value tile_slice_index, ::mlir::Value predicate, ::mlir::Value vector) {
13790 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_id: std::forward<decltype(tile_id)>(t&: tile_id), tile_slice_index: std::forward<decltype(tile_slice_index)>(t&: tile_slice_index), predicate: std::forward<decltype(predicate)>(t&: predicate), vector: std::forward<decltype(vector)>(t&: vector));
13791}
13792
13793void aarch64_sme_write_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13794 assert(operands.size() == 3u && "mismatched number of parameters");
13795 odsState.addOperands(newOperands: operands);
13796 buildPropertiesAndDiscardableAttributes(odsState, attributes);
13797 assert(resultTypes.size() == 0u && "mismatched number of return types");
13798 odsState.addTypes(newTypes&: resultTypes);
13799}
13800
13801aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13802LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
13803
13804 ::mlir::OperationState __state__(location, getOperationName());
13805 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
13806 auto __res__ = builder.create(state: __state__);
13807 assert((::llvm::isa<aarch64_sme_write_vert>(__res__)) && "builder didn't return the right type");
13808 return ::llvm::cast<aarch64_sme_write_vert>(Val: __res__);
13809LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
13810}
13811
13812aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13813LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
13814
13815 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
13816LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
13817}
13818
13819void aarch64_sme_write_vert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13820 assert(operands.size() == 3u && "mismatched number of parameters");
13821 odsState.addOperands(newOperands: operands);
13822 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
13823 odsState.addAttributes(newAttributes: discardableAttributes);
13824 assert(resultTypes.size() == 0u && "mismatched number of return types");
13825 odsState.addTypes(newTypes&: resultTypes);
13826}
13827
13828aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13829 ::mlir::OperationState __state__(location, getOperationName());
13830 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
13831 auto __res__ = builder.create(state: __state__);
13832 assert((::llvm::isa<aarch64_sme_write_vert>(__res__)) && "builder didn't return the right type");
13833 return ::llvm::cast<aarch64_sme_write_vert>(Val: __res__);
13834}
13835
13836aarch64_sme_write_vert aarch64_sme_write_vert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13837 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
13838}
13839
13840::llvm::LogicalResult aarch64_sme_write_vert::verifyInvariantsImpl() {
13841 auto tblgen_tile_id = getProperties().tile_id; (void)tblgen_tile_id;
13842 if (!tblgen_tile_id) return emitOpError(message: "requires attribute 'tile_id'");
13843
13844 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_id, attrName: "tile_id")))
13845 return ::mlir::failure();
13846 {
13847 unsigned index = 0; (void)index;
13848 auto valueGroup0 = getODSOperands(index: 0);
13849
13850 for (auto v : valueGroup0) {
13851 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13852 return ::mlir::failure();
13853 }
13854 auto valueGroup1 = getODSOperands(index: 1);
13855
13856 for (auto v : valueGroup1) {
13857 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps2(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13858 return ::mlir::failure();
13859 }
13860 auto valueGroup2 = getODSOperands(index: 2);
13861
13862 for (auto v : valueGroup2) {
13863 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_ArmSMEIntrinsicOps7(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13864 return ::mlir::failure();
13865 }
13866 }
13867 if (!(((::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 1).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 2).begin()).getType()).getShape()) && (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 2).begin()).getType()).getShape()) == (::llvm::cast<::mlir::ShapedType>(Val: (*this->getODSOperands(index: 1).begin()).getType()).getShape()))))
13868 return emitOpError(message: "failed to verify that all of {predicate, vector} have same shape");
13869 return ::mlir::success();
13870}
13871
13872::llvm::LogicalResult aarch64_sme_write_vert::verifyInvariants() {
13873 return verifyInvariantsImpl();
13874}
13875
13876::llvm::LogicalResult aarch64_sme_write_vert::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13877 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13878 if (!dict) {
13879 emitError() << "expected DictionaryAttr to set properties";
13880 return ::mlir::failure();
13881 }
13882 // keep track of used keys in the input dictionary to be able to error out
13883 // if there are some unknown ones.
13884 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
13885 ::mlir::MLIRContext *ctx = dict.getContext();
13886 (void)ctx;
13887 {
13888
13889 auto &propStorage = prop.tile_id;
13890 auto tile_idAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_id");
13891 auto attr = dict.get(name: tile_idAttrName);
13892 usedKeys.insert(V: tile_idAttrName);
13893 if (attr || /*isRequired=*/true) {
13894 if (!attr) {
13895 emitError() << "expected key entry for tile_id in DictionaryAttr to set "
13896 "Properties.";
13897 return ::mlir::failure();
13898 }
13899 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
13900 if (convertedAttr) {
13901 propStorage = convertedAttr;
13902 } else {
13903 emitError() << "Invalid attribute `tile_id` in property conversion: " << attr;
13904 return ::mlir::failure();
13905 }
13906 }
13907 }
13908
13909 for (::mlir::NamedAttribute attr : dict) {
13910 if (!usedKeys.contains(V: attr.getName()))
13911 return emitError() << "unknown key '" << attr.getName() <<
13912 "' when parsing properties dictionary";
13913 }
13914 return ::mlir::success();
13915}
13916
13917void aarch64_sme_write_vert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13918 Properties &properties = odsState.getOrAddProperties<Properties>();
13919 populateDefaultProperties(opName: odsState.name, properties);
13920 const ::llvm::StringRef inherentNames[] = {"tile_id"};
13921 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
13922 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
13923 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
13924 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
13925 });
13926}
13927
13928
13929} // namespace mlir::arm_sme
13930MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_write_vert)
13931MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_write_vertGenericAdaptorBase::Properties)
13932
13933namespace mlir::arm_sme {
13934
13935
13936//===----------------------------------------------------------------------===//
13937// ::mlir::arm_sme::aarch64_sme_zero definitions
13938//===----------------------------------------------------------------------===//
13939
13940namespace detail {
13941
13942aarch64_sme_zeroGenericAdaptorBase::aarch64_sme_zeroGenericAdaptorBase(aarch64_sme_zero op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
13943
13944uint32_t aarch64_sme_zeroGenericAdaptorBase::getTileMask() {
13945 auto attr = getTileMaskAttr();
13946 return attr.getValue().getZExtValue();
13947}
13948
13949
13950} // namespace detail
13951aarch64_sme_zeroAdaptor::aarch64_sme_zeroAdaptor(aarch64_sme_zero op) : aarch64_sme_zeroGenericAdaptor(op->getOperands(), op) {}
13952
13953::llvm::LogicalResult aarch64_sme_zeroAdaptor::verify(::mlir::Location loc) {
13954 auto tblgen_tile_mask = getProperties().tile_mask; (void)tblgen_tile_mask;
13955 if (!tblgen_tile_mask) return emitError(loc, message: "'arm_sme.intr.zero' op requires attribute 'tile_mask'");
13956
13957 if (tblgen_tile_mask && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_tile_mask))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_tile_mask).getType().isSignlessInteger(width: 32)))))
13958 return emitError(loc, message: "'arm_sme.intr.zero' op attribute 'tile_mask' failed to satisfy constraint: 32-bit signless integer attribute");
13959 return ::mlir::success();
13960}
13961
13962::llvm::LogicalResult aarch64_sme_zero::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13963 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13964 if (!dict) {
13965 emitError() << "expected DictionaryAttr to set properties";
13966 return ::mlir::failure();
13967 }
13968
13969 {
13970 auto attr = dict.get(name: "tile_mask");
13971 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
13972 storage&: prop.tile_mask, attr, name: "tile_mask", emitError)))
13973 return ::mlir::failure();
13974 }
13975 return ::mlir::success();
13976}
13977
13978::mlir::Attribute aarch64_sme_zero::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
13979 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
13980 ::mlir::Builder odsBuilder{ctx};
13981 ::mlir::detail::appendAttributeProperty(attrs, name: "tile_mask", attr: prop.tile_mask);
13982
13983 if (!attrs.empty())
13984 return odsBuilder.getDictionaryAttr(value: attrs);
13985 return {};
13986}
13987
13988llvm::hash_code aarch64_sme_zero::computePropertiesHash(const Properties &prop) {
13989 using llvm::hash_value;
13990 return llvm::hash_combine(
13991 args: llvm::hash_value(ptr: prop.tile_mask.getAsOpaquePointer()));
13992}
13993
13994std::optional<mlir::Attribute> aarch64_sme_zero::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
13995 if (name == "tile_mask")
13996 return prop.tile_mask;
13997 return std::nullopt;
13998}
13999
14000void aarch64_sme_zero::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
14001 if (name == "tile_mask") {
14002 prop.tile_mask = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tile_mask)>>(Val&: value);
14003 return;
14004 }
14005}
14006
14007void aarch64_sme_zero::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
14008 if (prop.tile_mask) {
14009 ::mlir::Attribute value = prop.tile_mask;
14010 ::mlir::Attribute originalValue = value;
14011 visitor("tile_mask", value);
14012 if (value != originalValue)
14013 setInherentAttr(prop, name: "tile_mask", value);
14014 }
14015}
14016
14017::llvm::LogicalResult aarch64_sme_zero::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
14018 {
14019 ::mlir::Attribute attr = attrs.get(name: getTileMaskAttrName(name: opName));
14020 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(attr, attrName: "tile_mask", emitError)))
14021 return ::mlir::failure();
14022 }
14023 return ::mlir::success();
14024}
14025
14026::llvm::LogicalResult aarch64_sme_zero::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
14027 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
14028 if (::mlir::failed(Result: reader.readAttribute(result&: prop.tile_mask)))
14029 return ::mlir::failure();
14030 return ::mlir::success();
14031}
14032
14033void aarch64_sme_zero::writeProperties(::mlir::DialectBytecodeWriter &writer) {
14034 auto &prop = getProperties(); (void)prop;
14035 writer.writeAttribute(attr: prop.tile_mask);
14036}
14037
14038uint32_t aarch64_sme_zero::getTileMask() {
14039 auto attr = getTileMaskAttr();
14040 return attr.getValue().getZExtValue();
14041}
14042
14043void aarch64_sme_zero::setTileMask(uint32_t attrValue) {
14044 getProperties().tile_mask = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
14045}
14046
14047void aarch64_sme_zero::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr tile_mask) {
14048 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_mask);
14049}
14050
14051aarch64_sme_zero aarch64_sme_zero::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr tile_mask) {
14052 ::mlir::OperationState __state__(location, getOperationName());
14053 build(odsBuilder&: builder, odsState&: __state__, tile_mask: std::forward<decltype(tile_mask)>(t&: tile_mask));
14054 auto __res__ = builder.create(state: __state__);
14055 assert((::llvm::isa<aarch64_sme_zero>(__res__)) && "builder didn't return the right type");
14056 return ::llvm::cast<aarch64_sme_zero>(Val: __res__);
14057}
14058
14059aarch64_sme_zero aarch64_sme_zero::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr tile_mask) {
14060 return create(builder, location: builder.getLoc(), tile_mask: std::forward<decltype(tile_mask)>(t&: tile_mask));
14061}
14062
14063void aarch64_sme_zero::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_mask) {
14064 auto &odsProperties = odsState.getOrAddProperties<Properties>();
14065 odsProperties.tile_mask = tile_mask;
14066 assert(resultTypes.size() == 0u && "mismatched number of results");
14067 odsState.addTypes(newTypes&: resultTypes);
14068}
14069
14070aarch64_sme_zero aarch64_sme_zero::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_mask) {
14071 ::mlir::OperationState __state__(location, getOperationName());
14072 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_mask: std::forward<decltype(tile_mask)>(t&: tile_mask));
14073 auto __res__ = builder.create(state: __state__);
14074 assert((::llvm::isa<aarch64_sme_zero>(__res__)) && "builder didn't return the right type");
14075 return ::llvm::cast<aarch64_sme_zero>(Val: __res__);
14076}
14077
14078aarch64_sme_zero aarch64_sme_zero::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr tile_mask) {
14079 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_mask: std::forward<decltype(tile_mask)>(t&: tile_mask));
14080}
14081
14082void aarch64_sme_zero::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t tile_mask) {
14083 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, tile_mask);
14084}
14085
14086aarch64_sme_zero aarch64_sme_zero::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t tile_mask) {
14087 ::mlir::OperationState __state__(location, getOperationName());
14088 build(odsBuilder&: builder, odsState&: __state__, tile_mask: std::forward<decltype(tile_mask)>(t&: tile_mask));
14089 auto __res__ = builder.create(state: __state__);
14090 assert((::llvm::isa<aarch64_sme_zero>(__res__)) && "builder didn't return the right type");
14091 return ::llvm::cast<aarch64_sme_zero>(Val: __res__);
14092}
14093
14094aarch64_sme_zero aarch64_sme_zero::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t tile_mask) {
14095 return create(builder, location: builder.getLoc(), tile_mask: std::forward<decltype(tile_mask)>(t&: tile_mask));
14096}
14097
14098void aarch64_sme_zero::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t tile_mask) {
14099 auto &odsProperties = odsState.getOrAddProperties<Properties>();
14100 odsProperties.tile_mask = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: tile_mask);
14101 assert(resultTypes.size() == 0u && "mismatched number of results");
14102 odsState.addTypes(newTypes&: resultTypes);
14103}
14104
14105aarch64_sme_zero aarch64_sme_zero::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t tile_mask) {
14106 ::mlir::OperationState __state__(location, getOperationName());
14107 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_mask: std::forward<decltype(tile_mask)>(t&: tile_mask));
14108 auto __res__ = builder.create(state: __state__);
14109 assert((::llvm::isa<aarch64_sme_zero>(__res__)) && "builder didn't return the right type");
14110 return ::llvm::cast<aarch64_sme_zero>(Val: __res__);
14111}
14112
14113aarch64_sme_zero aarch64_sme_zero::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t tile_mask) {
14114 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), tile_mask: std::forward<decltype(tile_mask)>(t&: tile_mask));
14115}
14116
14117void aarch64_sme_zero::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
14118 assert(operands.size() == 0u && "mismatched number of parameters");
14119 odsState.addOperands(newOperands: operands);
14120 buildPropertiesAndDiscardableAttributes(odsState, attributes);
14121 assert(resultTypes.size() == 0u && "mismatched number of return types");
14122 odsState.addTypes(newTypes&: resultTypes);
14123}
14124
14125aarch64_sme_zero aarch64_sme_zero::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
14126LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
14127
14128 ::mlir::OperationState __state__(location, getOperationName());
14129 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
14130 auto __res__ = builder.create(state: __state__);
14131 assert((::llvm::isa<aarch64_sme_zero>(__res__)) && "builder didn't return the right type");
14132 return ::llvm::cast<aarch64_sme_zero>(Val: __res__);
14133LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
14134}
14135
14136aarch64_sme_zero aarch64_sme_zero::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
14137LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
14138
14139 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
14140LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
14141}
14142
14143void aarch64_sme_zero::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
14144 assert(operands.size() == 0u && "mismatched number of parameters");
14145 odsState.addOperands(newOperands: operands);
14146 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
14147 odsState.addAttributes(newAttributes: discardableAttributes);
14148 assert(resultTypes.size() == 0u && "mismatched number of return types");
14149 odsState.addTypes(newTypes&: resultTypes);
14150}
14151
14152aarch64_sme_zero aarch64_sme_zero::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
14153 ::mlir::OperationState __state__(location, getOperationName());
14154 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
14155 auto __res__ = builder.create(state: __state__);
14156 assert((::llvm::isa<aarch64_sme_zero>(__res__)) && "builder didn't return the right type");
14157 return ::llvm::cast<aarch64_sme_zero>(Val: __res__);
14158}
14159
14160aarch64_sme_zero aarch64_sme_zero::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
14161 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
14162}
14163
14164::llvm::LogicalResult aarch64_sme_zero::verifyInvariantsImpl() {
14165 auto tblgen_tile_mask = getProperties().tile_mask; (void)tblgen_tile_mask;
14166 if (!tblgen_tile_mask) return emitOpError(message: "requires attribute 'tile_mask'");
14167
14168 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_ArmSMEIntrinsicOps1(op: *this, attr: tblgen_tile_mask, attrName: "tile_mask")))
14169 return ::mlir::failure();
14170 return ::mlir::success();
14171}
14172
14173::llvm::LogicalResult aarch64_sme_zero::verifyInvariants() {
14174 return verifyInvariantsImpl();
14175}
14176
14177::llvm::LogicalResult aarch64_sme_zero::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
14178 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
14179 if (!dict) {
14180 emitError() << "expected DictionaryAttr to set properties";
14181 return ::mlir::failure();
14182 }
14183 // keep track of used keys in the input dictionary to be able to error out
14184 // if there are some unknown ones.
14185 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
14186 ::mlir::MLIRContext *ctx = dict.getContext();
14187 (void)ctx;
14188 {
14189
14190 auto &propStorage = prop.tile_mask;
14191 auto tile_maskAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tile_mask");
14192 auto attr = dict.get(name: tile_maskAttrName);
14193 usedKeys.insert(V: tile_maskAttrName);
14194 if (attr || /*isRequired=*/true) {
14195 if (!attr) {
14196 emitError() << "expected key entry for tile_mask in DictionaryAttr to set "
14197 "Properties.";
14198 return ::mlir::failure();
14199 }
14200 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
14201 if (convertedAttr) {
14202 propStorage = convertedAttr;
14203 } else {
14204 emitError() << "Invalid attribute `tile_mask` in property conversion: " << attr;
14205 return ::mlir::failure();
14206 }
14207 }
14208 }
14209
14210 for (::mlir::NamedAttribute attr : dict) {
14211 if (!usedKeys.contains(V: attr.getName()))
14212 return emitError() << "unknown key '" << attr.getName() <<
14213 "' when parsing properties dictionary";
14214 }
14215 return ::mlir::success();
14216}
14217
14218void aarch64_sme_zero::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
14219 Properties &properties = odsState.getOrAddProperties<Properties>();
14220 populateDefaultProperties(opName: odsState.name, properties);
14221 const ::llvm::StringRef inherentNames[] = {"tile_mask"};
14222 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
14223 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
14224 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
14225 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
14226 });
14227}
14228
14229
14230} // namespace mlir::arm_sme
14231MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::aarch64_sme_zero)
14232MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::arm_sme::detail::aarch64_sme_zeroGenericAdaptorBase::Properties)
14233
14234
14235#endif // GET_OP_CLASSES
14236
14237