1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: LLVMAllOps.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#ifdef GET_OP_CLASSES
11#undef GET_OP_CLASSES
12
13#include "mlir/IR/Builders.h"
14#include "mlir/IR/BuiltinAttributes.h"
15#include "mlir/IR/BuiltinTypes.h"
16#include "mlir/IR/OpImplementation.h"
17
18
19//===----------------------------------------------------------------------===//
20// Local Utility Method Definitions
21//===----------------------------------------------------------------------===//
22
23
24static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps1(
25 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
26 unsigned valueIndex) {
27 if (!((type.isSignlessInteger()))) {
28 return op->emitOpError(message: valueKind) << " #" << valueIndex
29 << " must be signless integer, but got " << type;
30 }
31 return ::mlir::success();
32}
33
34static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(
35 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
36 unsigned valueIndex) {
37 if (!((::mlir::LLVM::isCompatibleOuterType(type)))) {
38 return op->emitOpError(message: valueKind) << " #" << valueIndex
39 << " must be LLVM dialect-compatible type, but got " << type;
40 }
41 return ::mlir::success();
42}
43
44static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps3(
45 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
46 unsigned valueIndex) {
47 if (!((::llvm::isa<::mlir::LLVM::LLVMPointerType>(Val: type)))) {
48 return op->emitOpError(message: valueKind) << " #" << valueIndex
49 << " must be LLVM pointer type, but got " << type;
50 }
51 return ::mlir::success();
52}
53
54static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps4(
55 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
56 unsigned valueIndex) {
57 if (!(((::mlir::LLVM::isCompatibleVectorType(type))) && ((::llvm::cast<::mlir::VectorType>(Val&: type).getElementType().isSignlessInteger(width: 1))))) {
58 return op->emitOpError(message: valueKind) << " #" << valueIndex
59 << " must be LLVM dialect-compatible vector of 1-bit signless integer, but got " << type;
60 }
61 return ::mlir::success();
62}
63
64static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(
65 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
66 unsigned valueIndex) {
67 if (!((::mlir::LLVM::isCompatibleVectorType(type)))) {
68 return op->emitOpError(message: valueKind) << " #" << valueIndex
69 << " must be LLVM dialect-compatible vector type, but got " << type;
70 }
71 return ::mlir::success();
72}
73
74static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(
75 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
76 unsigned valueIndex) {
77 if (!(((::mlir::LLVM::isCompatibleVectorType(type))) && ((::llvm::cast<::mlir::VectorType>(Val&: type).getElementType().isSignlessInteger())))) {
78 return op->emitOpError(message: valueKind) << " #" << valueIndex
79 << " must be LLVM dialect-compatible vector of signless integer, but got " << type;
80 }
81 return ::mlir::success();
82}
83
84static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps7(
85 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
86 unsigned valueIndex) {
87 if (!(((::mlir::LLVM::isCompatibleVectorType(type))) && ((::llvm::isa<::mlir::LLVM::LLVMPointerType>(Val: ::llvm::cast<::mlir::VectorType>(Val&: type).getElementType()))))) {
88 return op->emitOpError(message: valueKind) << " #" << valueIndex
89 << " must be LLVM dialect-compatible vector of LLVM pointer type, but got " << type;
90 }
91 return ::mlir::success();
92}
93
94static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps8(
95 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
96 unsigned valueIndex) {
97 if (!((::mlir::LLVM::isCompatibleVectorType(type)))) {
98 return op->emitOpError(message: valueKind) << " #" << valueIndex
99 << " must be variadic of LLVM dialect-compatible vector type, but got " << type;
100 }
101 return ::mlir::success();
102}
103
104static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps9(
105 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
106 unsigned valueIndex) {
107 if (!((::llvm::isa<::mlir::FloatType>(Val: type)))) {
108 return op->emitOpError(message: valueKind) << " #" << valueIndex
109 << " must be floating-point, but got " << type;
110 }
111 return ::mlir::success();
112}
113
114static ::llvm::LogicalResult __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(
115 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
116 unsigned valueIndex) {
117 if (!(((::mlir::LLVM::isCompatibleVectorType(type))) && ((::llvm::isa<::mlir::FloatType>(Val: ::llvm::cast<::mlir::VectorType>(Val&: type).getElementType()))))) {
118 return op->emitOpError(message: valueKind) << " #" << valueIndex
119 << " must be LLVM dialect-compatible vector of floating-point, but got " << type;
120 }
121 return ::mlir::success();
122}
123
124static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(
125 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
126 if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(Val: attr))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: attr).getType().isSignlessInteger(width: 64)))))
127 return emitError() << "attribute '" << attrName
128 << "' failed to satisfy constraint: 64-bit signless integer attribute";
129 return ::mlir::success();
130}
131static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(
132 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
133 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(attr, attrName, emitError: [op]() {
134 return op->emitOpError();
135 });
136}
137
138static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps2(
139 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
140 if (attr && !((::llvm::isa<::mlir::UnitAttr>(Val: attr))))
141 return emitError() << "attribute '" << attrName
142 << "' failed to satisfy constraint: unit attribute";
143 return ::mlir::success();
144}
145static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps2(
146 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
147 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps2(attr, attrName, emitError: [op]() {
148 return op->emitOpError();
149 });
150}
151
152static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(
153 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
154 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(Val: attr))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: attr), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AccessGroupAttr>(Val: attr))); }))))
155 return emitError() << "attribute '" << attrName
156 << "' failed to satisfy constraint: LLVM dialect access group metadata array";
157 return ::mlir::success();
158}
159static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(
160 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
161 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(attr, attrName, emitError: [op]() {
162 return op->emitOpError();
163 });
164}
165
166static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(
167 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
168 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(Val: attr))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: attr), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
169 return emitError() << "attribute '" << attrName
170 << "' failed to satisfy constraint: LLVM dialect alias scope array";
171 return ::mlir::success();
172}
173static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(
174 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
175 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName, emitError: [op]() {
176 return op->emitOpError();
177 });
178}
179
180static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(
181 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
182 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(Val: attr))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: attr), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(Val: attr))); }))))
183 return emitError() << "attribute '" << attrName
184 << "' failed to satisfy constraint: LLVM dialect TBAA tag metadata array";
185 return ::mlir::success();
186}
187static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(
188 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
189 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(attr, attrName, emitError: [op]() {
190 return op->emitOpError();
191 });
192}
193
194static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps6(
195 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
196 if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(Val: attr))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: attr).getType().isSignlessInteger(width: 1)))))
197 return emitError() << "attribute '" << attrName
198 << "' failed to satisfy constraint: 1-bit signless integer attribute";
199 return ::mlir::success();
200}
201static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps6(
202 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
203 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps6(attr, attrName, emitError: [op]() {
204 return op->emitOpError();
205 });
206}
207
208static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(
209 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
210 if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(Val: attr))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: attr).getType().isSignlessInteger(width: 32)))))
211 return emitError() << "attribute '" << attrName
212 << "' failed to satisfy constraint: 32-bit signless integer attribute";
213 return ::mlir::success();
214}
215static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(
216 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
217 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName, emitError: [op]() {
218 return op->emitOpError();
219 });
220}
221
222static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(
223 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
224 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(Val: attr))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: attr), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(Val: attr))); }))))
225 return emitError() << "attribute '" << attrName
226 << "' failed to satisfy constraint: Array of dictionary attributes";
227 return ::mlir::success();
228}
229static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(
230 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
231 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(attr, attrName, emitError: [op]() {
232 return op->emitOpError();
233 });
234}
235
236static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(
237 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
238 if (attr && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: attr))))
239 return emitError() << "attribute '" << attrName
240 << "' failed to satisfy constraint: LLVM fastmath flags";
241 return ::mlir::success();
242}
243static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(
244 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
245 return __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName, emitError: [op]() {
246 return op->emitOpError();
247 });
248}
249namespace mlir::LLVM {
250
251
252//===----------------------------------------------------------------------===//
253// ::mlir::LLVM::GetActiveLaneMaskOp definitions
254//===----------------------------------------------------------------------===//
255
256namespace detail {
257
258GetActiveLaneMaskOpGenericAdaptorBase::GetActiveLaneMaskOpGenericAdaptorBase(GetActiveLaneMaskOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
259
260
261} // namespace detail
262GetActiveLaneMaskOpAdaptor::GetActiveLaneMaskOpAdaptor(GetActiveLaneMaskOp op) : GetActiveLaneMaskOpGenericAdaptor(op->getOperands(), op) {}
263
264::llvm::LogicalResult GetActiveLaneMaskOpAdaptor::verify(::mlir::Location loc) {
265 return ::mlir::success();
266}
267
268::llvm::LogicalResult GetActiveLaneMaskOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
269 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
270 if (!dict) {
271 emitError() << "expected DictionaryAttr to set properties";
272 return ::mlir::failure();
273 }
274 return ::mlir::success();
275}
276
277::mlir::Attribute GetActiveLaneMaskOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
278 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
279 ::mlir::Builder odsBuilder{ctx};
280
281 if (!attrs.empty())
282 return odsBuilder.getDictionaryAttr(value: attrs);
283 return {};
284}
285
286llvm::hash_code GetActiveLaneMaskOp::computePropertiesHash(const Properties &prop) {
287 using llvm::hash_value;
288 return llvm::hash_combine();
289}
290
291std::optional<mlir::Attribute> GetActiveLaneMaskOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
292 return std::nullopt;
293}
294
295void GetActiveLaneMaskOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
296}
297
298void GetActiveLaneMaskOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
299}
300
301::llvm::LogicalResult GetActiveLaneMaskOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
302 return ::mlir::success();
303}
304
305void GetActiveLaneMaskOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value base, ::mlir::Value n) {
306 odsState.addOperands(newOperands: base);
307 odsState.addOperands(newOperands: n);
308 odsState.addTypes(newTypes: res);
309}
310
311GetActiveLaneMaskOp GetActiveLaneMaskOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value base, ::mlir::Value n) {
312 ::mlir::OperationState __state__(location, getOperationName());
313 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), base: std::forward<decltype(base)>(t&: base), n: std::forward<decltype(n)>(t&: n));
314 auto __res__ = builder.create(state: __state__);
315 assert((::llvm::isa<GetActiveLaneMaskOp>(__res__)) && "builder didn't return the right type");
316 return ::llvm::cast<GetActiveLaneMaskOp>(Val: __res__);
317}
318
319GetActiveLaneMaskOp GetActiveLaneMaskOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value base, ::mlir::Value n) {
320 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), base: std::forward<decltype(base)>(t&: base), n: std::forward<decltype(n)>(t&: n));
321}
322
323void GetActiveLaneMaskOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value n) {
324 odsState.addOperands(newOperands: base);
325 odsState.addOperands(newOperands: n);
326 assert(resultTypes.size() == 1u && "mismatched number of results");
327 odsState.addTypes(newTypes&: resultTypes);
328}
329
330GetActiveLaneMaskOp GetActiveLaneMaskOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value n) {
331 ::mlir::OperationState __state__(location, getOperationName());
332 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), base: std::forward<decltype(base)>(t&: base), n: std::forward<decltype(n)>(t&: n));
333 auto __res__ = builder.create(state: __state__);
334 assert((::llvm::isa<GetActiveLaneMaskOp>(__res__)) && "builder didn't return the right type");
335 return ::llvm::cast<GetActiveLaneMaskOp>(Val: __res__);
336}
337
338GetActiveLaneMaskOp GetActiveLaneMaskOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value n) {
339 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), base: std::forward<decltype(base)>(t&: base), n: std::forward<decltype(n)>(t&: n));
340}
341
342void GetActiveLaneMaskOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
343 assert(operands.size() == 2u && "mismatched number of parameters");
344 odsState.addOperands(newOperands: operands);
345 odsState.addAttributes(newAttributes: attributes);
346 assert(resultTypes.size() == 1u && "mismatched number of return types");
347 odsState.addTypes(newTypes&: resultTypes);
348}
349
350GetActiveLaneMaskOp GetActiveLaneMaskOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
351 ::mlir::OperationState __state__(location, getOperationName());
352 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));
353 auto __res__ = builder.create(state: __state__);
354 assert((::llvm::isa<GetActiveLaneMaskOp>(__res__)) && "builder didn't return the right type");
355 return ::llvm::cast<GetActiveLaneMaskOp>(Val: __res__);
356}
357
358GetActiveLaneMaskOp GetActiveLaneMaskOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
359 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));
360}
361
362void GetActiveLaneMaskOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
363 assert(operands.size() == 2u && "mismatched number of parameters");
364 odsState.addOperands(newOperands: operands);
365 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
366 odsState.addAttributes(newAttributes: discardableAttributes);
367 assert(resultTypes.size() == 1u && "mismatched number of return types");
368 odsState.addTypes(newTypes&: resultTypes);
369}
370
371GetActiveLaneMaskOp GetActiveLaneMaskOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
372 ::mlir::OperationState __state__(location, getOperationName());
373 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));
374 auto __res__ = builder.create(state: __state__);
375 assert((::llvm::isa<GetActiveLaneMaskOp>(__res__)) && "builder didn't return the right type");
376 return ::llvm::cast<GetActiveLaneMaskOp>(Val: __res__);
377}
378
379GetActiveLaneMaskOp GetActiveLaneMaskOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
380 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));
381}
382
383::llvm::LogicalResult GetActiveLaneMaskOp::verifyInvariantsImpl() {
384 {
385 unsigned index = 0; (void)index;
386 auto valueGroup0 = getODSOperands(index: 0);
387
388 for (auto v : valueGroup0) {
389 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
390 return ::mlir::failure();
391 }
392 auto valueGroup1 = getODSOperands(index: 1);
393
394 for (auto v : valueGroup1) {
395 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
396 return ::mlir::failure();
397 }
398 }
399 {
400 unsigned index = 0; (void)index;
401 auto valueGroup0 = getODSResults(index: 0);
402
403 for (auto v : valueGroup0) {
404 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
405 return ::mlir::failure();
406 }
407 }
408 return ::mlir::success();
409}
410
411::llvm::LogicalResult GetActiveLaneMaskOp::verifyInvariants() {
412 return verifyInvariantsImpl();
413}
414
415::mlir::ParseResult GetActiveLaneMaskOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
416 ::mlir::OpAsmParser::UnresolvedOperand baseRawOperand{};
417 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> baseOperands(&baseRawOperand, 1); ::llvm::SMLoc baseOperandsLoc;
418 (void)baseOperandsLoc;
419 ::mlir::OpAsmParser::UnresolvedOperand nRawOperand{};
420 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> nOperands(&nRawOperand, 1); ::llvm::SMLoc nOperandsLoc;
421 (void)nOperandsLoc;
422 ::mlir::Type baseRawType{};
423 ::llvm::ArrayRef<::mlir::Type> baseTypes(&baseRawType, 1);
424 ::mlir::Type nRawType{};
425 ::llvm::ArrayRef<::mlir::Type> nTypes(&nRawType, 1);
426 ::mlir::Type resRawType{};
427 ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
428
429 baseOperandsLoc = parser.getCurrentLocation();
430 if (parser.parseOperand(result&: baseRawOperand))
431 return ::mlir::failure();
432 if (parser.parseComma())
433 return ::mlir::failure();
434
435 nOperandsLoc = parser.getCurrentLocation();
436 if (parser.parseOperand(result&: nRawOperand))
437 return ::mlir::failure();
438 {
439 auto loc = parser.getCurrentLocation();(void)loc;
440 if (parser.parseOptionalAttrDict(result&: result.attributes))
441 return ::mlir::failure();
442 }
443 if (parser.parseColon())
444 return ::mlir::failure();
445
446 {
447 ::mlir::IntegerType type;
448 if (parser.parseCustomTypeWithFallback(result&: type))
449 return ::mlir::failure();
450 baseRawType = type;
451 }
452 if (parser.parseComma())
453 return ::mlir::failure();
454
455 {
456 ::mlir::IntegerType type;
457 if (parser.parseCustomTypeWithFallback(result&: type))
458 return ::mlir::failure();
459 nRawType = type;
460 }
461 if (parser.parseKeyword(keyword: "to"))
462 return ::mlir::failure();
463
464 {
465 ::mlir::Type type;
466 if (parser.parseCustomTypeWithFallback(result&: type))
467 return ::mlir::failure();
468 resRawType = type;
469 }
470 result.addTypes(newTypes: resTypes);
471 // coverity[ARRAY_VS_SINGLETON]
472 if (parser.resolveOperands(operands&: baseOperands, types&: baseTypes, loc: baseOperandsLoc, result&: result.operands))
473 return ::mlir::failure();
474 // coverity[ARRAY_VS_SINGLETON]
475 if (parser.resolveOperands(operands&: nOperands, types&: nTypes, loc: nOperandsLoc, result&: result.operands))
476 return ::mlir::failure();
477 return ::mlir::success();
478}
479
480LLVM_ATTRIBUTE_MINSIZE void GetActiveLaneMaskOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
481 _odsPrinter << ' ';
482 _odsPrinter << getBase();
483 _odsPrinter << ",";
484 _odsPrinter << ' ';
485 _odsPrinter << getN();
486 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
487 _odsPrinter << " :";
488 _odsPrinter << ' ';
489 {
490 auto type = getBase().getType();
491 if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(Val&: type))
492 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
493 else
494 _odsPrinter << type;
495 }
496 _odsPrinter << ",";
497 _odsPrinter << ' ';
498 {
499 auto type = getN().getType();
500 if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(Val&: type))
501 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
502 else
503 _odsPrinter << type;
504 }
505 _odsPrinter << " to";
506 _odsPrinter << ' ';
507 {
508 auto type = getRes().getType();
509 if (auto validType = ::llvm::dyn_cast<::mlir::Type>(Val&: type))
510 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
511 else
512 _odsPrinter << type;
513 }
514}
515
516void GetActiveLaneMaskOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
517}
518
519
520} // namespace mlir::LLVM
521MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::GetActiveLaneMaskOp)
522
523namespace mlir::LLVM {
524
525
526//===----------------------------------------------------------------------===//
527// ::mlir::LLVM::MaskedLoadOp definitions
528//===----------------------------------------------------------------------===//
529
530namespace detail {
531
532MaskedLoadOpGenericAdaptorBase::MaskedLoadOpGenericAdaptorBase(MaskedLoadOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
533
534std::pair<unsigned, unsigned> MaskedLoadOpGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
535 bool isVariadic[] = {false, false, true};
536 int prevVariadicCount = 0;
537 for (unsigned i = 0; i < index; ++i)
538 if (isVariadic[i]) ++prevVariadicCount;
539
540 // Calculate how many dynamic values a static variadic operand corresponds to.
541 // This assumes all static variadic operands have the same dynamic value count.
542 int variadicSize = (odsOperandsSize - 2) / 1;
543 // `index` passed in as the parameter is the static index which counts each
544 // operand (variadic or not) as size 1. So here for each previous static variadic
545 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
546 // value pack for this static operand starts.
547 int start = index + (variadicSize - 1) * prevVariadicCount;
548 int size = isVariadic[index] ? variadicSize : 1;
549 return {start, size};
550}
551
552::std::optional<uint64_t> MaskedLoadOpGenericAdaptorBase::getAlignment() {
553 auto attr = getAlignmentAttr();
554 return attr ? ::std::optional<uint64_t>(attr.getValue().getZExtValue()) : (::std::nullopt);
555}
556
557::mlir::UnitAttr MaskedLoadOpGenericAdaptorBase::getNontemporalAttr() {
558 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(Val: getProperties().nontemporal);
559 if (!attr)
560 attr = ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr);
561 return attr;
562}
563
564bool MaskedLoadOpGenericAdaptorBase::getNontemporal() {
565 auto attr = getNontemporalAttr();
566 if (!attr)
567 return ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr) != nullptr;
568 return attr != nullptr;
569}
570
571::std::optional< ::mlir::ArrayAttr > MaskedLoadOpGenericAdaptorBase::getAccessGroups() {
572 auto attr = getAccessGroupsAttr();
573 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
574}
575
576::std::optional< ::mlir::ArrayAttr > MaskedLoadOpGenericAdaptorBase::getAliasScopes() {
577 auto attr = getAliasScopesAttr();
578 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
579}
580
581::std::optional< ::mlir::ArrayAttr > MaskedLoadOpGenericAdaptorBase::getNoaliasScopes() {
582 auto attr = getNoaliasScopesAttr();
583 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
584}
585
586::std::optional< ::mlir::ArrayAttr > MaskedLoadOpGenericAdaptorBase::getTbaa() {
587 auto attr = getTbaaAttr();
588 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
589}
590
591
592} // namespace detail
593MaskedLoadOpAdaptor::MaskedLoadOpAdaptor(MaskedLoadOp op) : MaskedLoadOpGenericAdaptor(op->getOperands(), op) {}
594
595::llvm::LogicalResult MaskedLoadOpAdaptor::verify(::mlir::Location loc) {
596 auto tblgen_access_groups = getProperties().access_groups; (void)tblgen_access_groups;
597 auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
598 auto tblgen_alignment = getProperties().alignment; (void)tblgen_alignment;
599 auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
600 auto tblgen_nontemporal = getProperties().nontemporal; (void)tblgen_nontemporal;
601 auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;
602
603 if (tblgen_alignment && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_alignment))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_alignment).getType().isSignlessInteger(width: 64)))))
604 return emitError(loc, message: "'llvm.intr.masked.load' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute");
605
606 if (tblgen_nontemporal && !((::llvm::isa<::mlir::UnitAttr>(Val: tblgen_nontemporal))))
607 return emitError(loc, message: "'llvm.intr.masked.load' op attribute 'nontemporal' failed to satisfy constraint: unit attribute");
608
609 if (tblgen_access_groups && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_access_groups))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_access_groups), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AccessGroupAttr>(Val: attr))); }))))
610 return emitError(loc, message: "'llvm.intr.masked.load' op attribute 'access_groups' failed to satisfy constraint: LLVM dialect access group metadata array");
611
612 if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_alias_scopes))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_alias_scopes), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
613 return emitError(loc, message: "'llvm.intr.masked.load' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");
614
615 if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_noalias_scopes))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_noalias_scopes), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
616 return emitError(loc, message: "'llvm.intr.masked.load' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");
617
618 if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_tbaa))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_tbaa), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(Val: attr))); }))))
619 return emitError(loc, message: "'llvm.intr.masked.load' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
620 return ::mlir::success();
621}
622
623std::pair<unsigned, unsigned> MaskedLoadOp::getODSOperandIndexAndLength(unsigned index) {
624 bool isVariadic[] = {false, false, true};
625 int prevVariadicCount = 0;
626 for (unsigned i = 0; i < index; ++i)
627 if (isVariadic[i]) ++prevVariadicCount;
628
629 // Calculate how many dynamic values a static variadic operand corresponds to.
630 // This assumes all static variadic operands have the same dynamic value count.
631 int variadicSize = (getOperation()->getNumOperands() - 2) / 1;
632 // `index` passed in as the parameter is the static index which counts each
633 // operand (variadic or not) as size 1. So here for each previous static variadic
634 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
635 // value pack for this static operand starts.
636 int start = index + (variadicSize - 1) * prevVariadicCount;
637 int size = isVariadic[index] ? variadicSize : 1;
638 return {start, size};
639}
640
641::mlir::MutableOperandRange MaskedLoadOp::getPassThruMutable() {
642 auto range = getODSOperandIndexAndLength(index: 2);
643 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
644 return mutableRange;
645}
646
647::llvm::LogicalResult MaskedLoadOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
648 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
649 if (!dict) {
650 emitError() << "expected DictionaryAttr to set properties";
651 return ::mlir::failure();
652 }
653
654 {
655 auto attr = dict.get(name: "access_groups");
656 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
657 storage&: prop.access_groups, attr, name: "access_groups", emitError)))
658 return ::mlir::failure();
659 }
660
661 {
662 auto attr = dict.get(name: "alias_scopes");
663 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
664 storage&: prop.alias_scopes, attr, name: "alias_scopes", emitError)))
665 return ::mlir::failure();
666 }
667
668 {
669 auto attr = dict.get(name: "alignment");
670 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
671 storage&: prop.alignment, attr, name: "alignment", emitError)))
672 return ::mlir::failure();
673 }
674
675 {
676 auto attr = dict.get(name: "noalias_scopes");
677 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
678 storage&: prop.noalias_scopes, attr, name: "noalias_scopes", emitError)))
679 return ::mlir::failure();
680 }
681
682 {
683 auto attr = dict.get(name: "nontemporal");
684 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
685 storage&: prop.nontemporal, attr, name: "nontemporal", emitError)))
686 return ::mlir::failure();
687 }
688
689 {
690 auto attr = dict.get(name: "tbaa");
691 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
692 storage&: prop.tbaa, attr, name: "tbaa", emitError)))
693 return ::mlir::failure();
694 }
695 return ::mlir::success();
696}
697
698::mlir::Attribute MaskedLoadOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
699 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
700 ::mlir::Builder odsBuilder{ctx};
701 ::mlir::detail::appendAttributeProperty(attrs, name: "access_groups", attr: prop.access_groups);
702 ::mlir::detail::appendAttributeProperty(attrs, name: "alias_scopes", attr: prop.alias_scopes);
703 ::mlir::detail::appendAttributeProperty(attrs, name: "alignment", attr: prop.alignment);
704 ::mlir::detail::appendAttributeProperty(attrs, name: "noalias_scopes", attr: prop.noalias_scopes);
705 ::mlir::detail::appendAttributeProperty(attrs, name: "nontemporal", attr: prop.nontemporal);
706 ::mlir::detail::appendAttributeProperty(attrs, name: "tbaa", attr: prop.tbaa);
707
708 if (!attrs.empty())
709 return odsBuilder.getDictionaryAttr(value: attrs);
710 return {};
711}
712
713llvm::hash_code MaskedLoadOp::computePropertiesHash(const Properties &prop) {
714 using llvm::hash_value;
715 return llvm::hash_combine(
716 args: llvm::hash_value(ptr: prop.access_groups.getAsOpaquePointer()),
717 args: llvm::hash_value(ptr: prop.alias_scopes.getAsOpaquePointer()),
718 args: llvm::hash_value(ptr: prop.alignment.getAsOpaquePointer()),
719 args: llvm::hash_value(ptr: prop.noalias_scopes.getAsOpaquePointer()),
720 args: llvm::hash_value(ptr: prop.nontemporal.getAsOpaquePointer()),
721 args: llvm::hash_value(ptr: prop.tbaa.getAsOpaquePointer()));
722}
723
724std::optional<mlir::Attribute> MaskedLoadOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
725 if (name == "access_groups")
726 return prop.access_groups;
727
728 if (name == "alias_scopes")
729 return prop.alias_scopes;
730
731 if (name == "alignment")
732 return prop.alignment;
733
734 if (name == "noalias_scopes")
735 return prop.noalias_scopes;
736
737 if (name == "nontemporal")
738 return prop.nontemporal;
739
740 if (name == "tbaa")
741 return prop.tbaa;
742 return std::nullopt;
743}
744
745void MaskedLoadOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
746 if (name == "access_groups") {
747 prop.access_groups = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.access_groups)>>(Val&: value);
748 return;
749 }
750
751 if (name == "alias_scopes") {
752 prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(Val&: value);
753 return;
754 }
755
756 if (name == "alignment") {
757 prop.alignment = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alignment)>>(Val&: value);
758 return;
759 }
760
761 if (name == "noalias_scopes") {
762 prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(Val&: value);
763 return;
764 }
765
766 if (name == "nontemporal") {
767 prop.nontemporal = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.nontemporal)>>(Val&: value);
768 return;
769 }
770
771 if (name == "tbaa") {
772 prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(Val&: value);
773 return;
774 }
775}
776
777void MaskedLoadOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
778 if (prop.access_groups) {
779 ::mlir::Attribute value = prop.access_groups;
780 ::mlir::Attribute originalValue = value;
781 visitor("access_groups", value);
782 if (value != originalValue)
783 setInherentAttr(prop, name: "access_groups", value);
784 }
785
786 if (prop.alias_scopes) {
787 ::mlir::Attribute value = prop.alias_scopes;
788 ::mlir::Attribute originalValue = value;
789 visitor("alias_scopes", value);
790 if (value != originalValue)
791 setInherentAttr(prop, name: "alias_scopes", value);
792 }
793
794 if (prop.alignment) {
795 ::mlir::Attribute value = prop.alignment;
796 ::mlir::Attribute originalValue = value;
797 visitor("alignment", value);
798 if (value != originalValue)
799 setInherentAttr(prop, name: "alignment", value);
800 }
801
802 if (prop.noalias_scopes) {
803 ::mlir::Attribute value = prop.noalias_scopes;
804 ::mlir::Attribute originalValue = value;
805 visitor("noalias_scopes", value);
806 if (value != originalValue)
807 setInherentAttr(prop, name: "noalias_scopes", value);
808 }
809
810 if (prop.nontemporal) {
811 ::mlir::Attribute value = prop.nontemporal;
812 ::mlir::Attribute originalValue = value;
813 visitor("nontemporal", value);
814 if (value != originalValue)
815 setInherentAttr(prop, name: "nontemporal", value);
816 }
817
818 if (prop.tbaa) {
819 ::mlir::Attribute value = prop.tbaa;
820 ::mlir::Attribute originalValue = value;
821 visitor("tbaa", value);
822 if (value != originalValue)
823 setInherentAttr(prop, name: "tbaa", value);
824 }
825}
826
827::llvm::LogicalResult MaskedLoadOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
828 {
829 ::mlir::Attribute attr = attrs.get(name: getAccessGroupsAttrName(name: opName));
830 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(attr, attrName: "access_groups", emitError)))
831 return ::mlir::failure();
832 }
833
834 {
835 ::mlir::Attribute attr = attrs.get(name: getAliasScopesAttrName(name: opName));
836 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName: "alias_scopes", emitError)))
837 return ::mlir::failure();
838 }
839
840 {
841 ::mlir::Attribute attr = attrs.get(name: getAlignmentAttrName(name: opName));
842 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(attr, attrName: "alignment", emitError)))
843 return ::mlir::failure();
844 }
845
846 {
847 ::mlir::Attribute attr = attrs.get(name: getNoaliasScopesAttrName(name: opName));
848 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName: "noalias_scopes", emitError)))
849 return ::mlir::failure();
850 }
851
852 {
853 ::mlir::Attribute attr = attrs.get(name: getNontemporalAttrName(name: opName));
854 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps2(attr, attrName: "nontemporal", emitError)))
855 return ::mlir::failure();
856 }
857
858 {
859 ::mlir::Attribute attr = attrs.get(name: getTbaaAttrName(name: opName));
860 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(attr, attrName: "tbaa", emitError)))
861 return ::mlir::failure();
862 }
863 return ::mlir::success();
864}
865
866::llvm::LogicalResult MaskedLoadOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
867 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
868 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.access_groups)))
869 return ::mlir::failure();
870
871 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.alias_scopes)))
872 return ::mlir::failure();
873
874 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.alignment)))
875 return ::mlir::failure();
876
877 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.noalias_scopes)))
878 return ::mlir::failure();
879
880 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.nontemporal)))
881 return ::mlir::failure();
882
883 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.tbaa)))
884 return ::mlir::failure();
885 return ::mlir::success();
886}
887
888void MaskedLoadOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
889 auto &prop = getProperties(); (void)prop;
890
891 writer.writeOptionalAttribute(attr: prop.access_groups);
892
893 writer.writeOptionalAttribute(attr: prop.alias_scopes);
894
895 writer.writeOptionalAttribute(attr: prop.alignment);
896
897 writer.writeOptionalAttribute(attr: prop.noalias_scopes);
898
899 writer.writeOptionalAttribute(attr: prop.nontemporal);
900
901 writer.writeOptionalAttribute(attr: prop.tbaa);
902}
903
904::std::optional<uint64_t> MaskedLoadOp::getAlignment() {
905 auto attr = getAlignmentAttr();
906 return attr ? ::std::optional<uint64_t>(attr.getValue().getZExtValue()) : (::std::nullopt);
907}
908
909bool MaskedLoadOp::getNontemporal() {
910 auto attr = getNontemporalAttr();
911 if (!attr)
912 return ((false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr) != nullptr;
913 return attr != nullptr;
914}
915
916::std::optional< ::mlir::ArrayAttr > MaskedLoadOp::getAccessGroups() {
917 auto attr = getAccessGroupsAttr();
918 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
919}
920
921::std::optional< ::mlir::ArrayAttr > MaskedLoadOp::getAliasScopes() {
922 auto attr = getAliasScopesAttr();
923 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
924}
925
926::std::optional< ::mlir::ArrayAttr > MaskedLoadOp::getNoaliasScopes() {
927 auto attr = getNoaliasScopesAttr();
928 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
929}
930
931::std::optional< ::mlir::ArrayAttr > MaskedLoadOp::getTbaa() {
932 auto attr = getTbaaAttr();
933 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
934}
935
936void MaskedLoadOp::setAlignment(::std::optional<uint64_t> attrValue) {
937 auto &odsProp = getProperties().alignment;
938 if (attrValue)
939 odsProp = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 64), value: *attrValue);
940 else
941 odsProp = nullptr;
942}
943
944void MaskedLoadOp::setNontemporal(bool attrValue) {
945 auto &odsProp = getProperties().nontemporal;
946 if (attrValue)
947 odsProp = ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr);
948 else
949 odsProp = nullptr;
950}
951
952void MaskedLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type res, Value data, Value mask, Value pass_thru, uint64_t alignment, bool nontemporal) {
953 build(odsBuilder, odsState, res, data, mask, pass_thru,
954 alignment: odsBuilder.getI64IntegerAttr(value: alignment),
955 nontemporal: nontemporal ? odsBuilder.getUnitAttr() : nullptr,
956 /*access_groups=*/access_groups: nullptr, /*alias_scopes=*/alias_scopes: nullptr,
957 /*noalias_scopes=*/noalias_scopes: nullptr, /*tbaa=*/tbaa: nullptr);
958
959}
960
961MaskedLoadOp MaskedLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type res, Value data, Value mask, Value pass_thru, uint64_t alignment, bool nontemporal) {
962 ::mlir::OperationState __state__(location, getOperationName());
963 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal));
964 auto __res__ = builder.create(state: __state__);
965 assert((::llvm::isa<MaskedLoadOp>(__res__)) && "builder didn't return the right type");
966 return ::llvm::cast<MaskedLoadOp>(Val: __res__);
967}
968
969MaskedLoadOp MaskedLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, Type res, Value data, Value mask, Value pass_thru, uint64_t alignment, bool nontemporal) {
970 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal));
971}
972
973void MaskedLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
974 auto &odsProperties = odsState.getOrAddProperties<Properties>();
975 odsState.addOperands(newOperands: data);
976 odsState.addOperands(newOperands: mask);
977 if (pass_thru)
978 odsState.addOperands(newOperands: pass_thru);
979 if (alignment) {
980 odsProperties.alignment = alignment;
981 }
982 if (nontemporal) {
983 odsProperties.nontemporal = nontemporal;
984 }
985 if (access_groups) {
986 odsProperties.access_groups = access_groups;
987 }
988 if (alias_scopes) {
989 odsProperties.alias_scopes = alias_scopes;
990 }
991 if (noalias_scopes) {
992 odsProperties.noalias_scopes = noalias_scopes;
993 }
994 if (tbaa) {
995 odsProperties.tbaa = tbaa;
996 }
997 odsState.addTypes(newTypes: res);
998}
999
1000MaskedLoadOp MaskedLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1001 ::mlir::OperationState __state__(location, getOperationName());
1002 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
1003 auto __res__ = builder.create(state: __state__);
1004 assert((::llvm::isa<MaskedLoadOp>(__res__)) && "builder didn't return the right type");
1005 return ::llvm::cast<MaskedLoadOp>(Val: __res__);
1006}
1007
1008MaskedLoadOp MaskedLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1009 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
1010}
1011
1012void MaskedLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1013 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1014 odsState.addOperands(newOperands: data);
1015 odsState.addOperands(newOperands: mask);
1016 if (pass_thru)
1017 odsState.addOperands(newOperands: pass_thru);
1018 if (alignment) {
1019 odsProperties.alignment = alignment;
1020 }
1021 if (nontemporal) {
1022 odsProperties.nontemporal = nontemporal;
1023 }
1024 if (access_groups) {
1025 odsProperties.access_groups = access_groups;
1026 }
1027 if (alias_scopes) {
1028 odsProperties.alias_scopes = alias_scopes;
1029 }
1030 if (noalias_scopes) {
1031 odsProperties.noalias_scopes = noalias_scopes;
1032 }
1033 if (tbaa) {
1034 odsProperties.tbaa = tbaa;
1035 }
1036 assert(resultTypes.size() == 1u && "mismatched number of results");
1037 odsState.addTypes(newTypes&: resultTypes);
1038}
1039
1040MaskedLoadOp MaskedLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1041 ::mlir::OperationState __state__(location, getOperationName());
1042 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
1043 auto __res__ = builder.create(state: __state__);
1044 assert((::llvm::isa<MaskedLoadOp>(__res__)) && "builder didn't return the right type");
1045 return ::llvm::cast<MaskedLoadOp>(Val: __res__);
1046}
1047
1048MaskedLoadOp MaskedLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1049 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
1050}
1051
1052void MaskedLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1053 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1054 odsState.addOperands(newOperands: data);
1055 odsState.addOperands(newOperands: mask);
1056 if (pass_thru)
1057 odsState.addOperands(newOperands: pass_thru);
1058 if (alignment) {
1059 odsProperties.alignment = alignment;
1060 }
1061 if (nontemporal) {
1062 odsProperties.nontemporal = ((nontemporal) ? odsBuilder.getUnitAttr() : nullptr);
1063 }
1064 if (access_groups) {
1065 odsProperties.access_groups = access_groups;
1066 }
1067 if (alias_scopes) {
1068 odsProperties.alias_scopes = alias_scopes;
1069 }
1070 if (noalias_scopes) {
1071 odsProperties.noalias_scopes = noalias_scopes;
1072 }
1073 if (tbaa) {
1074 odsProperties.tbaa = tbaa;
1075 }
1076 odsState.addTypes(newTypes: res);
1077}
1078
1079MaskedLoadOp MaskedLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1080 ::mlir::OperationState __state__(location, getOperationName());
1081 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
1082 auto __res__ = builder.create(state: __state__);
1083 assert((::llvm::isa<MaskedLoadOp>(__res__)) && "builder didn't return the right type");
1084 return ::llvm::cast<MaskedLoadOp>(Val: __res__);
1085}
1086
1087MaskedLoadOp MaskedLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1088 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
1089}
1090
1091void MaskedLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1092 auto &odsProperties = odsState.getOrAddProperties<Properties>();
1093 odsState.addOperands(newOperands: data);
1094 odsState.addOperands(newOperands: mask);
1095 if (pass_thru)
1096 odsState.addOperands(newOperands: pass_thru);
1097 if (alignment) {
1098 odsProperties.alignment = alignment;
1099 }
1100 if (nontemporal) {
1101 odsProperties.nontemporal = ((nontemporal) ? odsBuilder.getUnitAttr() : nullptr);
1102 }
1103 if (access_groups) {
1104 odsProperties.access_groups = access_groups;
1105 }
1106 if (alias_scopes) {
1107 odsProperties.alias_scopes = alias_scopes;
1108 }
1109 if (noalias_scopes) {
1110 odsProperties.noalias_scopes = noalias_scopes;
1111 }
1112 if (tbaa) {
1113 odsProperties.tbaa = tbaa;
1114 }
1115 assert(resultTypes.size() == 1u && "mismatched number of results");
1116 odsState.addTypes(newTypes&: resultTypes);
1117}
1118
1119MaskedLoadOp MaskedLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1120 ::mlir::OperationState __state__(location, getOperationName());
1121 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
1122 auto __res__ = builder.create(state: __state__);
1123 assert((::llvm::isa<MaskedLoadOp>(__res__)) && "builder didn't return the right type");
1124 return ::llvm::cast<MaskedLoadOp>(Val: __res__);
1125}
1126
1127MaskedLoadOp MaskedLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
1128 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
1129}
1130
1131void MaskedLoadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1132 assert(operands.size() >= 2u && "mismatched number of parameters");
1133 odsState.addOperands(newOperands: operands);
1134 buildPropertiesAndDiscardableAttributes(odsState, attributes);
1135 assert(resultTypes.size() == 1u && "mismatched number of return types");
1136 odsState.addTypes(newTypes&: resultTypes);
1137}
1138
1139MaskedLoadOp MaskedLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1140LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
1141
1142 ::mlir::OperationState __state__(location, getOperationName());
1143 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));
1144 auto __res__ = builder.create(state: __state__);
1145 assert((::llvm::isa<MaskedLoadOp>(__res__)) && "builder didn't return the right type");
1146 return ::llvm::cast<MaskedLoadOp>(Val: __res__);
1147LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
1148}
1149
1150MaskedLoadOp MaskedLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1151LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
1152
1153 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));
1154LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
1155}
1156
1157void MaskedLoadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1158 assert(operands.size() >= 2u && "mismatched number of parameters");
1159 odsState.addOperands(newOperands: operands);
1160 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
1161 odsState.addAttributes(newAttributes: discardableAttributes);
1162 assert(resultTypes.size() == 1u && "mismatched number of return types");
1163 odsState.addTypes(newTypes&: resultTypes);
1164}
1165
1166MaskedLoadOp MaskedLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1167 ::mlir::OperationState __state__(location, getOperationName());
1168 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));
1169 auto __res__ = builder.create(state: __state__);
1170 assert((::llvm::isa<MaskedLoadOp>(__res__)) && "builder didn't return the right type");
1171 return ::llvm::cast<MaskedLoadOp>(Val: __res__);
1172}
1173
1174MaskedLoadOp MaskedLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1175 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));
1176}
1177
1178::llvm::LogicalResult MaskedLoadOp::verifyInvariantsImpl() {
1179 auto tblgen_access_groups = getProperties().access_groups; (void)tblgen_access_groups;
1180 auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
1181 auto tblgen_alignment = getProperties().alignment; (void)tblgen_alignment;
1182 auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
1183 auto tblgen_nontemporal = getProperties().nontemporal; (void)tblgen_nontemporal;
1184 auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;
1185
1186 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, attr: tblgen_alignment, attrName: "alignment")))
1187 return ::mlir::failure();
1188
1189 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, attr: tblgen_nontemporal, attrName: "nontemporal")))
1190 return ::mlir::failure();
1191
1192 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, attr: tblgen_access_groups, attrName: "access_groups")))
1193 return ::mlir::failure();
1194
1195 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, attr: tblgen_alias_scopes, attrName: "alias_scopes")))
1196 return ::mlir::failure();
1197
1198 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, attr: tblgen_noalias_scopes, attrName: "noalias_scopes")))
1199 return ::mlir::failure();
1200
1201 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, attr: tblgen_tbaa, attrName: "tbaa")))
1202 return ::mlir::failure();
1203 {
1204 unsigned index = 0; (void)index;
1205 auto valueGroup0 = getODSOperands(index: 0);
1206
1207 for (auto v : valueGroup0) {
1208 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1209 return ::mlir::failure();
1210 }
1211 auto valueGroup1 = getODSOperands(index: 1);
1212
1213 for (auto v : valueGroup1) {
1214 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1215 return ::mlir::failure();
1216 }
1217 auto valueGroup2 = getODSOperands(index: 2);
1218
1219 if (valueGroup2.size() > 1) {
1220 return emitOpError(message: "operand group starting at #") << index
1221 << " requires 0 or 1 element, but found " << valueGroup2.size();
1222 }
1223
1224 for (auto v : valueGroup2) {
1225 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
1226 return ::mlir::failure();
1227 }
1228 }
1229 {
1230 unsigned index = 0; (void)index;
1231 auto valueGroup0 = getODSResults(index: 0);
1232
1233 for (auto v : valueGroup0) {
1234 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
1235 return ::mlir::failure();
1236 }
1237 }
1238 return ::mlir::success();
1239}
1240
1241::llvm::LogicalResult MaskedLoadOp::verifyInvariants() {
1242 return verifyInvariantsImpl();
1243}
1244
1245::mlir::ParseResult MaskedLoadOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1246 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
1247 ::mlir::IntegerAttr alignmentAttr;
1248 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
1249 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
1250 if (parser.parseLParen())
1251 return ::mlir::failure();
1252 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
1253 if (parser.parseOperandList(result&: allOperands))
1254 return ::mlir::failure();
1255 if (parser.parseRParen())
1256 return ::mlir::failure();
1257 if (::mlir::succeeded(Result: parser.parseOptionalComma())) {
1258 if (parser.parseKeyword(keyword: "alignment"))
1259 return ::mlir::failure();
1260 if (parser.parseLParen())
1261 return ::mlir::failure();
1262
1263 if (parser.parseCustomAttributeWithFallback(result&: alignmentAttr, type: parser.getBuilder().getIntegerType(width: 64))) {
1264 return ::mlir::failure();
1265 }
1266 if (alignmentAttr) result.getOrAddProperties<MaskedLoadOp::Properties>().alignment = alignmentAttr;
1267 if (parser.parseRParen())
1268 return ::mlir::failure();
1269 }
1270 if (parseProperties(parser, result))
1271 return ::mlir::failure();
1272 {
1273 auto loc = parser.getCurrentLocation();(void)loc;
1274 if (parser.parseOptionalAttrDict(result&: result.attributes))
1275 return ::mlir::failure();
1276 if (result.attributes.get(name: "alignment"))
1277 return parser.emitError(loc, message: "inherent attribute 'alignment' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
1278 if (result.attributes.get(name: "nontemporal"))
1279 return parser.emitError(loc, message: "inherent attribute 'nontemporal' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
1280 if (result.attributes.get(name: "access_groups"))
1281 return parser.emitError(loc, message: "inherent attribute 'access_groups' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
1282 if (result.attributes.get(name: "alias_scopes"))
1283 return parser.emitError(loc, message: "inherent attribute 'alias_scopes' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
1284 if (result.attributes.get(name: "noalias_scopes"))
1285 return parser.emitError(loc, message: "inherent attribute 'noalias_scopes' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
1286 if (result.attributes.get(name: "tbaa"))
1287 return parser.emitError(loc, message: "inherent attribute 'tbaa' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
1288 }
1289 if (parser.parseColon())
1290 return ::mlir::failure();
1291
1292 ::mlir::FunctionType allOperand__allResult_functionType;
1293 if (parser.parseType(result&: allOperand__allResult_functionType))
1294 return ::mlir::failure();
1295 allOperandTypes = allOperand__allResult_functionType.getInputs();
1296 allResultTypes = allOperand__allResult_functionType.getResults();
1297 result.addTypes(newTypes: allResultTypes);
1298 // coverity[ARRAY_VS_SINGLETON]
1299 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
1300 return ::mlir::failure();
1301 return ::mlir::success();
1302}
1303
1304::llvm::LogicalResult MaskedLoadOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1305 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
1306 if (!dict) {
1307 emitError() << "expected DictionaryAttr to set properties";
1308 return ::mlir::failure();
1309 }
1310 // keep track of used keys in the input dictionary to be able to error out
1311 // if there are some unknown ones.
1312 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
1313 ::mlir::MLIRContext *ctx = dict.getContext();
1314 (void)ctx;
1315 {
1316
1317 auto &propStorage = prop.nontemporal;
1318 auto nontemporalAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "nontemporal");
1319 auto attr = dict.get(name: nontemporalAttrName);
1320 usedKeys.insert(V: nontemporalAttrName);
1321 if (attr || /*isRequired=*/false) {
1322 if (!attr) {
1323 emitError() << "expected key entry for nontemporal in DictionaryAttr to set "
1324 "Properties.";
1325 return ::mlir::failure();
1326 }
1327 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
1328 if (convertedAttr) {
1329 propStorage = convertedAttr;
1330 } else {
1331 emitError() << "Invalid attribute `nontemporal` in property conversion: " << attr;
1332 return ::mlir::failure();
1333 }
1334 }
1335 }
1336 {
1337
1338 auto &propStorage = prop.access_groups;
1339 auto access_groupsAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "access_groups");
1340 auto attr = dict.get(name: access_groupsAttrName);
1341 usedKeys.insert(V: access_groupsAttrName);
1342 if (attr || /*isRequired=*/false) {
1343 if (!attr) {
1344 emitError() << "expected key entry for access_groups in DictionaryAttr to set "
1345 "Properties.";
1346 return ::mlir::failure();
1347 }
1348 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
1349 if (convertedAttr) {
1350 propStorage = convertedAttr;
1351 } else {
1352 emitError() << "Invalid attribute `access_groups` in property conversion: " << attr;
1353 return ::mlir::failure();
1354 }
1355 }
1356 }
1357 {
1358
1359 auto &propStorage = prop.alias_scopes;
1360 auto alias_scopesAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "alias_scopes");
1361 auto attr = dict.get(name: alias_scopesAttrName);
1362 usedKeys.insert(V: alias_scopesAttrName);
1363 if (attr || /*isRequired=*/false) {
1364 if (!attr) {
1365 emitError() << "expected key entry for alias_scopes in DictionaryAttr to set "
1366 "Properties.";
1367 return ::mlir::failure();
1368 }
1369 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
1370 if (convertedAttr) {
1371 propStorage = convertedAttr;
1372 } else {
1373 emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
1374 return ::mlir::failure();
1375 }
1376 }
1377 }
1378 {
1379
1380 auto &propStorage = prop.noalias_scopes;
1381 auto noalias_scopesAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "noalias_scopes");
1382 auto attr = dict.get(name: noalias_scopesAttrName);
1383 usedKeys.insert(V: noalias_scopesAttrName);
1384 if (attr || /*isRequired=*/false) {
1385 if (!attr) {
1386 emitError() << "expected key entry for noalias_scopes in DictionaryAttr to set "
1387 "Properties.";
1388 return ::mlir::failure();
1389 }
1390 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
1391 if (convertedAttr) {
1392 propStorage = convertedAttr;
1393 } else {
1394 emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
1395 return ::mlir::failure();
1396 }
1397 }
1398 }
1399 {
1400
1401 auto &propStorage = prop.tbaa;
1402 auto tbaaAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tbaa");
1403 auto attr = dict.get(name: tbaaAttrName);
1404 usedKeys.insert(V: tbaaAttrName);
1405 if (attr || /*isRequired=*/false) {
1406 if (!attr) {
1407 emitError() << "expected key entry for tbaa in DictionaryAttr to set "
1408 "Properties.";
1409 return ::mlir::failure();
1410 }
1411 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
1412 if (convertedAttr) {
1413 propStorage = convertedAttr;
1414 } else {
1415 emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
1416 return ::mlir::failure();
1417 }
1418 }
1419 }
1420
1421 for (::mlir::NamedAttribute attr : dict) {
1422 if (!usedKeys.contains(V: attr.getName()))
1423 return emitError() << "unknown key '" << attr.getName() <<
1424 "' when parsing properties dictionary";
1425 }
1426 return ::mlir::success();
1427}
1428
1429::mlir::ParseResult MaskedLoadOp::parsePropertiesFromKeyValueList(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1430 auto &prop = result.getOrAddProperties<Properties>();
1431 (void)prop;
1432 bool seen_nontemporal = false;
1433 bool seen_access_groups = false;
1434 bool seen_alias_scopes = false;
1435 bool seen_noalias_scopes = false;
1436 bool seen_tbaa = false;
1437
1438 if (succeeded(Result: parser.parseOptionalLess())) {
1439 ::llvm::SMLoc dictionaryLoc = parser.getCurrentLocation();
1440 ::mlir::NamedAttrList propertyAttributes;
1441 if (parser.parseOptionalAttrDict(result&: propertyAttributes))
1442 return ::mlir::failure();
1443 if (dictionaryLoc != parser.getCurrentLocation()) {
1444 if (parser.parseGreater())
1445 return ::mlir::failure();
1446 auto propertyDictionary =
1447 ::mlir::DictionaryAttr::get(context: parser.getContext(), value: propertyAttributes);
1448 return setPropertiesFromParsedAttr(prop, attr: propertyDictionary, emitError: [&]() {
1449 return parser.emitError(loc: dictionaryLoc)
1450 << "invalid properties " << propertyDictionary << ": ";
1451 });
1452 }
1453
1454 bool reachedEnd = succeeded(Result: parser.parseOptionalGreater());
1455 while (!reachedEnd) {
1456 ::llvm::SMLoc keyLoc = parser.getCurrentLocation();
1457 ::llvm::StringRef key;
1458 if (parser.parseKeyword(keyword: &key))
1459 return ::mlir::failure();
1460 bool isUnitKey = key == "nontemporal";
1461 if (!isUnitKey && parser.parseEqual())
1462 return ::mlir::failure();
1463 if (!seen_nontemporal && key == "nontemporal") {
1464 seen_nontemporal = true;
1465 if (succeeded(Result: parser.parseOptionalEqual())) {
1466 ::mlir::UnitAttr nontemporalAttr;
1467
1468 if (parser.parseCustomAttributeWithFallback(result&: nontemporalAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
1469 return ::mlir::failure();
1470 }
1471 if (nontemporalAttr) result.getOrAddProperties<MaskedLoadOp::Properties>().nontemporal = nontemporalAttr;
1472 } else {
1473 prop.nontemporal = parser.getBuilder().getUnitAttr();
1474 }
1475 }
1476 else if (!seen_access_groups && key == "access_groups") {
1477 seen_access_groups = true;
1478 ::mlir::ArrayAttr access_groupsAttr;
1479
1480 if (parser.parseCustomAttributeWithFallback(result&: access_groupsAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
1481 return ::mlir::failure();
1482 }
1483 if (access_groupsAttr) result.getOrAddProperties<MaskedLoadOp::Properties>().access_groups = access_groupsAttr;
1484 }
1485 else if (!seen_alias_scopes && key == "alias_scopes") {
1486 seen_alias_scopes = true;
1487 ::mlir::ArrayAttr alias_scopesAttr;
1488
1489 if (parser.parseCustomAttributeWithFallback(result&: alias_scopesAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
1490 return ::mlir::failure();
1491 }
1492 if (alias_scopesAttr) result.getOrAddProperties<MaskedLoadOp::Properties>().alias_scopes = alias_scopesAttr;
1493 }
1494 else if (!seen_noalias_scopes && key == "noalias_scopes") {
1495 seen_noalias_scopes = true;
1496 ::mlir::ArrayAttr noalias_scopesAttr;
1497
1498 if (parser.parseCustomAttributeWithFallback(result&: noalias_scopesAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
1499 return ::mlir::failure();
1500 }
1501 if (noalias_scopesAttr) result.getOrAddProperties<MaskedLoadOp::Properties>().noalias_scopes = noalias_scopesAttr;
1502 }
1503 else if (!seen_tbaa && key == "tbaa") {
1504 seen_tbaa = true;
1505 ::mlir::ArrayAttr tbaaAttr;
1506
1507 if (parser.parseCustomAttributeWithFallback(result&: tbaaAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
1508 return ::mlir::failure();
1509 }
1510 if (tbaaAttr) result.getOrAddProperties<MaskedLoadOp::Properties>().tbaa = tbaaAttr;
1511 }
1512
1513 else {
1514 return parser.emitError(
1515 loc: keyLoc,
1516 message: "duplicate or unknown property in properties dictionary: ")
1517 << key;
1518 }
1519
1520 reachedEnd = succeeded(Result: parser.parseOptionalGreater());
1521 if (!reachedEnd && parser.parseComma())
1522 return ::mlir::failure();
1523 }
1524 }
1525 return ::mlir::success();
1526}
1527
1528LLVM_ATTRIBUTE_MINSIZE void MaskedLoadOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
1529 _odsPrinter << "(";
1530 _odsPrinter << getOperation()->getOperands();
1531 _odsPrinter << ")";
1532 if (getAlignmentAttr()) {
1533 _odsPrinter << ",";
1534 _odsPrinter << " alignment";
1535 _odsPrinter << "(";
1536 _odsPrinter.printAttributeWithoutType(attr: getAlignmentAttr());
1537 _odsPrinter << ")";
1538 }
1539 ::llvm::SmallVector<::llvm::StringRef, 2> elidedProps;
1540 elidedProps.push_back(Elt: "alignment");
1541 {
1542 ::mlir::Builder odsBuilder((*this)->getContext());
1543 ::mlir::Attribute attr = getNontemporalAttr();
1544 if(attr && (attr == ((false) ? odsBuilder.getUnitAttr() : nullptr)))
1545 elidedProps.push_back(Elt: "nontemporal");
1546 }
1547 printProperties(ctx: (*this)->getContext(), p&: _odsPrinter, properties: getProperties(), elidedProps);
1548 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
1549 _odsPrinter << " :";
1550 _odsPrinter << ' ';
1551 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
1552}
1553
1554void MaskedLoadOp::_odsPrintPropertiesAsKeyValueList(::mlir::MLIRContext *_odsContext, ::mlir::OpAsmPrinter &_odsPrinter, const Properties &prop, ::mlir::ArrayRef<::llvm::StringRef> elidedProps) {
1555 bool first = true;
1556 auto printKey = [&](::llvm::StringRef name, bool printValue) {
1557 _odsPrinter << (first ? " <" : ", ") << name;
1558 if (printValue)
1559 _odsPrinter << " = ";
1560 first = false;
1561 };
1562 auto shouldPrint = [&](::llvm::StringRef name) {
1563 return !::llvm::is_contained(Range&: elidedProps, Element: name);
1564 };
1565 if (shouldPrint("alignment") && prop.alignment) {
1566 printKey("alignment", /*printValue=*/true);
1567 _odsPrinter.printAttributeWithoutType(attr: prop.alignment);
1568 }
1569 if (shouldPrint("nontemporal") && prop.nontemporal) {
1570 printKey("nontemporal", /*printValue=*/false);
1571 }
1572 if (shouldPrint("access_groups") && prop.access_groups) {
1573 printKey("access_groups", /*printValue=*/true);
1574 _odsPrinter.printAttributeWithoutType(attr: prop.access_groups);
1575 }
1576 if (shouldPrint("alias_scopes") && prop.alias_scopes) {
1577 printKey("alias_scopes", /*printValue=*/true);
1578 _odsPrinter.printAttributeWithoutType(attr: prop.alias_scopes);
1579 }
1580 if (shouldPrint("noalias_scopes") && prop.noalias_scopes) {
1581 printKey("noalias_scopes", /*printValue=*/true);
1582 _odsPrinter.printAttributeWithoutType(attr: prop.noalias_scopes);
1583 }
1584 if (shouldPrint("tbaa") && prop.tbaa) {
1585 printKey("tbaa", /*printValue=*/true);
1586 _odsPrinter.printAttributeWithoutType(attr: prop.tbaa);
1587 }
1588 if (!first)
1589 _odsPrinter << ">";
1590}
1591
1592void MaskedLoadOp::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1593 Properties &properties = odsState.getOrAddProperties<Properties>();
1594 populateDefaultProperties(opName: odsState.name, properties);
1595 const ::llvm::StringRef inherentNames[] = {"alignment", "nontemporal", "access_groups", "alias_scopes", "noalias_scopes", "tbaa"};
1596 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
1597 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
1598 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
1599 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
1600 });
1601}
1602
1603
1604} // namespace mlir::LLVM
1605MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::MaskedLoadOp)
1606MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MaskedLoadOpGenericAdaptorBase::Properties)
1607
1608namespace mlir::LLVM {
1609
1610
1611//===----------------------------------------------------------------------===//
1612// ::mlir::LLVM::MaskedStoreOp definitions
1613//===----------------------------------------------------------------------===//
1614
1615namespace detail {
1616
1617MaskedStoreOpGenericAdaptorBase::MaskedStoreOpGenericAdaptorBase(MaskedStoreOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
1618
1619::std::optional<uint64_t> MaskedStoreOpGenericAdaptorBase::getAlignment() {
1620 auto attr = getAlignmentAttr();
1621 return attr ? ::std::optional<uint64_t>(attr.getValue().getZExtValue()) : (::std::nullopt);
1622}
1623
1624::mlir::UnitAttr MaskedStoreOpGenericAdaptorBase::getNontemporalAttr() {
1625 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(Val: getProperties().nontemporal);
1626 if (!attr)
1627 attr = ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr);
1628 return attr;
1629}
1630
1631bool MaskedStoreOpGenericAdaptorBase::getNontemporal() {
1632 auto attr = getNontemporalAttr();
1633 if (!attr)
1634 return ((false) ? ::mlir::Builder(odsAttrs.getContext()).getUnitAttr() : nullptr) != nullptr;
1635 return attr != nullptr;
1636}
1637
1638::std::optional< ::mlir::ArrayAttr > MaskedStoreOpGenericAdaptorBase::getAccessGroups() {
1639 auto attr = getAccessGroupsAttr();
1640 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1641}
1642
1643::std::optional< ::mlir::ArrayAttr > MaskedStoreOpGenericAdaptorBase::getAliasScopes() {
1644 auto attr = getAliasScopesAttr();
1645 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1646}
1647
1648::std::optional< ::mlir::ArrayAttr > MaskedStoreOpGenericAdaptorBase::getNoaliasScopes() {
1649 auto attr = getNoaliasScopesAttr();
1650 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1651}
1652
1653::std::optional< ::mlir::ArrayAttr > MaskedStoreOpGenericAdaptorBase::getTbaa() {
1654 auto attr = getTbaaAttr();
1655 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1656}
1657
1658
1659} // namespace detail
1660MaskedStoreOpAdaptor::MaskedStoreOpAdaptor(MaskedStoreOp op) : MaskedStoreOpGenericAdaptor(op->getOperands(), op) {}
1661
1662::llvm::LogicalResult MaskedStoreOpAdaptor::verify(::mlir::Location loc) {
1663 auto tblgen_access_groups = getProperties().access_groups; (void)tblgen_access_groups;
1664 auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
1665 auto tblgen_alignment = getProperties().alignment; (void)tblgen_alignment;
1666 auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
1667 auto tblgen_nontemporal = getProperties().nontemporal; (void)tblgen_nontemporal;
1668 auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;
1669
1670 if (tblgen_alignment && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_alignment))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_alignment).getType().isSignlessInteger(width: 64)))))
1671 return emitError(loc, message: "'llvm.intr.masked.store' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute");
1672
1673 if (tblgen_nontemporal && !((::llvm::isa<::mlir::UnitAttr>(Val: tblgen_nontemporal))))
1674 return emitError(loc, message: "'llvm.intr.masked.store' op attribute 'nontemporal' failed to satisfy constraint: unit attribute");
1675
1676 if (tblgen_access_groups && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_access_groups))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_access_groups), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AccessGroupAttr>(Val: attr))); }))))
1677 return emitError(loc, message: "'llvm.intr.masked.store' op attribute 'access_groups' failed to satisfy constraint: LLVM dialect access group metadata array");
1678
1679 if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_alias_scopes))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_alias_scopes), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
1680 return emitError(loc, message: "'llvm.intr.masked.store' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");
1681
1682 if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_noalias_scopes))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_noalias_scopes), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
1683 return emitError(loc, message: "'llvm.intr.masked.store' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");
1684
1685 if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_tbaa))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_tbaa), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(Val: attr))); }))))
1686 return emitError(loc, message: "'llvm.intr.masked.store' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
1687 return ::mlir::success();
1688}
1689
1690::llvm::LogicalResult MaskedStoreOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1691 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
1692 if (!dict) {
1693 emitError() << "expected DictionaryAttr to set properties";
1694 return ::mlir::failure();
1695 }
1696
1697 {
1698 auto attr = dict.get(name: "access_groups");
1699 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1700 storage&: prop.access_groups, attr, name: "access_groups", emitError)))
1701 return ::mlir::failure();
1702 }
1703
1704 {
1705 auto attr = dict.get(name: "alias_scopes");
1706 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1707 storage&: prop.alias_scopes, attr, name: "alias_scopes", emitError)))
1708 return ::mlir::failure();
1709 }
1710
1711 {
1712 auto attr = dict.get(name: "alignment");
1713 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1714 storage&: prop.alignment, attr, name: "alignment", emitError)))
1715 return ::mlir::failure();
1716 }
1717
1718 {
1719 auto attr = dict.get(name: "noalias_scopes");
1720 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1721 storage&: prop.noalias_scopes, attr, name: "noalias_scopes", emitError)))
1722 return ::mlir::failure();
1723 }
1724
1725 {
1726 auto attr = dict.get(name: "nontemporal");
1727 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1728 storage&: prop.nontemporal, attr, name: "nontemporal", emitError)))
1729 return ::mlir::failure();
1730 }
1731
1732 {
1733 auto attr = dict.get(name: "tbaa");
1734 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
1735 storage&: prop.tbaa, attr, name: "tbaa", emitError)))
1736 return ::mlir::failure();
1737 }
1738 return ::mlir::success();
1739}
1740
1741::mlir::Attribute MaskedStoreOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
1742 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1743 ::mlir::Builder odsBuilder{ctx};
1744 ::mlir::detail::appendAttributeProperty(attrs, name: "access_groups", attr: prop.access_groups);
1745 ::mlir::detail::appendAttributeProperty(attrs, name: "alias_scopes", attr: prop.alias_scopes);
1746 ::mlir::detail::appendAttributeProperty(attrs, name: "alignment", attr: prop.alignment);
1747 ::mlir::detail::appendAttributeProperty(attrs, name: "noalias_scopes", attr: prop.noalias_scopes);
1748 ::mlir::detail::appendAttributeProperty(attrs, name: "nontemporal", attr: prop.nontemporal);
1749 ::mlir::detail::appendAttributeProperty(attrs, name: "tbaa", attr: prop.tbaa);
1750
1751 if (!attrs.empty())
1752 return odsBuilder.getDictionaryAttr(value: attrs);
1753 return {};
1754}
1755
1756llvm::hash_code MaskedStoreOp::computePropertiesHash(const Properties &prop) {
1757 using llvm::hash_value;
1758 return llvm::hash_combine(
1759 args: llvm::hash_value(ptr: prop.access_groups.getAsOpaquePointer()),
1760 args: llvm::hash_value(ptr: prop.alias_scopes.getAsOpaquePointer()),
1761 args: llvm::hash_value(ptr: prop.alignment.getAsOpaquePointer()),
1762 args: llvm::hash_value(ptr: prop.noalias_scopes.getAsOpaquePointer()),
1763 args: llvm::hash_value(ptr: prop.nontemporal.getAsOpaquePointer()),
1764 args: llvm::hash_value(ptr: prop.tbaa.getAsOpaquePointer()));
1765}
1766
1767std::optional<mlir::Attribute> MaskedStoreOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
1768 if (name == "access_groups")
1769 return prop.access_groups;
1770
1771 if (name == "alias_scopes")
1772 return prop.alias_scopes;
1773
1774 if (name == "alignment")
1775 return prop.alignment;
1776
1777 if (name == "noalias_scopes")
1778 return prop.noalias_scopes;
1779
1780 if (name == "nontemporal")
1781 return prop.nontemporal;
1782
1783 if (name == "tbaa")
1784 return prop.tbaa;
1785 return std::nullopt;
1786}
1787
1788void MaskedStoreOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
1789 if (name == "access_groups") {
1790 prop.access_groups = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.access_groups)>>(Val&: value);
1791 return;
1792 }
1793
1794 if (name == "alias_scopes") {
1795 prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(Val&: value);
1796 return;
1797 }
1798
1799 if (name == "alignment") {
1800 prop.alignment = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alignment)>>(Val&: value);
1801 return;
1802 }
1803
1804 if (name == "noalias_scopes") {
1805 prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(Val&: value);
1806 return;
1807 }
1808
1809 if (name == "nontemporal") {
1810 prop.nontemporal = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.nontemporal)>>(Val&: value);
1811 return;
1812 }
1813
1814 if (name == "tbaa") {
1815 prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(Val&: value);
1816 return;
1817 }
1818}
1819
1820void MaskedStoreOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
1821 if (prop.access_groups) {
1822 ::mlir::Attribute value = prop.access_groups;
1823 ::mlir::Attribute originalValue = value;
1824 visitor("access_groups", value);
1825 if (value != originalValue)
1826 setInherentAttr(prop, name: "access_groups", value);
1827 }
1828
1829 if (prop.alias_scopes) {
1830 ::mlir::Attribute value = prop.alias_scopes;
1831 ::mlir::Attribute originalValue = value;
1832 visitor("alias_scopes", value);
1833 if (value != originalValue)
1834 setInherentAttr(prop, name: "alias_scopes", value);
1835 }
1836
1837 if (prop.alignment) {
1838 ::mlir::Attribute value = prop.alignment;
1839 ::mlir::Attribute originalValue = value;
1840 visitor("alignment", value);
1841 if (value != originalValue)
1842 setInherentAttr(prop, name: "alignment", value);
1843 }
1844
1845 if (prop.noalias_scopes) {
1846 ::mlir::Attribute value = prop.noalias_scopes;
1847 ::mlir::Attribute originalValue = value;
1848 visitor("noalias_scopes", value);
1849 if (value != originalValue)
1850 setInherentAttr(prop, name: "noalias_scopes", value);
1851 }
1852
1853 if (prop.nontemporal) {
1854 ::mlir::Attribute value = prop.nontemporal;
1855 ::mlir::Attribute originalValue = value;
1856 visitor("nontemporal", value);
1857 if (value != originalValue)
1858 setInherentAttr(prop, name: "nontemporal", value);
1859 }
1860
1861 if (prop.tbaa) {
1862 ::mlir::Attribute value = prop.tbaa;
1863 ::mlir::Attribute originalValue = value;
1864 visitor("tbaa", value);
1865 if (value != originalValue)
1866 setInherentAttr(prop, name: "tbaa", value);
1867 }
1868}
1869
1870::llvm::LogicalResult MaskedStoreOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1871 {
1872 ::mlir::Attribute attr = attrs.get(name: getAccessGroupsAttrName(name: opName));
1873 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(attr, attrName: "access_groups", emitError)))
1874 return ::mlir::failure();
1875 }
1876
1877 {
1878 ::mlir::Attribute attr = attrs.get(name: getAliasScopesAttrName(name: opName));
1879 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName: "alias_scopes", emitError)))
1880 return ::mlir::failure();
1881 }
1882
1883 {
1884 ::mlir::Attribute attr = attrs.get(name: getAlignmentAttrName(name: opName));
1885 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(attr, attrName: "alignment", emitError)))
1886 return ::mlir::failure();
1887 }
1888
1889 {
1890 ::mlir::Attribute attr = attrs.get(name: getNoaliasScopesAttrName(name: opName));
1891 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName: "noalias_scopes", emitError)))
1892 return ::mlir::failure();
1893 }
1894
1895 {
1896 ::mlir::Attribute attr = attrs.get(name: getNontemporalAttrName(name: opName));
1897 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps2(attr, attrName: "nontemporal", emitError)))
1898 return ::mlir::failure();
1899 }
1900
1901 {
1902 ::mlir::Attribute attr = attrs.get(name: getTbaaAttrName(name: opName));
1903 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(attr, attrName: "tbaa", emitError)))
1904 return ::mlir::failure();
1905 }
1906 return ::mlir::success();
1907}
1908
1909::llvm::LogicalResult MaskedStoreOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
1910 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
1911 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.access_groups)))
1912 return ::mlir::failure();
1913
1914 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.alias_scopes)))
1915 return ::mlir::failure();
1916
1917 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.alignment)))
1918 return ::mlir::failure();
1919
1920 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.noalias_scopes)))
1921 return ::mlir::failure();
1922
1923 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.nontemporal)))
1924 return ::mlir::failure();
1925
1926 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.tbaa)))
1927 return ::mlir::failure();
1928 return ::mlir::success();
1929}
1930
1931void MaskedStoreOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
1932 auto &prop = getProperties(); (void)prop;
1933
1934 writer.writeOptionalAttribute(attr: prop.access_groups);
1935
1936 writer.writeOptionalAttribute(attr: prop.alias_scopes);
1937
1938 writer.writeOptionalAttribute(attr: prop.alignment);
1939
1940 writer.writeOptionalAttribute(attr: prop.noalias_scopes);
1941
1942 writer.writeOptionalAttribute(attr: prop.nontemporal);
1943
1944 writer.writeOptionalAttribute(attr: prop.tbaa);
1945}
1946
1947::std::optional<uint64_t> MaskedStoreOp::getAlignment() {
1948 auto attr = getAlignmentAttr();
1949 return attr ? ::std::optional<uint64_t>(attr.getValue().getZExtValue()) : (::std::nullopt);
1950}
1951
1952bool MaskedStoreOp::getNontemporal() {
1953 auto attr = getNontemporalAttr();
1954 if (!attr)
1955 return ((false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr) != nullptr;
1956 return attr != nullptr;
1957}
1958
1959::std::optional< ::mlir::ArrayAttr > MaskedStoreOp::getAccessGroups() {
1960 auto attr = getAccessGroupsAttr();
1961 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1962}
1963
1964::std::optional< ::mlir::ArrayAttr > MaskedStoreOp::getAliasScopes() {
1965 auto attr = getAliasScopesAttr();
1966 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1967}
1968
1969::std::optional< ::mlir::ArrayAttr > MaskedStoreOp::getNoaliasScopes() {
1970 auto attr = getNoaliasScopesAttr();
1971 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1972}
1973
1974::std::optional< ::mlir::ArrayAttr > MaskedStoreOp::getTbaa() {
1975 auto attr = getTbaaAttr();
1976 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1977}
1978
1979void MaskedStoreOp::setAlignment(::std::optional<uint64_t> attrValue) {
1980 auto &odsProp = getProperties().alignment;
1981 if (attrValue)
1982 odsProp = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 64), value: *attrValue);
1983 else
1984 odsProp = nullptr;
1985}
1986
1987void MaskedStoreOp::setNontemporal(bool attrValue) {
1988 auto &odsProp = getProperties().nontemporal;
1989 if (attrValue)
1990 odsProp = ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() : nullptr);
1991 else
1992 odsProp = nullptr;
1993}
1994
1995void MaskedStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
1996 assert(isCompatibleType(resultType) && "result must be an LLVM type");
1997 assert(::llvm::isa<LLVMVoidType>(resultType) &&
1998 "for zero-result operands, only 'void' is accepted as result type");
1999 build(odsBuilder, odsState, operands, attributes);
2000
2001}
2002
2003MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
2004 ::mlir::OperationState __state__(location, getOperationName());
2005 build(odsBuilder&: builder, odsState&: __state__, resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2006 auto __res__ = builder.create(state: __state__);
2007 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2008 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2009}
2010
2011MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
2012 return create(builder, location: builder.getLoc(), resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2013}
2014
2015void MaskedStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
2016 odsState.addOperands(newOperands: operands);
2017 for (auto namedAttr : attributes)
2018 odsState.addAttribute(name: namedAttr.getName(), attr: namedAttr.getValue());
2019
2020}
2021
2022MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
2023 ::mlir::OperationState __state__(location, getOperationName());
2024 build(odsBuilder&: builder, odsState&: __state__, operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2025 auto __res__ = builder.create(state: __state__);
2026 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2027 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2028}
2029
2030MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
2031 return create(builder, location: builder.getLoc(), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2032}
2033
2034void MaskedStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value value, Value data, Value mask, uint64_t alignment, bool nontemporal) {
2035 build(odsBuilder, odsState, value, data, mask,
2036 alignment: odsBuilder.getI64IntegerAttr(value: alignment),
2037 nontemporal: nontemporal ? odsBuilder.getUnitAttr() : nullptr,
2038 /*access_groups=*/access_groups: nullptr, /*alias_scopes=*/alias_scopes: nullptr,
2039 /*noalias_scopes=*/noalias_scopes: nullptr, /*tbaa=*/tbaa: nullptr);
2040
2041}
2042
2043MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Value value, Value data, Value mask, uint64_t alignment, bool nontemporal) {
2044 ::mlir::OperationState __state__(location, getOperationName());
2045 build(odsBuilder&: builder, odsState&: __state__, value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal));
2046 auto __res__ = builder.create(state: __state__);
2047 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2048 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2049}
2050
2051MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, Value value, Value data, Value mask, uint64_t alignment, bool nontemporal) {
2052 return create(builder, location: builder.getLoc(), value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal));
2053}
2054
2055void MaskedStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2056 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, value, data, mask, alignment, nontemporal, access_groups, alias_scopes, noalias_scopes, tbaa);
2057}
2058
2059MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2060 ::mlir::OperationState __state__(location, getOperationName());
2061 build(odsBuilder&: builder, odsState&: __state__, value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
2062 auto __res__ = builder.create(state: __state__);
2063 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2064 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2065}
2066
2067MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2068 return create(builder, location: builder.getLoc(), value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
2069}
2070
2071void MaskedStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2072 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2073 odsState.addOperands(newOperands: value);
2074 odsState.addOperands(newOperands: data);
2075 odsState.addOperands(newOperands: mask);
2076 if (alignment) {
2077 odsProperties.alignment = alignment;
2078 }
2079 if (nontemporal) {
2080 odsProperties.nontemporal = nontemporal;
2081 }
2082 if (access_groups) {
2083 odsProperties.access_groups = access_groups;
2084 }
2085 if (alias_scopes) {
2086 odsProperties.alias_scopes = alias_scopes;
2087 }
2088 if (noalias_scopes) {
2089 odsProperties.noalias_scopes = noalias_scopes;
2090 }
2091 if (tbaa) {
2092 odsProperties.tbaa = tbaa;
2093 }
2094 assert(resultTypes.size() == 0u && "mismatched number of results");
2095 odsState.addTypes(newTypes&: resultTypes);
2096}
2097
2098MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2099 ::mlir::OperationState __state__(location, getOperationName());
2100 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
2101 auto __res__ = builder.create(state: __state__);
2102 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2103 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2104}
2105
2106MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2107 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
2108}
2109
2110void MaskedStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2111 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, value, data, mask, alignment, nontemporal, access_groups, alias_scopes, noalias_scopes, tbaa);
2112}
2113
2114MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2115 ::mlir::OperationState __state__(location, getOperationName());
2116 build(odsBuilder&: builder, odsState&: __state__, value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
2117 auto __res__ = builder.create(state: __state__);
2118 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2119 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2120}
2121
2122MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2123 return create(builder, location: builder.getLoc(), value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
2124}
2125
2126void MaskedStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2127 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2128 odsState.addOperands(newOperands: value);
2129 odsState.addOperands(newOperands: data);
2130 odsState.addOperands(newOperands: mask);
2131 if (alignment) {
2132 odsProperties.alignment = alignment;
2133 }
2134 if (nontemporal) {
2135 odsProperties.nontemporal = ((nontemporal) ? odsBuilder.getUnitAttr() : nullptr);
2136 }
2137 if (access_groups) {
2138 odsProperties.access_groups = access_groups;
2139 }
2140 if (alias_scopes) {
2141 odsProperties.alias_scopes = alias_scopes;
2142 }
2143 if (noalias_scopes) {
2144 odsProperties.noalias_scopes = noalias_scopes;
2145 }
2146 if (tbaa) {
2147 odsProperties.tbaa = tbaa;
2148 }
2149 assert(resultTypes.size() == 0u && "mismatched number of results");
2150 odsState.addTypes(newTypes&: resultTypes);
2151}
2152
2153MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2154 ::mlir::OperationState __state__(location, getOperationName());
2155 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
2156 auto __res__ = builder.create(state: __state__);
2157 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2158 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2159}
2160
2161MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/bool nontemporal, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
2162 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), value: std::forward<decltype(value)>(t&: value), data: std::forward<decltype(data)>(t&: data), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), nontemporal: std::forward<decltype(nontemporal)>(t&: nontemporal), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
2163}
2164
2165void MaskedStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2166 assert(operands.size() == 3u && "mismatched number of parameters");
2167 odsState.addOperands(newOperands: operands);
2168 buildPropertiesAndDiscardableAttributes(odsState, attributes);
2169 assert(resultTypes.size() == 0u && "mismatched number of return types");
2170 odsState.addTypes(newTypes&: resultTypes);
2171}
2172
2173MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2174LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
2175
2176 ::mlir::OperationState __state__(location, getOperationName());
2177 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));
2178 auto __res__ = builder.create(state: __state__);
2179 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2180 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2181LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
2182}
2183
2184MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2185LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
2186
2187 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));
2188LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
2189}
2190
2191void MaskedStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2192 assert(operands.size() == 3u && "mismatched number of parameters");
2193 odsState.addOperands(newOperands: operands);
2194 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
2195 odsState.addAttributes(newAttributes: discardableAttributes);
2196 assert(resultTypes.size() == 0u && "mismatched number of return types");
2197 odsState.addTypes(newTypes&: resultTypes);
2198}
2199
2200MaskedStoreOp MaskedStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2201 ::mlir::OperationState __state__(location, getOperationName());
2202 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));
2203 auto __res__ = builder.create(state: __state__);
2204 assert((::llvm::isa<MaskedStoreOp>(__res__)) && "builder didn't return the right type");
2205 return ::llvm::cast<MaskedStoreOp>(Val: __res__);
2206}
2207
2208MaskedStoreOp MaskedStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2209 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));
2210}
2211
2212::llvm::LogicalResult MaskedStoreOp::verifyInvariantsImpl() {
2213 auto tblgen_access_groups = getProperties().access_groups; (void)tblgen_access_groups;
2214 auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
2215 auto tblgen_alignment = getProperties().alignment; (void)tblgen_alignment;
2216 auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
2217 auto tblgen_nontemporal = getProperties().nontemporal; (void)tblgen_nontemporal;
2218 auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;
2219
2220 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, attr: tblgen_alignment, attrName: "alignment")))
2221 return ::mlir::failure();
2222
2223 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, attr: tblgen_nontemporal, attrName: "nontemporal")))
2224 return ::mlir::failure();
2225
2226 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, attr: tblgen_access_groups, attrName: "access_groups")))
2227 return ::mlir::failure();
2228
2229 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, attr: tblgen_alias_scopes, attrName: "alias_scopes")))
2230 return ::mlir::failure();
2231
2232 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, attr: tblgen_noalias_scopes, attrName: "noalias_scopes")))
2233 return ::mlir::failure();
2234
2235 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, attr: tblgen_tbaa, attrName: "tbaa")))
2236 return ::mlir::failure();
2237 {
2238 unsigned index = 0; (void)index;
2239 auto valueGroup0 = getODSOperands(index: 0);
2240
2241 for (auto v : valueGroup0) {
2242 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2243 return ::mlir::failure();
2244 }
2245 auto valueGroup1 = getODSOperands(index: 1);
2246
2247 for (auto v : valueGroup1) {
2248 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2249 return ::mlir::failure();
2250 }
2251 auto valueGroup2 = getODSOperands(index: 2);
2252
2253 for (auto v : valueGroup2) {
2254 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
2255 return ::mlir::failure();
2256 }
2257 }
2258 return ::mlir::success();
2259}
2260
2261::llvm::LogicalResult MaskedStoreOp::verifyInvariants() {
2262 return verifyInvariantsImpl();
2263}
2264
2265::mlir::ParseResult MaskedStoreOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2266 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
2267 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
2268 (void)valueOperandsLoc;
2269 ::mlir::OpAsmParser::UnresolvedOperand dataRawOperand{};
2270 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> dataOperands(&dataRawOperand, 1); ::llvm::SMLoc dataOperandsLoc;
2271 (void)dataOperandsLoc;
2272 ::mlir::OpAsmParser::UnresolvedOperand maskRawOperand{};
2273 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> maskOperands(&maskRawOperand, 1); ::llvm::SMLoc maskOperandsLoc;
2274 (void)maskOperandsLoc;
2275 ::mlir::IntegerAttr alignmentAttr;
2276 ::mlir::Type valueRawType{};
2277 ::llvm::ArrayRef<::mlir::Type> valueTypes(&valueRawType, 1);
2278 ::mlir::Type maskRawType{};
2279 ::llvm::ArrayRef<::mlir::Type> maskTypes(&maskRawType, 1);
2280 ::mlir::Type dataRawType{};
2281 ::llvm::ArrayRef<::mlir::Type> dataTypes(&dataRawType, 1);
2282 if (parser.parseLParen())
2283 return ::mlir::failure();
2284
2285 valueOperandsLoc = parser.getCurrentLocation();
2286 if (parser.parseOperand(result&: valueRawOperand))
2287 return ::mlir::failure();
2288 if (parser.parseComma())
2289 return ::mlir::failure();
2290
2291 dataOperandsLoc = parser.getCurrentLocation();
2292 if (parser.parseOperand(result&: dataRawOperand))
2293 return ::mlir::failure();
2294 if (parser.parseComma())
2295 return ::mlir::failure();
2296
2297 maskOperandsLoc = parser.getCurrentLocation();
2298 if (parser.parseOperand(result&: maskRawOperand))
2299 return ::mlir::failure();
2300 if (parser.parseRParen())
2301 return ::mlir::failure();
2302 if (::mlir::succeeded(Result: parser.parseOptionalComma())) {
2303 if (parser.parseKeyword(keyword: "alignment"))
2304 return ::mlir::failure();
2305 if (parser.parseLParen())
2306 return ::mlir::failure();
2307
2308 if (parser.parseCustomAttributeWithFallback(result&: alignmentAttr, type: parser.getBuilder().getIntegerType(width: 64))) {
2309 return ::mlir::failure();
2310 }
2311 if (alignmentAttr) result.getOrAddProperties<MaskedStoreOp::Properties>().alignment = alignmentAttr;
2312 if (parser.parseRParen())
2313 return ::mlir::failure();
2314 }
2315 if (parseProperties(parser, result))
2316 return ::mlir::failure();
2317 {
2318 auto loc = parser.getCurrentLocation();(void)loc;
2319 if (parser.parseOptionalAttrDict(result&: result.attributes))
2320 return ::mlir::failure();
2321 if (result.attributes.get(name: "alignment"))
2322 return parser.emitError(loc, message: "inherent attribute 'alignment' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
2323 if (result.attributes.get(name: "nontemporal"))
2324 return parser.emitError(loc, message: "inherent attribute 'nontemporal' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
2325 if (result.attributes.get(name: "access_groups"))
2326 return parser.emitError(loc, message: "inherent attribute 'access_groups' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
2327 if (result.attributes.get(name: "alias_scopes"))
2328 return parser.emitError(loc, message: "inherent attribute 'alias_scopes' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
2329 if (result.attributes.get(name: "noalias_scopes"))
2330 return parser.emitError(loc, message: "inherent attribute 'noalias_scopes' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
2331 if (result.attributes.get(name: "tbaa"))
2332 return parser.emitError(loc, message: "inherent attribute 'tbaa' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
2333 }
2334 if (parser.parseColon())
2335 return ::mlir::failure();
2336
2337 {
2338 ::mlir::VectorType type;
2339 if (parser.parseCustomTypeWithFallback(result&: type))
2340 return ::mlir::failure();
2341 valueRawType = type;
2342 }
2343 if (parser.parseComma())
2344 return ::mlir::failure();
2345
2346 {
2347 ::mlir::VectorType type;
2348 if (parser.parseCustomTypeWithFallback(result&: type))
2349 return ::mlir::failure();
2350 maskRawType = type;
2351 }
2352 if (parser.parseKeyword(keyword: "into"))
2353 return ::mlir::failure();
2354
2355 if (parser.parseType(result&: dataRawType))
2356 return ::mlir::failure();
2357 // coverity[ARRAY_VS_SINGLETON]
2358 if (parser.resolveOperands(operands&: valueOperands, types&: valueTypes, loc: valueOperandsLoc, result&: result.operands))
2359 return ::mlir::failure();
2360 // coverity[ARRAY_VS_SINGLETON]
2361 if (parser.resolveOperands(operands&: dataOperands, types&: dataTypes, loc: dataOperandsLoc, result&: result.operands))
2362 return ::mlir::failure();
2363 // coverity[ARRAY_VS_SINGLETON]
2364 if (parser.resolveOperands(operands&: maskOperands, types&: maskTypes, loc: maskOperandsLoc, result&: result.operands))
2365 return ::mlir::failure();
2366 return ::mlir::success();
2367}
2368
2369::llvm::LogicalResult MaskedStoreOp::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2370 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
2371 if (!dict) {
2372 emitError() << "expected DictionaryAttr to set properties";
2373 return ::mlir::failure();
2374 }
2375 // keep track of used keys in the input dictionary to be able to error out
2376 // if there are some unknown ones.
2377 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
2378 ::mlir::MLIRContext *ctx = dict.getContext();
2379 (void)ctx;
2380 {
2381
2382 auto &propStorage = prop.nontemporal;
2383 auto nontemporalAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "nontemporal");
2384 auto attr = dict.get(name: nontemporalAttrName);
2385 usedKeys.insert(V: nontemporalAttrName);
2386 if (attr || /*isRequired=*/false) {
2387 if (!attr) {
2388 emitError() << "expected key entry for nontemporal in DictionaryAttr to set "
2389 "Properties.";
2390 return ::mlir::failure();
2391 }
2392 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
2393 if (convertedAttr) {
2394 propStorage = convertedAttr;
2395 } else {
2396 emitError() << "Invalid attribute `nontemporal` in property conversion: " << attr;
2397 return ::mlir::failure();
2398 }
2399 }
2400 }
2401 {
2402
2403 auto &propStorage = prop.access_groups;
2404 auto access_groupsAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "access_groups");
2405 auto attr = dict.get(name: access_groupsAttrName);
2406 usedKeys.insert(V: access_groupsAttrName);
2407 if (attr || /*isRequired=*/false) {
2408 if (!attr) {
2409 emitError() << "expected key entry for access_groups in DictionaryAttr to set "
2410 "Properties.";
2411 return ::mlir::failure();
2412 }
2413 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
2414 if (convertedAttr) {
2415 propStorage = convertedAttr;
2416 } else {
2417 emitError() << "Invalid attribute `access_groups` in property conversion: " << attr;
2418 return ::mlir::failure();
2419 }
2420 }
2421 }
2422 {
2423
2424 auto &propStorage = prop.alias_scopes;
2425 auto alias_scopesAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "alias_scopes");
2426 auto attr = dict.get(name: alias_scopesAttrName);
2427 usedKeys.insert(V: alias_scopesAttrName);
2428 if (attr || /*isRequired=*/false) {
2429 if (!attr) {
2430 emitError() << "expected key entry for alias_scopes in DictionaryAttr to set "
2431 "Properties.";
2432 return ::mlir::failure();
2433 }
2434 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
2435 if (convertedAttr) {
2436 propStorage = convertedAttr;
2437 } else {
2438 emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
2439 return ::mlir::failure();
2440 }
2441 }
2442 }
2443 {
2444
2445 auto &propStorage = prop.noalias_scopes;
2446 auto noalias_scopesAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "noalias_scopes");
2447 auto attr = dict.get(name: noalias_scopesAttrName);
2448 usedKeys.insert(V: noalias_scopesAttrName);
2449 if (attr || /*isRequired=*/false) {
2450 if (!attr) {
2451 emitError() << "expected key entry for noalias_scopes in DictionaryAttr to set "
2452 "Properties.";
2453 return ::mlir::failure();
2454 }
2455 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
2456 if (convertedAttr) {
2457 propStorage = convertedAttr;
2458 } else {
2459 emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
2460 return ::mlir::failure();
2461 }
2462 }
2463 }
2464 {
2465
2466 auto &propStorage = prop.tbaa;
2467 auto tbaaAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tbaa");
2468 auto attr = dict.get(name: tbaaAttrName);
2469 usedKeys.insert(V: tbaaAttrName);
2470 if (attr || /*isRequired=*/false) {
2471 if (!attr) {
2472 emitError() << "expected key entry for tbaa in DictionaryAttr to set "
2473 "Properties.";
2474 return ::mlir::failure();
2475 }
2476 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
2477 if (convertedAttr) {
2478 propStorage = convertedAttr;
2479 } else {
2480 emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
2481 return ::mlir::failure();
2482 }
2483 }
2484 }
2485
2486 for (::mlir::NamedAttribute attr : dict) {
2487 if (!usedKeys.contains(V: attr.getName()))
2488 return emitError() << "unknown key '" << attr.getName() <<
2489 "' when parsing properties dictionary";
2490 }
2491 return ::mlir::success();
2492}
2493
2494::mlir::ParseResult MaskedStoreOp::parsePropertiesFromKeyValueList(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2495 auto &prop = result.getOrAddProperties<Properties>();
2496 (void)prop;
2497 bool seen_nontemporal = false;
2498 bool seen_access_groups = false;
2499 bool seen_alias_scopes = false;
2500 bool seen_noalias_scopes = false;
2501 bool seen_tbaa = false;
2502
2503 if (succeeded(Result: parser.parseOptionalLess())) {
2504 ::llvm::SMLoc dictionaryLoc = parser.getCurrentLocation();
2505 ::mlir::NamedAttrList propertyAttributes;
2506 if (parser.parseOptionalAttrDict(result&: propertyAttributes))
2507 return ::mlir::failure();
2508 if (dictionaryLoc != parser.getCurrentLocation()) {
2509 if (parser.parseGreater())
2510 return ::mlir::failure();
2511 auto propertyDictionary =
2512 ::mlir::DictionaryAttr::get(context: parser.getContext(), value: propertyAttributes);
2513 return setPropertiesFromParsedAttr(prop, attr: propertyDictionary, emitError: [&]() {
2514 return parser.emitError(loc: dictionaryLoc)
2515 << "invalid properties " << propertyDictionary << ": ";
2516 });
2517 }
2518
2519 bool reachedEnd = succeeded(Result: parser.parseOptionalGreater());
2520 while (!reachedEnd) {
2521 ::llvm::SMLoc keyLoc = parser.getCurrentLocation();
2522 ::llvm::StringRef key;
2523 if (parser.parseKeyword(keyword: &key))
2524 return ::mlir::failure();
2525 bool isUnitKey = key == "nontemporal";
2526 if (!isUnitKey && parser.parseEqual())
2527 return ::mlir::failure();
2528 if (!seen_nontemporal && key == "nontemporal") {
2529 seen_nontemporal = true;
2530 if (succeeded(Result: parser.parseOptionalEqual())) {
2531 ::mlir::UnitAttr nontemporalAttr;
2532
2533 if (parser.parseCustomAttributeWithFallback(result&: nontemporalAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
2534 return ::mlir::failure();
2535 }
2536 if (nontemporalAttr) result.getOrAddProperties<MaskedStoreOp::Properties>().nontemporal = nontemporalAttr;
2537 } else {
2538 prop.nontemporal = parser.getBuilder().getUnitAttr();
2539 }
2540 }
2541 else if (!seen_access_groups && key == "access_groups") {
2542 seen_access_groups = true;
2543 ::mlir::ArrayAttr access_groupsAttr;
2544
2545 if (parser.parseCustomAttributeWithFallback(result&: access_groupsAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
2546 return ::mlir::failure();
2547 }
2548 if (access_groupsAttr) result.getOrAddProperties<MaskedStoreOp::Properties>().access_groups = access_groupsAttr;
2549 }
2550 else if (!seen_alias_scopes && key == "alias_scopes") {
2551 seen_alias_scopes = true;
2552 ::mlir::ArrayAttr alias_scopesAttr;
2553
2554 if (parser.parseCustomAttributeWithFallback(result&: alias_scopesAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
2555 return ::mlir::failure();
2556 }
2557 if (alias_scopesAttr) result.getOrAddProperties<MaskedStoreOp::Properties>().alias_scopes = alias_scopesAttr;
2558 }
2559 else if (!seen_noalias_scopes && key == "noalias_scopes") {
2560 seen_noalias_scopes = true;
2561 ::mlir::ArrayAttr noalias_scopesAttr;
2562
2563 if (parser.parseCustomAttributeWithFallback(result&: noalias_scopesAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
2564 return ::mlir::failure();
2565 }
2566 if (noalias_scopesAttr) result.getOrAddProperties<MaskedStoreOp::Properties>().noalias_scopes = noalias_scopesAttr;
2567 }
2568 else if (!seen_tbaa && key == "tbaa") {
2569 seen_tbaa = true;
2570 ::mlir::ArrayAttr tbaaAttr;
2571
2572 if (parser.parseCustomAttributeWithFallback(result&: tbaaAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
2573 return ::mlir::failure();
2574 }
2575 if (tbaaAttr) result.getOrAddProperties<MaskedStoreOp::Properties>().tbaa = tbaaAttr;
2576 }
2577
2578 else {
2579 return parser.emitError(
2580 loc: keyLoc,
2581 message: "duplicate or unknown property in properties dictionary: ")
2582 << key;
2583 }
2584
2585 reachedEnd = succeeded(Result: parser.parseOptionalGreater());
2586 if (!reachedEnd && parser.parseComma())
2587 return ::mlir::failure();
2588 }
2589 }
2590 return ::mlir::success();
2591}
2592
2593LLVM_ATTRIBUTE_MINSIZE void MaskedStoreOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
2594 _odsPrinter << "(";
2595 _odsPrinter << getValue();
2596 _odsPrinter << ",";
2597 _odsPrinter << ' ';
2598 _odsPrinter << getData();
2599 _odsPrinter << ",";
2600 _odsPrinter << ' ';
2601 _odsPrinter << getMask();
2602 _odsPrinter << ")";
2603 if (getAlignmentAttr()) {
2604 _odsPrinter << ",";
2605 _odsPrinter << " alignment";
2606 _odsPrinter << "(";
2607 _odsPrinter.printAttributeWithoutType(attr: getAlignmentAttr());
2608 _odsPrinter << ")";
2609 }
2610 ::llvm::SmallVector<::llvm::StringRef, 2> elidedProps;
2611 elidedProps.push_back(Elt: "alignment");
2612 {
2613 ::mlir::Builder odsBuilder((*this)->getContext());
2614 ::mlir::Attribute attr = getNontemporalAttr();
2615 if(attr && (attr == ((false) ? odsBuilder.getUnitAttr() : nullptr)))
2616 elidedProps.push_back(Elt: "nontemporal");
2617 }
2618 printProperties(ctx: (*this)->getContext(), p&: _odsPrinter, properties: getProperties(), elidedProps);
2619 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
2620 _odsPrinter << " :";
2621 _odsPrinter << ' ';
2622 {
2623 auto type = getValue().getType();
2624 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
2625 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
2626 else
2627 _odsPrinter << type;
2628 }
2629 _odsPrinter << ",";
2630 _odsPrinter << ' ';
2631 {
2632 auto type = getMask().getType();
2633 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
2634 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
2635 else
2636 _odsPrinter << type;
2637 }
2638 _odsPrinter << " into";
2639 _odsPrinter << ' ';
2640 _odsPrinter << getData().getType();
2641}
2642
2643void MaskedStoreOp::_odsPrintPropertiesAsKeyValueList(::mlir::MLIRContext *_odsContext, ::mlir::OpAsmPrinter &_odsPrinter, const Properties &prop, ::mlir::ArrayRef<::llvm::StringRef> elidedProps) {
2644 bool first = true;
2645 auto printKey = [&](::llvm::StringRef name, bool printValue) {
2646 _odsPrinter << (first ? " <" : ", ") << name;
2647 if (printValue)
2648 _odsPrinter << " = ";
2649 first = false;
2650 };
2651 auto shouldPrint = [&](::llvm::StringRef name) {
2652 return !::llvm::is_contained(Range&: elidedProps, Element: name);
2653 };
2654 if (shouldPrint("alignment") && prop.alignment) {
2655 printKey("alignment", /*printValue=*/true);
2656 _odsPrinter.printAttributeWithoutType(attr: prop.alignment);
2657 }
2658 if (shouldPrint("nontemporal") && prop.nontemporal) {
2659 printKey("nontemporal", /*printValue=*/false);
2660 }
2661 if (shouldPrint("access_groups") && prop.access_groups) {
2662 printKey("access_groups", /*printValue=*/true);
2663 _odsPrinter.printAttributeWithoutType(attr: prop.access_groups);
2664 }
2665 if (shouldPrint("alias_scopes") && prop.alias_scopes) {
2666 printKey("alias_scopes", /*printValue=*/true);
2667 _odsPrinter.printAttributeWithoutType(attr: prop.alias_scopes);
2668 }
2669 if (shouldPrint("noalias_scopes") && prop.noalias_scopes) {
2670 printKey("noalias_scopes", /*printValue=*/true);
2671 _odsPrinter.printAttributeWithoutType(attr: prop.noalias_scopes);
2672 }
2673 if (shouldPrint("tbaa") && prop.tbaa) {
2674 printKey("tbaa", /*printValue=*/true);
2675 _odsPrinter.printAttributeWithoutType(attr: prop.tbaa);
2676 }
2677 if (!first)
2678 _odsPrinter << ">";
2679}
2680
2681void MaskedStoreOp::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2682 Properties &properties = odsState.getOrAddProperties<Properties>();
2683 populateDefaultProperties(opName: odsState.name, properties);
2684 const ::llvm::StringRef inherentNames[] = {"alignment", "nontemporal", "access_groups", "alias_scopes", "noalias_scopes", "tbaa"};
2685 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
2686 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
2687 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
2688 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
2689 });
2690}
2691
2692
2693} // namespace mlir::LLVM
2694MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::MaskedStoreOp)
2695MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MaskedStoreOpGenericAdaptorBase::Properties)
2696
2697namespace mlir::LLVM {
2698
2699
2700//===----------------------------------------------------------------------===//
2701// ::mlir::LLVM::MatrixColumnMajorLoadOp definitions
2702//===----------------------------------------------------------------------===//
2703
2704namespace detail {
2705
2706MatrixColumnMajorLoadOpGenericAdaptorBase::MatrixColumnMajorLoadOpGenericAdaptorBase(MatrixColumnMajorLoadOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
2707
2708bool MatrixColumnMajorLoadOpGenericAdaptorBase::getIsVolatile() {
2709 auto attr = getIsVolatileAttr();
2710 return attr.getValue().getZExtValue();
2711}
2712
2713uint32_t MatrixColumnMajorLoadOpGenericAdaptorBase::getRows() {
2714 auto attr = getRowsAttr();
2715 return attr.getValue().getZExtValue();
2716}
2717
2718uint32_t MatrixColumnMajorLoadOpGenericAdaptorBase::getColumns() {
2719 auto attr = getColumnsAttr();
2720 return attr.getValue().getZExtValue();
2721}
2722
2723
2724} // namespace detail
2725MatrixColumnMajorLoadOpAdaptor::MatrixColumnMajorLoadOpAdaptor(MatrixColumnMajorLoadOp op) : MatrixColumnMajorLoadOpGenericAdaptor(op->getOperands(), op) {}
2726
2727::llvm::LogicalResult MatrixColumnMajorLoadOpAdaptor::verify(::mlir::Location loc) {
2728 auto tblgen_columns = getProperties().columns; (void)tblgen_columns;
2729 if (!tblgen_columns) return emitError(loc, message: "'llvm.intr.matrix.column.major.load' op requires attribute 'columns'");
2730 auto tblgen_isVolatile = getProperties().isVolatile; (void)tblgen_isVolatile;
2731 if (!tblgen_isVolatile) return emitError(loc, message: "'llvm.intr.matrix.column.major.load' op requires attribute 'isVolatile'");
2732 auto tblgen_rows = getProperties().rows; (void)tblgen_rows;
2733 if (!tblgen_rows) return emitError(loc, message: "'llvm.intr.matrix.column.major.load' op requires attribute 'rows'");
2734
2735 if (tblgen_isVolatile && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_isVolatile))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_isVolatile).getType().isSignlessInteger(width: 1)))))
2736 return emitError(loc, message: "'llvm.intr.matrix.column.major.load' op attribute 'isVolatile' failed to satisfy constraint: 1-bit signless integer attribute");
2737
2738 if (tblgen_rows && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_rows))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_rows).getType().isSignlessInteger(width: 32)))))
2739 return emitError(loc, message: "'llvm.intr.matrix.column.major.load' op attribute 'rows' failed to satisfy constraint: 32-bit signless integer attribute");
2740
2741 if (tblgen_columns && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_columns))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_columns).getType().isSignlessInteger(width: 32)))))
2742 return emitError(loc, message: "'llvm.intr.matrix.column.major.load' op attribute 'columns' failed to satisfy constraint: 32-bit signless integer attribute");
2743 return ::mlir::success();
2744}
2745
2746::llvm::LogicalResult MatrixColumnMajorLoadOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2747 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
2748 if (!dict) {
2749 emitError() << "expected DictionaryAttr to set properties";
2750 return ::mlir::failure();
2751 }
2752
2753 {
2754 auto attr = dict.get(name: "columns");
2755 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
2756 storage&: prop.columns, attr, name: "columns", emitError)))
2757 return ::mlir::failure();
2758 }
2759
2760 {
2761 auto attr = dict.get(name: "isVolatile");
2762 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
2763 storage&: prop.isVolatile, attr, name: "isVolatile", emitError)))
2764 return ::mlir::failure();
2765 }
2766
2767 {
2768 auto attr = dict.get(name: "rows");
2769 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
2770 storage&: prop.rows, attr, name: "rows", emitError)))
2771 return ::mlir::failure();
2772 }
2773 return ::mlir::success();
2774}
2775
2776::mlir::Attribute MatrixColumnMajorLoadOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
2777 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2778 ::mlir::Builder odsBuilder{ctx};
2779 ::mlir::detail::appendAttributeProperty(attrs, name: "columns", attr: prop.columns);
2780 ::mlir::detail::appendAttributeProperty(attrs, name: "isVolatile", attr: prop.isVolatile);
2781 ::mlir::detail::appendAttributeProperty(attrs, name: "rows", attr: prop.rows);
2782
2783 if (!attrs.empty())
2784 return odsBuilder.getDictionaryAttr(value: attrs);
2785 return {};
2786}
2787
2788llvm::hash_code MatrixColumnMajorLoadOp::computePropertiesHash(const Properties &prop) {
2789 using llvm::hash_value;
2790 return llvm::hash_combine(
2791 args: llvm::hash_value(ptr: prop.columns.getAsOpaquePointer()),
2792 args: llvm::hash_value(ptr: prop.isVolatile.getAsOpaquePointer()),
2793 args: llvm::hash_value(ptr: prop.rows.getAsOpaquePointer()));
2794}
2795
2796std::optional<mlir::Attribute> MatrixColumnMajorLoadOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
2797 if (name == "columns")
2798 return prop.columns;
2799
2800 if (name == "isVolatile")
2801 return prop.isVolatile;
2802
2803 if (name == "rows")
2804 return prop.rows;
2805 return std::nullopt;
2806}
2807
2808void MatrixColumnMajorLoadOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
2809 if (name == "columns") {
2810 prop.columns = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.columns)>>(Val&: value);
2811 return;
2812 }
2813
2814 if (name == "isVolatile") {
2815 prop.isVolatile = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.isVolatile)>>(Val&: value);
2816 return;
2817 }
2818
2819 if (name == "rows") {
2820 prop.rows = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.rows)>>(Val&: value);
2821 return;
2822 }
2823}
2824
2825void MatrixColumnMajorLoadOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
2826 if (prop.columns) {
2827 ::mlir::Attribute value = prop.columns;
2828 ::mlir::Attribute originalValue = value;
2829 visitor("columns", value);
2830 if (value != originalValue)
2831 setInherentAttr(prop, name: "columns", value);
2832 }
2833
2834 if (prop.isVolatile) {
2835 ::mlir::Attribute value = prop.isVolatile;
2836 ::mlir::Attribute originalValue = value;
2837 visitor("isVolatile", value);
2838 if (value != originalValue)
2839 setInherentAttr(prop, name: "isVolatile", value);
2840 }
2841
2842 if (prop.rows) {
2843 ::mlir::Attribute value = prop.rows;
2844 ::mlir::Attribute originalValue = value;
2845 visitor("rows", value);
2846 if (value != originalValue)
2847 setInherentAttr(prop, name: "rows", value);
2848 }
2849}
2850
2851::llvm::LogicalResult MatrixColumnMajorLoadOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2852 {
2853 ::mlir::Attribute attr = attrs.get(name: getColumnsAttrName(name: opName));
2854 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "columns", emitError)))
2855 return ::mlir::failure();
2856 }
2857
2858 {
2859 ::mlir::Attribute attr = attrs.get(name: getIsVolatileAttrName(name: opName));
2860 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps6(attr, attrName: "isVolatile", emitError)))
2861 return ::mlir::failure();
2862 }
2863
2864 {
2865 ::mlir::Attribute attr = attrs.get(name: getRowsAttrName(name: opName));
2866 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "rows", emitError)))
2867 return ::mlir::failure();
2868 }
2869 return ::mlir::success();
2870}
2871
2872::llvm::LogicalResult MatrixColumnMajorLoadOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
2873 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
2874 if (::mlir::failed(Result: reader.readAttribute(result&: prop.columns)))
2875 return ::mlir::failure();
2876
2877 if (::mlir::failed(Result: reader.readAttribute(result&: prop.isVolatile)))
2878 return ::mlir::failure();
2879
2880 if (::mlir::failed(Result: reader.readAttribute(result&: prop.rows)))
2881 return ::mlir::failure();
2882 return ::mlir::success();
2883}
2884
2885void MatrixColumnMajorLoadOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
2886 auto &prop = getProperties(); (void)prop;
2887 writer.writeAttribute(attr: prop.columns);
2888 writer.writeAttribute(attr: prop.isVolatile);
2889 writer.writeAttribute(attr: prop.rows);
2890}
2891
2892bool MatrixColumnMajorLoadOp::getIsVolatile() {
2893 auto attr = getIsVolatileAttr();
2894 return attr.getValue().getZExtValue();
2895}
2896
2897uint32_t MatrixColumnMajorLoadOp::getRows() {
2898 auto attr = getRowsAttr();
2899 return attr.getValue().getZExtValue();
2900}
2901
2902uint32_t MatrixColumnMajorLoadOp::getColumns() {
2903 auto attr = getColumnsAttr();
2904 return attr.getValue().getZExtValue();
2905}
2906
2907void MatrixColumnMajorLoadOp::setIsVolatile(bool attrValue) {
2908 getProperties().isVolatile = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 1), value: attrValue);
2909}
2910
2911void MatrixColumnMajorLoadOp::setRows(uint32_t attrValue) {
2912 getProperties().rows = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
2913}
2914
2915void MatrixColumnMajorLoadOp::setColumns(uint32_t attrValue) {
2916 getProperties().columns = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
2917}
2918
2919void MatrixColumnMajorLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
2920 if (resultType) odsState.addTypes(newTypes: resultType);
2921 odsState.addOperands(newOperands: operands);
2922 for (auto namedAttr : attributes)
2923 odsState.addAttribute(name: namedAttr.getName(), attr: namedAttr.getValue());
2924
2925}
2926
2927MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
2928 ::mlir::OperationState __state__(location, getOperationName());
2929 build(odsBuilder&: builder, odsState&: __state__, resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2930 auto __res__ = builder.create(state: __state__);
2931 assert((::llvm::isa<MatrixColumnMajorLoadOp>(__res__)) && "builder didn't return the right type");
2932 return ::llvm::cast<MatrixColumnMajorLoadOp>(Val: __res__);
2933}
2934
2935MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
2936 return create(builder, location: builder.getLoc(), resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
2937}
2938
2939void MatrixColumnMajorLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
2940 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2941 odsState.addOperands(newOperands: data);
2942 odsState.addOperands(newOperands: stride);
2943 odsProperties.isVolatile = isVolatile;
2944 odsProperties.rows = rows;
2945 odsProperties.columns = columns;
2946 odsState.addTypes(newTypes: res);
2947}
2948
2949MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
2950 ::mlir::OperationState __state__(location, getOperationName());
2951 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
2952 auto __res__ = builder.create(state: __state__);
2953 assert((::llvm::isa<MatrixColumnMajorLoadOp>(__res__)) && "builder didn't return the right type");
2954 return ::llvm::cast<MatrixColumnMajorLoadOp>(Val: __res__);
2955}
2956
2957MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
2958 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
2959}
2960
2961void MatrixColumnMajorLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
2962 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2963 odsState.addOperands(newOperands: data);
2964 odsState.addOperands(newOperands: stride);
2965 odsProperties.isVolatile = isVolatile;
2966 odsProperties.rows = rows;
2967 odsProperties.columns = columns;
2968 assert(resultTypes.size() == 1u && "mismatched number of results");
2969 odsState.addTypes(newTypes&: resultTypes);
2970}
2971
2972MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
2973 ::mlir::OperationState __state__(location, getOperationName());
2974 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
2975 auto __res__ = builder.create(state: __state__);
2976 assert((::llvm::isa<MatrixColumnMajorLoadOp>(__res__)) && "builder didn't return the right type");
2977 return ::llvm::cast<MatrixColumnMajorLoadOp>(Val: __res__);
2978}
2979
2980MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
2981 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
2982}
2983
2984void MatrixColumnMajorLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
2985 auto &odsProperties = odsState.getOrAddProperties<Properties>();
2986 odsState.addOperands(newOperands: data);
2987 odsState.addOperands(newOperands: stride);
2988 odsProperties.isVolatile = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 1), value: isVolatile);
2989 odsProperties.rows = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: rows);
2990 odsProperties.columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: columns);
2991 odsState.addTypes(newTypes: res);
2992}
2993
2994MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
2995 ::mlir::OperationState __state__(location, getOperationName());
2996 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
2997 auto __res__ = builder.create(state: __state__);
2998 assert((::llvm::isa<MatrixColumnMajorLoadOp>(__res__)) && "builder didn't return the right type");
2999 return ::llvm::cast<MatrixColumnMajorLoadOp>(Val: __res__);
3000}
3001
3002MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3003 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3004}
3005
3006void MatrixColumnMajorLoadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3007 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3008 odsState.addOperands(newOperands: data);
3009 odsState.addOperands(newOperands: stride);
3010 odsProperties.isVolatile = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 1), value: isVolatile);
3011 odsProperties.rows = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: rows);
3012 odsProperties.columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: columns);
3013 assert(resultTypes.size() == 1u && "mismatched number of results");
3014 odsState.addTypes(newTypes&: resultTypes);
3015}
3016
3017MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3018 ::mlir::OperationState __state__(location, getOperationName());
3019 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3020 auto __res__ = builder.create(state: __state__);
3021 assert((::llvm::isa<MatrixColumnMajorLoadOp>(__res__)) && "builder didn't return the right type");
3022 return ::llvm::cast<MatrixColumnMajorLoadOp>(Val: __res__);
3023}
3024
3025MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3026 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3027}
3028
3029void MatrixColumnMajorLoadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3030 assert(operands.size() == 2u && "mismatched number of parameters");
3031 odsState.addOperands(newOperands: operands);
3032 buildPropertiesAndDiscardableAttributes(odsState, attributes);
3033 assert(resultTypes.size() == 1u && "mismatched number of return types");
3034 odsState.addTypes(newTypes&: resultTypes);
3035}
3036
3037MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3038LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3039
3040 ::mlir::OperationState __state__(location, getOperationName());
3041 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));
3042 auto __res__ = builder.create(state: __state__);
3043 assert((::llvm::isa<MatrixColumnMajorLoadOp>(__res__)) && "builder didn't return the right type");
3044 return ::llvm::cast<MatrixColumnMajorLoadOp>(Val: __res__);
3045LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3046}
3047
3048MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3049LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3050
3051 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));
3052LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3053}
3054
3055void MatrixColumnMajorLoadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3056 assert(operands.size() == 2u && "mismatched number of parameters");
3057 odsState.addOperands(newOperands: operands);
3058 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
3059 odsState.addAttributes(newAttributes: discardableAttributes);
3060 assert(resultTypes.size() == 1u && "mismatched number of return types");
3061 odsState.addTypes(newTypes&: resultTypes);
3062}
3063
3064MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3065 ::mlir::OperationState __state__(location, getOperationName());
3066 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));
3067 auto __res__ = builder.create(state: __state__);
3068 assert((::llvm::isa<MatrixColumnMajorLoadOp>(__res__)) && "builder didn't return the right type");
3069 return ::llvm::cast<MatrixColumnMajorLoadOp>(Val: __res__);
3070}
3071
3072MatrixColumnMajorLoadOp MatrixColumnMajorLoadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3073 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));
3074}
3075
3076::llvm::LogicalResult MatrixColumnMajorLoadOp::verifyInvariantsImpl() {
3077 auto tblgen_columns = getProperties().columns; (void)tblgen_columns;
3078 if (!tblgen_columns) return emitOpError(message: "requires attribute 'columns'");
3079 auto tblgen_isVolatile = getProperties().isVolatile; (void)tblgen_isVolatile;
3080 if (!tblgen_isVolatile) return emitOpError(message: "requires attribute 'isVolatile'");
3081 auto tblgen_rows = getProperties().rows; (void)tblgen_rows;
3082 if (!tblgen_rows) return emitOpError(message: "requires attribute 'rows'");
3083
3084 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, attr: tblgen_isVolatile, attrName: "isVolatile")))
3085 return ::mlir::failure();
3086
3087 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_rows, attrName: "rows")))
3088 return ::mlir::failure();
3089
3090 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_columns, attrName: "columns")))
3091 return ::mlir::failure();
3092 {
3093 unsigned index = 0; (void)index;
3094 auto valueGroup0 = getODSOperands(index: 0);
3095
3096 for (auto v : valueGroup0) {
3097 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3098 return ::mlir::failure();
3099 }
3100 auto valueGroup1 = getODSOperands(index: 1);
3101
3102 for (auto v : valueGroup1) {
3103 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3104 return ::mlir::failure();
3105 }
3106 }
3107 {
3108 unsigned index = 0; (void)index;
3109 auto valueGroup0 = getODSResults(index: 0);
3110
3111 for (auto v : valueGroup0) {
3112 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
3113 return ::mlir::failure();
3114 }
3115 }
3116 return ::mlir::success();
3117}
3118
3119::llvm::LogicalResult MatrixColumnMajorLoadOp::verifyInvariants() {
3120 return verifyInvariantsImpl();
3121}
3122
3123::mlir::ParseResult MatrixColumnMajorLoadOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3124 ::mlir::OpAsmParser::UnresolvedOperand dataRawOperand{};
3125 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> dataOperands(&dataRawOperand, 1); ::llvm::SMLoc dataOperandsLoc;
3126 (void)dataOperandsLoc;
3127 ::mlir::OpAsmParser::UnresolvedOperand strideRawOperand{};
3128 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> strideOperands(&strideRawOperand, 1); ::llvm::SMLoc strideOperandsLoc;
3129 (void)strideOperandsLoc;
3130 ::mlir::IntegerAttr isVolatileAttr;
3131 ::mlir::IntegerAttr rowsAttr;
3132 ::mlir::IntegerAttr columnsAttr;
3133 ::mlir::Type resRawType{};
3134 ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
3135 ::mlir::Type dataRawType{};
3136 ::llvm::ArrayRef<::mlir::Type> dataTypes(&dataRawType, 1);
3137 ::mlir::Type strideRawType{};
3138 ::llvm::ArrayRef<::mlir::Type> strideTypes(&strideRawType, 1);
3139
3140 dataOperandsLoc = parser.getCurrentLocation();
3141 if (parser.parseOperand(result&: dataRawOperand))
3142 return ::mlir::failure();
3143 if (parser.parseComma())
3144 return ::mlir::failure();
3145 if (parser.parseLess())
3146 return ::mlir::failure();
3147 if (parser.parseKeyword(keyword: "stride"))
3148 return ::mlir::failure();
3149 if (parser.parseEqual())
3150 return ::mlir::failure();
3151
3152 strideOperandsLoc = parser.getCurrentLocation();
3153 if (parser.parseOperand(result&: strideRawOperand))
3154 return ::mlir::failure();
3155 if (parser.parseGreater())
3156 return ::mlir::failure();
3157 if (parser.parseComma())
3158 return ::mlir::failure();
3159 if (parser.parseKeyword(keyword: "is_volatile"))
3160 return ::mlir::failure();
3161 if (parser.parseEqual())
3162 return ::mlir::failure();
3163
3164 if (parser.parseCustomAttributeWithFallback(result&: isVolatileAttr, type: parser.getBuilder().getIntegerType(width: 1))) {
3165 return ::mlir::failure();
3166 }
3167 if (isVolatileAttr) result.getOrAddProperties<MatrixColumnMajorLoadOp::Properties>().isVolatile = isVolatileAttr;
3168 if (parser.parseComma())
3169 return ::mlir::failure();
3170 if (parser.parseKeyword(keyword: "rows"))
3171 return ::mlir::failure();
3172 if (parser.parseEqual())
3173 return ::mlir::failure();
3174
3175 if (parser.parseCustomAttributeWithFallback(result&: rowsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
3176 return ::mlir::failure();
3177 }
3178 if (rowsAttr) result.getOrAddProperties<MatrixColumnMajorLoadOp::Properties>().rows = rowsAttr;
3179 if (parser.parseComma())
3180 return ::mlir::failure();
3181 if (parser.parseKeyword(keyword: "columns"))
3182 return ::mlir::failure();
3183 if (parser.parseEqual())
3184 return ::mlir::failure();
3185
3186 if (parser.parseCustomAttributeWithFallback(result&: columnsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
3187 return ::mlir::failure();
3188 }
3189 if (columnsAttr) result.getOrAddProperties<MatrixColumnMajorLoadOp::Properties>().columns = columnsAttr;
3190 {
3191 auto loc = parser.getCurrentLocation();(void)loc;
3192 if (parser.parseOptionalAttrDict(result&: result.attributes))
3193 return ::mlir::failure();
3194 if (result.attributes.get(name: "isVolatile"))
3195 return parser.emitError(loc, message: "inherent attribute 'isVolatile' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
3196 if (result.attributes.get(name: "rows"))
3197 return parser.emitError(loc, message: "inherent attribute 'rows' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
3198 if (result.attributes.get(name: "columns"))
3199 return parser.emitError(loc, message: "inherent attribute 'columns' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
3200 }
3201 if (parser.parseColon())
3202 return ::mlir::failure();
3203
3204 {
3205 ::mlir::VectorType type;
3206 if (parser.parseCustomTypeWithFallback(result&: type))
3207 return ::mlir::failure();
3208 resRawType = type;
3209 }
3210 if (parser.parseKeyword(keyword: "from"))
3211 return ::mlir::failure();
3212
3213 if (parser.parseType(result&: dataRawType))
3214 return ::mlir::failure();
3215 if (parser.parseKeyword(keyword: "stride"))
3216 return ::mlir::failure();
3217
3218 {
3219 ::mlir::IntegerType type;
3220 if (parser.parseCustomTypeWithFallback(result&: type))
3221 return ::mlir::failure();
3222 strideRawType = type;
3223 }
3224 result.addTypes(newTypes: resTypes);
3225 // coverity[ARRAY_VS_SINGLETON]
3226 if (parser.resolveOperands(operands&: dataOperands, types&: dataTypes, loc: dataOperandsLoc, result&: result.operands))
3227 return ::mlir::failure();
3228 // coverity[ARRAY_VS_SINGLETON]
3229 if (parser.resolveOperands(operands&: strideOperands, types&: strideTypes, loc: strideOperandsLoc, result&: result.operands))
3230 return ::mlir::failure();
3231 return ::mlir::success();
3232}
3233
3234LLVM_ATTRIBUTE_MINSIZE void MatrixColumnMajorLoadOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3235 _odsPrinter << ' ';
3236 _odsPrinter << getData();
3237 _odsPrinter << ",";
3238 _odsPrinter << " <";
3239 _odsPrinter << "stride";
3240 _odsPrinter << " =";
3241 _odsPrinter << ' ';
3242 _odsPrinter << getStride();
3243 _odsPrinter << ">";
3244 _odsPrinter << ",";
3245 _odsPrinter << " is_volatile";
3246 _odsPrinter << " =";
3247 _odsPrinter << ' ';
3248 _odsPrinter.printAttributeWithoutType(attr: getIsVolatileAttr());
3249 _odsPrinter << ",";
3250 _odsPrinter << " rows";
3251 _odsPrinter << " =";
3252 _odsPrinter << ' ';
3253 _odsPrinter.printAttributeWithoutType(attr: getRowsAttr());
3254 _odsPrinter << ",";
3255 _odsPrinter << " columns";
3256 _odsPrinter << " =";
3257 _odsPrinter << ' ';
3258 _odsPrinter.printAttributeWithoutType(attr: getColumnsAttr());
3259 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
3260 _odsPrinter << " :";
3261 _odsPrinter << ' ';
3262 {
3263 auto type = getRes().getType();
3264 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
3265 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
3266 else
3267 _odsPrinter << type;
3268 }
3269 _odsPrinter << " from";
3270 _odsPrinter << ' ';
3271 _odsPrinter << getData().getType();
3272 _odsPrinter << " stride";
3273 _odsPrinter << ' ';
3274 {
3275 auto type = getStride().getType();
3276 if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(Val&: type))
3277 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
3278 else
3279 _odsPrinter << type;
3280 }
3281}
3282
3283void MatrixColumnMajorLoadOp::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3284 Properties &properties = odsState.getOrAddProperties<Properties>();
3285 populateDefaultProperties(opName: odsState.name, properties);
3286 const ::llvm::StringRef inherentNames[] = {"isVolatile", "rows", "columns"};
3287 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
3288 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
3289 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
3290 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
3291 });
3292}
3293
3294
3295} // namespace mlir::LLVM
3296MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::MatrixColumnMajorLoadOp)
3297MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MatrixColumnMajorLoadOpGenericAdaptorBase::Properties)
3298
3299namespace mlir::LLVM {
3300
3301
3302//===----------------------------------------------------------------------===//
3303// ::mlir::LLVM::MatrixColumnMajorStoreOp definitions
3304//===----------------------------------------------------------------------===//
3305
3306namespace detail {
3307
3308MatrixColumnMajorStoreOpGenericAdaptorBase::MatrixColumnMajorStoreOpGenericAdaptorBase(MatrixColumnMajorStoreOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
3309
3310bool MatrixColumnMajorStoreOpGenericAdaptorBase::getIsVolatile() {
3311 auto attr = getIsVolatileAttr();
3312 return attr.getValue().getZExtValue();
3313}
3314
3315uint32_t MatrixColumnMajorStoreOpGenericAdaptorBase::getRows() {
3316 auto attr = getRowsAttr();
3317 return attr.getValue().getZExtValue();
3318}
3319
3320uint32_t MatrixColumnMajorStoreOpGenericAdaptorBase::getColumns() {
3321 auto attr = getColumnsAttr();
3322 return attr.getValue().getZExtValue();
3323}
3324
3325
3326} // namespace detail
3327MatrixColumnMajorStoreOpAdaptor::MatrixColumnMajorStoreOpAdaptor(MatrixColumnMajorStoreOp op) : MatrixColumnMajorStoreOpGenericAdaptor(op->getOperands(), op) {}
3328
3329::llvm::LogicalResult MatrixColumnMajorStoreOpAdaptor::verify(::mlir::Location loc) {
3330 auto tblgen_columns = getProperties().columns; (void)tblgen_columns;
3331 if (!tblgen_columns) return emitError(loc, message: "'llvm.intr.matrix.column.major.store' op requires attribute 'columns'");
3332 auto tblgen_isVolatile = getProperties().isVolatile; (void)tblgen_isVolatile;
3333 if (!tblgen_isVolatile) return emitError(loc, message: "'llvm.intr.matrix.column.major.store' op requires attribute 'isVolatile'");
3334 auto tblgen_rows = getProperties().rows; (void)tblgen_rows;
3335 if (!tblgen_rows) return emitError(loc, message: "'llvm.intr.matrix.column.major.store' op requires attribute 'rows'");
3336
3337 if (tblgen_isVolatile && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_isVolatile))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_isVolatile).getType().isSignlessInteger(width: 1)))))
3338 return emitError(loc, message: "'llvm.intr.matrix.column.major.store' op attribute 'isVolatile' failed to satisfy constraint: 1-bit signless integer attribute");
3339
3340 if (tblgen_rows && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_rows))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_rows).getType().isSignlessInteger(width: 32)))))
3341 return emitError(loc, message: "'llvm.intr.matrix.column.major.store' op attribute 'rows' failed to satisfy constraint: 32-bit signless integer attribute");
3342
3343 if (tblgen_columns && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_columns))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_columns).getType().isSignlessInteger(width: 32)))))
3344 return emitError(loc, message: "'llvm.intr.matrix.column.major.store' op attribute 'columns' failed to satisfy constraint: 32-bit signless integer attribute");
3345 return ::mlir::success();
3346}
3347
3348::llvm::LogicalResult MatrixColumnMajorStoreOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3349 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3350 if (!dict) {
3351 emitError() << "expected DictionaryAttr to set properties";
3352 return ::mlir::failure();
3353 }
3354
3355 {
3356 auto attr = dict.get(name: "columns");
3357 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3358 storage&: prop.columns, attr, name: "columns", emitError)))
3359 return ::mlir::failure();
3360 }
3361
3362 {
3363 auto attr = dict.get(name: "isVolatile");
3364 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3365 storage&: prop.isVolatile, attr, name: "isVolatile", emitError)))
3366 return ::mlir::failure();
3367 }
3368
3369 {
3370 auto attr = dict.get(name: "rows");
3371 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3372 storage&: prop.rows, attr, name: "rows", emitError)))
3373 return ::mlir::failure();
3374 }
3375 return ::mlir::success();
3376}
3377
3378::mlir::Attribute MatrixColumnMajorStoreOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
3379 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
3380 ::mlir::Builder odsBuilder{ctx};
3381 ::mlir::detail::appendAttributeProperty(attrs, name: "columns", attr: prop.columns);
3382 ::mlir::detail::appendAttributeProperty(attrs, name: "isVolatile", attr: prop.isVolatile);
3383 ::mlir::detail::appendAttributeProperty(attrs, name: "rows", attr: prop.rows);
3384
3385 if (!attrs.empty())
3386 return odsBuilder.getDictionaryAttr(value: attrs);
3387 return {};
3388}
3389
3390llvm::hash_code MatrixColumnMajorStoreOp::computePropertiesHash(const Properties &prop) {
3391 using llvm::hash_value;
3392 return llvm::hash_combine(
3393 args: llvm::hash_value(ptr: prop.columns.getAsOpaquePointer()),
3394 args: llvm::hash_value(ptr: prop.isVolatile.getAsOpaquePointer()),
3395 args: llvm::hash_value(ptr: prop.rows.getAsOpaquePointer()));
3396}
3397
3398std::optional<mlir::Attribute> MatrixColumnMajorStoreOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
3399 if (name == "columns")
3400 return prop.columns;
3401
3402 if (name == "isVolatile")
3403 return prop.isVolatile;
3404
3405 if (name == "rows")
3406 return prop.rows;
3407 return std::nullopt;
3408}
3409
3410void MatrixColumnMajorStoreOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
3411 if (name == "columns") {
3412 prop.columns = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.columns)>>(Val&: value);
3413 return;
3414 }
3415
3416 if (name == "isVolatile") {
3417 prop.isVolatile = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.isVolatile)>>(Val&: value);
3418 return;
3419 }
3420
3421 if (name == "rows") {
3422 prop.rows = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.rows)>>(Val&: value);
3423 return;
3424 }
3425}
3426
3427void MatrixColumnMajorStoreOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
3428 if (prop.columns) {
3429 ::mlir::Attribute value = prop.columns;
3430 ::mlir::Attribute originalValue = value;
3431 visitor("columns", value);
3432 if (value != originalValue)
3433 setInherentAttr(prop, name: "columns", value);
3434 }
3435
3436 if (prop.isVolatile) {
3437 ::mlir::Attribute value = prop.isVolatile;
3438 ::mlir::Attribute originalValue = value;
3439 visitor("isVolatile", value);
3440 if (value != originalValue)
3441 setInherentAttr(prop, name: "isVolatile", value);
3442 }
3443
3444 if (prop.rows) {
3445 ::mlir::Attribute value = prop.rows;
3446 ::mlir::Attribute originalValue = value;
3447 visitor("rows", value);
3448 if (value != originalValue)
3449 setInherentAttr(prop, name: "rows", value);
3450 }
3451}
3452
3453::llvm::LogicalResult MatrixColumnMajorStoreOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3454 {
3455 ::mlir::Attribute attr = attrs.get(name: getColumnsAttrName(name: opName));
3456 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "columns", emitError)))
3457 return ::mlir::failure();
3458 }
3459
3460 {
3461 ::mlir::Attribute attr = attrs.get(name: getIsVolatileAttrName(name: opName));
3462 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps6(attr, attrName: "isVolatile", emitError)))
3463 return ::mlir::failure();
3464 }
3465
3466 {
3467 ::mlir::Attribute attr = attrs.get(name: getRowsAttrName(name: opName));
3468 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "rows", emitError)))
3469 return ::mlir::failure();
3470 }
3471 return ::mlir::success();
3472}
3473
3474::llvm::LogicalResult MatrixColumnMajorStoreOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
3475 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
3476 if (::mlir::failed(Result: reader.readAttribute(result&: prop.columns)))
3477 return ::mlir::failure();
3478
3479 if (::mlir::failed(Result: reader.readAttribute(result&: prop.isVolatile)))
3480 return ::mlir::failure();
3481
3482 if (::mlir::failed(Result: reader.readAttribute(result&: prop.rows)))
3483 return ::mlir::failure();
3484 return ::mlir::success();
3485}
3486
3487void MatrixColumnMajorStoreOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
3488 auto &prop = getProperties(); (void)prop;
3489 writer.writeAttribute(attr: prop.columns);
3490 writer.writeAttribute(attr: prop.isVolatile);
3491 writer.writeAttribute(attr: prop.rows);
3492}
3493
3494bool MatrixColumnMajorStoreOp::getIsVolatile() {
3495 auto attr = getIsVolatileAttr();
3496 return attr.getValue().getZExtValue();
3497}
3498
3499uint32_t MatrixColumnMajorStoreOp::getRows() {
3500 auto attr = getRowsAttr();
3501 return attr.getValue().getZExtValue();
3502}
3503
3504uint32_t MatrixColumnMajorStoreOp::getColumns() {
3505 auto attr = getColumnsAttr();
3506 return attr.getValue().getZExtValue();
3507}
3508
3509void MatrixColumnMajorStoreOp::setIsVolatile(bool attrValue) {
3510 getProperties().isVolatile = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 1), value: attrValue);
3511}
3512
3513void MatrixColumnMajorStoreOp::setRows(uint32_t attrValue) {
3514 getProperties().rows = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
3515}
3516
3517void MatrixColumnMajorStoreOp::setColumns(uint32_t attrValue) {
3518 getProperties().columns = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
3519}
3520
3521void MatrixColumnMajorStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
3522 assert(isCompatibleType(resultType) && "result must be an LLVM type");
3523 assert(::llvm::isa<LLVMVoidType>(resultType) &&
3524 "for zero-result operands, only 'void' is accepted as result type");
3525 build(odsBuilder, odsState, operands, attributes);
3526
3527}
3528
3529MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
3530 ::mlir::OperationState __state__(location, getOperationName());
3531 build(odsBuilder&: builder, odsState&: __state__, resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3532 auto __res__ = builder.create(state: __state__);
3533 assert((::llvm::isa<MatrixColumnMajorStoreOp>(__res__)) && "builder didn't return the right type");
3534 return ::llvm::cast<MatrixColumnMajorStoreOp>(Val: __res__);
3535}
3536
3537MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
3538 return create(builder, location: builder.getLoc(), resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3539}
3540
3541void MatrixColumnMajorStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
3542 odsState.addOperands(newOperands: operands);
3543 for (auto namedAttr : attributes)
3544 odsState.addAttribute(name: namedAttr.getName(), attr: namedAttr.getValue());
3545
3546}
3547
3548MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
3549 ::mlir::OperationState __state__(location, getOperationName());
3550 build(odsBuilder&: builder, odsState&: __state__, operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3551 auto __res__ = builder.create(state: __state__);
3552 assert((::llvm::isa<MatrixColumnMajorStoreOp>(__res__)) && "builder didn't return the right type");
3553 return ::llvm::cast<MatrixColumnMajorStoreOp>(Val: __res__);
3554}
3555
3556MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
3557 return create(builder, location: builder.getLoc(), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
3558}
3559
3560void MatrixColumnMajorStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
3561 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, matrix, data, stride, isVolatile, rows, columns);
3562}
3563
3564MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
3565 ::mlir::OperationState __state__(location, getOperationName());
3566 build(odsBuilder&: builder, odsState&: __state__, matrix: std::forward<decltype(matrix)>(t&: matrix), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3567 auto __res__ = builder.create(state: __state__);
3568 assert((::llvm::isa<MatrixColumnMajorStoreOp>(__res__)) && "builder didn't return the right type");
3569 return ::llvm::cast<MatrixColumnMajorStoreOp>(Val: __res__);
3570}
3571
3572MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
3573 return create(builder, location: builder.getLoc(), matrix: std::forward<decltype(matrix)>(t&: matrix), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3574}
3575
3576void MatrixColumnMajorStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
3577 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3578 odsState.addOperands(newOperands: matrix);
3579 odsState.addOperands(newOperands: data);
3580 odsState.addOperands(newOperands: stride);
3581 odsProperties.isVolatile = isVolatile;
3582 odsProperties.rows = rows;
3583 odsProperties.columns = columns;
3584 assert(resultTypes.size() == 0u && "mismatched number of results");
3585 odsState.addTypes(newTypes&: resultTypes);
3586}
3587
3588MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
3589 ::mlir::OperationState __state__(location, getOperationName());
3590 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), matrix: std::forward<decltype(matrix)>(t&: matrix), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3591 auto __res__ = builder.create(state: __state__);
3592 assert((::llvm::isa<MatrixColumnMajorStoreOp>(__res__)) && "builder didn't return the right type");
3593 return ::llvm::cast<MatrixColumnMajorStoreOp>(Val: __res__);
3594}
3595
3596MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
3597 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), matrix: std::forward<decltype(matrix)>(t&: matrix), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3598}
3599
3600void MatrixColumnMajorStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3601 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, matrix, data, stride, isVolatile, rows, columns);
3602}
3603
3604MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3605 ::mlir::OperationState __state__(location, getOperationName());
3606 build(odsBuilder&: builder, odsState&: __state__, matrix: std::forward<decltype(matrix)>(t&: matrix), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3607 auto __res__ = builder.create(state: __state__);
3608 assert((::llvm::isa<MatrixColumnMajorStoreOp>(__res__)) && "builder didn't return the right type");
3609 return ::llvm::cast<MatrixColumnMajorStoreOp>(Val: __res__);
3610}
3611
3612MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3613 return create(builder, location: builder.getLoc(), matrix: std::forward<decltype(matrix)>(t&: matrix), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3614}
3615
3616void MatrixColumnMajorStoreOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3617 auto &odsProperties = odsState.getOrAddProperties<Properties>();
3618 odsState.addOperands(newOperands: matrix);
3619 odsState.addOperands(newOperands: data);
3620 odsState.addOperands(newOperands: stride);
3621 odsProperties.isVolatile = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 1), value: isVolatile);
3622 odsProperties.rows = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: rows);
3623 odsProperties.columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: columns);
3624 assert(resultTypes.size() == 0u && "mismatched number of results");
3625 odsState.addTypes(newTypes&: resultTypes);
3626}
3627
3628MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3629 ::mlir::OperationState __state__(location, getOperationName());
3630 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), matrix: std::forward<decltype(matrix)>(t&: matrix), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3631 auto __res__ = builder.create(state: __state__);
3632 assert((::llvm::isa<MatrixColumnMajorStoreOp>(__res__)) && "builder didn't return the right type");
3633 return ::llvm::cast<MatrixColumnMajorStoreOp>(Val: __res__);
3634}
3635
3636MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns) {
3637 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), matrix: std::forward<decltype(matrix)>(t&: matrix), data: std::forward<decltype(data)>(t&: data), stride: std::forward<decltype(stride)>(t&: stride), isVolatile: std::forward<decltype(isVolatile)>(t&: isVolatile), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
3638}
3639
3640void MatrixColumnMajorStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3641 assert(operands.size() == 3u && "mismatched number of parameters");
3642 odsState.addOperands(newOperands: operands);
3643 buildPropertiesAndDiscardableAttributes(odsState, attributes);
3644 assert(resultTypes.size() == 0u && "mismatched number of return types");
3645 odsState.addTypes(newTypes&: resultTypes);
3646}
3647
3648MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3649LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3650
3651 ::mlir::OperationState __state__(location, getOperationName());
3652 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));
3653 auto __res__ = builder.create(state: __state__);
3654 assert((::llvm::isa<MatrixColumnMajorStoreOp>(__res__)) && "builder didn't return the right type");
3655 return ::llvm::cast<MatrixColumnMajorStoreOp>(Val: __res__);
3656LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3657}
3658
3659MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3660LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
3661
3662 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));
3663LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
3664}
3665
3666void MatrixColumnMajorStoreOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3667 assert(operands.size() == 3u && "mismatched number of parameters");
3668 odsState.addOperands(newOperands: operands);
3669 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
3670 odsState.addAttributes(newAttributes: discardableAttributes);
3671 assert(resultTypes.size() == 0u && "mismatched number of return types");
3672 odsState.addTypes(newTypes&: resultTypes);
3673}
3674
3675MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3676 ::mlir::OperationState __state__(location, getOperationName());
3677 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));
3678 auto __res__ = builder.create(state: __state__);
3679 assert((::llvm::isa<MatrixColumnMajorStoreOp>(__res__)) && "builder didn't return the right type");
3680 return ::llvm::cast<MatrixColumnMajorStoreOp>(Val: __res__);
3681}
3682
3683MatrixColumnMajorStoreOp MatrixColumnMajorStoreOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
3684 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));
3685}
3686
3687::llvm::LogicalResult MatrixColumnMajorStoreOp::verifyInvariantsImpl() {
3688 auto tblgen_columns = getProperties().columns; (void)tblgen_columns;
3689 if (!tblgen_columns) return emitOpError(message: "requires attribute 'columns'");
3690 auto tblgen_isVolatile = getProperties().isVolatile; (void)tblgen_isVolatile;
3691 if (!tblgen_isVolatile) return emitOpError(message: "requires attribute 'isVolatile'");
3692 auto tblgen_rows = getProperties().rows; (void)tblgen_rows;
3693 if (!tblgen_rows) return emitOpError(message: "requires attribute 'rows'");
3694
3695 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, attr: tblgen_isVolatile, attrName: "isVolatile")))
3696 return ::mlir::failure();
3697
3698 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_rows, attrName: "rows")))
3699 return ::mlir::failure();
3700
3701 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_columns, attrName: "columns")))
3702 return ::mlir::failure();
3703 {
3704 unsigned index = 0; (void)index;
3705 auto valueGroup0 = getODSOperands(index: 0);
3706
3707 for (auto v : valueGroup0) {
3708 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3709 return ::mlir::failure();
3710 }
3711 auto valueGroup1 = getODSOperands(index: 1);
3712
3713 for (auto v : valueGroup1) {
3714 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3715 return ::mlir::failure();
3716 }
3717 auto valueGroup2 = getODSOperands(index: 2);
3718
3719 for (auto v : valueGroup2) {
3720 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
3721 return ::mlir::failure();
3722 }
3723 }
3724 return ::mlir::success();
3725}
3726
3727::llvm::LogicalResult MatrixColumnMajorStoreOp::verifyInvariants() {
3728 return verifyInvariantsImpl();
3729}
3730
3731::mlir::ParseResult MatrixColumnMajorStoreOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
3732 ::mlir::OpAsmParser::UnresolvedOperand matrixRawOperand{};
3733 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> matrixOperands(&matrixRawOperand, 1); ::llvm::SMLoc matrixOperandsLoc;
3734 (void)matrixOperandsLoc;
3735 ::mlir::OpAsmParser::UnresolvedOperand dataRawOperand{};
3736 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> dataOperands(&dataRawOperand, 1); ::llvm::SMLoc dataOperandsLoc;
3737 (void)dataOperandsLoc;
3738 ::mlir::OpAsmParser::UnresolvedOperand strideRawOperand{};
3739 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> strideOperands(&strideRawOperand, 1); ::llvm::SMLoc strideOperandsLoc;
3740 (void)strideOperandsLoc;
3741 ::mlir::IntegerAttr isVolatileAttr;
3742 ::mlir::IntegerAttr rowsAttr;
3743 ::mlir::IntegerAttr columnsAttr;
3744 ::mlir::Type matrixRawType{};
3745 ::llvm::ArrayRef<::mlir::Type> matrixTypes(&matrixRawType, 1);
3746 ::mlir::Type dataRawType{};
3747 ::llvm::ArrayRef<::mlir::Type> dataTypes(&dataRawType, 1);
3748 ::mlir::Type strideRawType{};
3749 ::llvm::ArrayRef<::mlir::Type> strideTypes(&strideRawType, 1);
3750
3751 matrixOperandsLoc = parser.getCurrentLocation();
3752 if (parser.parseOperand(result&: matrixRawOperand))
3753 return ::mlir::failure();
3754 if (parser.parseComma())
3755 return ::mlir::failure();
3756
3757 dataOperandsLoc = parser.getCurrentLocation();
3758 if (parser.parseOperand(result&: dataRawOperand))
3759 return ::mlir::failure();
3760 if (parser.parseComma())
3761 return ::mlir::failure();
3762 if (parser.parseLess())
3763 return ::mlir::failure();
3764 if (parser.parseKeyword(keyword: "stride"))
3765 return ::mlir::failure();
3766 if (parser.parseEqual())
3767 return ::mlir::failure();
3768
3769 strideOperandsLoc = parser.getCurrentLocation();
3770 if (parser.parseOperand(result&: strideRawOperand))
3771 return ::mlir::failure();
3772 if (parser.parseGreater())
3773 return ::mlir::failure();
3774 if (parser.parseComma())
3775 return ::mlir::failure();
3776 if (parser.parseKeyword(keyword: "is_volatile"))
3777 return ::mlir::failure();
3778 if (parser.parseEqual())
3779 return ::mlir::failure();
3780
3781 if (parser.parseCustomAttributeWithFallback(result&: isVolatileAttr, type: parser.getBuilder().getIntegerType(width: 1))) {
3782 return ::mlir::failure();
3783 }
3784 if (isVolatileAttr) result.getOrAddProperties<MatrixColumnMajorStoreOp::Properties>().isVolatile = isVolatileAttr;
3785 if (parser.parseComma())
3786 return ::mlir::failure();
3787 if (parser.parseKeyword(keyword: "rows"))
3788 return ::mlir::failure();
3789 if (parser.parseEqual())
3790 return ::mlir::failure();
3791
3792 if (parser.parseCustomAttributeWithFallback(result&: rowsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
3793 return ::mlir::failure();
3794 }
3795 if (rowsAttr) result.getOrAddProperties<MatrixColumnMajorStoreOp::Properties>().rows = rowsAttr;
3796 if (parser.parseComma())
3797 return ::mlir::failure();
3798 if (parser.parseKeyword(keyword: "columns"))
3799 return ::mlir::failure();
3800 if (parser.parseEqual())
3801 return ::mlir::failure();
3802
3803 if (parser.parseCustomAttributeWithFallback(result&: columnsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
3804 return ::mlir::failure();
3805 }
3806 if (columnsAttr) result.getOrAddProperties<MatrixColumnMajorStoreOp::Properties>().columns = columnsAttr;
3807 {
3808 auto loc = parser.getCurrentLocation();(void)loc;
3809 if (parser.parseOptionalAttrDict(result&: result.attributes))
3810 return ::mlir::failure();
3811 if (result.attributes.get(name: "isVolatile"))
3812 return parser.emitError(loc, message: "inherent attribute 'isVolatile' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
3813 if (result.attributes.get(name: "rows"))
3814 return parser.emitError(loc, message: "inherent attribute 'rows' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
3815 if (result.attributes.get(name: "columns"))
3816 return parser.emitError(loc, message: "inherent attribute 'columns' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
3817 }
3818 if (parser.parseColon())
3819 return ::mlir::failure();
3820
3821 {
3822 ::mlir::VectorType type;
3823 if (parser.parseCustomTypeWithFallback(result&: type))
3824 return ::mlir::failure();
3825 matrixRawType = type;
3826 }
3827 if (parser.parseKeyword(keyword: "to"))
3828 return ::mlir::failure();
3829
3830 if (parser.parseType(result&: dataRawType))
3831 return ::mlir::failure();
3832 if (parser.parseKeyword(keyword: "stride"))
3833 return ::mlir::failure();
3834
3835 {
3836 ::mlir::IntegerType type;
3837 if (parser.parseCustomTypeWithFallback(result&: type))
3838 return ::mlir::failure();
3839 strideRawType = type;
3840 }
3841 // coverity[ARRAY_VS_SINGLETON]
3842 if (parser.resolveOperands(operands&: matrixOperands, types&: matrixTypes, loc: matrixOperandsLoc, result&: result.operands))
3843 return ::mlir::failure();
3844 // coverity[ARRAY_VS_SINGLETON]
3845 if (parser.resolveOperands(operands&: dataOperands, types&: dataTypes, loc: dataOperandsLoc, result&: result.operands))
3846 return ::mlir::failure();
3847 // coverity[ARRAY_VS_SINGLETON]
3848 if (parser.resolveOperands(operands&: strideOperands, types&: strideTypes, loc: strideOperandsLoc, result&: result.operands))
3849 return ::mlir::failure();
3850 return ::mlir::success();
3851}
3852
3853LLVM_ATTRIBUTE_MINSIZE void MatrixColumnMajorStoreOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
3854 _odsPrinter << ' ';
3855 _odsPrinter << getMatrix();
3856 _odsPrinter << ",";
3857 _odsPrinter << ' ';
3858 _odsPrinter << getData();
3859 _odsPrinter << ",";
3860 _odsPrinter << " <";
3861 _odsPrinter << "stride";
3862 _odsPrinter << " =";
3863 _odsPrinter << ' ';
3864 _odsPrinter << getStride();
3865 _odsPrinter << ">";
3866 _odsPrinter << ",";
3867 _odsPrinter << " is_volatile";
3868 _odsPrinter << " =";
3869 _odsPrinter << ' ';
3870 _odsPrinter.printAttributeWithoutType(attr: getIsVolatileAttr());
3871 _odsPrinter << ",";
3872 _odsPrinter << " rows";
3873 _odsPrinter << " =";
3874 _odsPrinter << ' ';
3875 _odsPrinter.printAttributeWithoutType(attr: getRowsAttr());
3876 _odsPrinter << ",";
3877 _odsPrinter << " columns";
3878 _odsPrinter << " =";
3879 _odsPrinter << ' ';
3880 _odsPrinter.printAttributeWithoutType(attr: getColumnsAttr());
3881 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
3882 _odsPrinter << " :";
3883 _odsPrinter << ' ';
3884 {
3885 auto type = getMatrix().getType();
3886 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
3887 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
3888 else
3889 _odsPrinter << type;
3890 }
3891 _odsPrinter << " to";
3892 _odsPrinter << ' ';
3893 _odsPrinter << getData().getType();
3894 _odsPrinter << " stride";
3895 _odsPrinter << ' ';
3896 {
3897 auto type = getStride().getType();
3898 if (auto validType = ::llvm::dyn_cast<::mlir::IntegerType>(Val&: type))
3899 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
3900 else
3901 _odsPrinter << type;
3902 }
3903}
3904
3905void MatrixColumnMajorStoreOp::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
3906 Properties &properties = odsState.getOrAddProperties<Properties>();
3907 populateDefaultProperties(opName: odsState.name, properties);
3908 const ::llvm::StringRef inherentNames[] = {"isVolatile", "rows", "columns"};
3909 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
3910 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
3911 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
3912 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
3913 });
3914}
3915
3916
3917} // namespace mlir::LLVM
3918MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::MatrixColumnMajorStoreOp)
3919MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MatrixColumnMajorStoreOpGenericAdaptorBase::Properties)
3920
3921namespace mlir::LLVM {
3922
3923
3924//===----------------------------------------------------------------------===//
3925// ::mlir::LLVM::MatrixMultiplyOp definitions
3926//===----------------------------------------------------------------------===//
3927
3928namespace detail {
3929
3930MatrixMultiplyOpGenericAdaptorBase::MatrixMultiplyOpGenericAdaptorBase(MatrixMultiplyOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
3931
3932uint32_t MatrixMultiplyOpGenericAdaptorBase::getLhsRows() {
3933 auto attr = getLhsRowsAttr();
3934 return attr.getValue().getZExtValue();
3935}
3936
3937uint32_t MatrixMultiplyOpGenericAdaptorBase::getLhsColumns() {
3938 auto attr = getLhsColumnsAttr();
3939 return attr.getValue().getZExtValue();
3940}
3941
3942uint32_t MatrixMultiplyOpGenericAdaptorBase::getRhsColumns() {
3943 auto attr = getRhsColumnsAttr();
3944 return attr.getValue().getZExtValue();
3945}
3946
3947
3948} // namespace detail
3949MatrixMultiplyOpAdaptor::MatrixMultiplyOpAdaptor(MatrixMultiplyOp op) : MatrixMultiplyOpGenericAdaptor(op->getOperands(), op) {}
3950
3951::llvm::LogicalResult MatrixMultiplyOpAdaptor::verify(::mlir::Location loc) {
3952 auto tblgen_lhs_columns = getProperties().lhs_columns; (void)tblgen_lhs_columns;
3953 if (!tblgen_lhs_columns) return emitError(loc, message: "'llvm.intr.matrix.multiply' op requires attribute 'lhs_columns'");
3954 auto tblgen_lhs_rows = getProperties().lhs_rows; (void)tblgen_lhs_rows;
3955 if (!tblgen_lhs_rows) return emitError(loc, message: "'llvm.intr.matrix.multiply' op requires attribute 'lhs_rows'");
3956 auto tblgen_rhs_columns = getProperties().rhs_columns; (void)tblgen_rhs_columns;
3957 if (!tblgen_rhs_columns) return emitError(loc, message: "'llvm.intr.matrix.multiply' op requires attribute 'rhs_columns'");
3958
3959 if (tblgen_lhs_rows && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_lhs_rows))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_lhs_rows).getType().isSignlessInteger(width: 32)))))
3960 return emitError(loc, message: "'llvm.intr.matrix.multiply' op attribute 'lhs_rows' failed to satisfy constraint: 32-bit signless integer attribute");
3961
3962 if (tblgen_lhs_columns && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_lhs_columns))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_lhs_columns).getType().isSignlessInteger(width: 32)))))
3963 return emitError(loc, message: "'llvm.intr.matrix.multiply' op attribute 'lhs_columns' failed to satisfy constraint: 32-bit signless integer attribute");
3964
3965 if (tblgen_rhs_columns && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_rhs_columns))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_rhs_columns).getType().isSignlessInteger(width: 32)))))
3966 return emitError(loc, message: "'llvm.intr.matrix.multiply' op attribute 'rhs_columns' failed to satisfy constraint: 32-bit signless integer attribute");
3967 return ::mlir::success();
3968}
3969
3970::llvm::LogicalResult MatrixMultiplyOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
3971 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
3972 if (!dict) {
3973 emitError() << "expected DictionaryAttr to set properties";
3974 return ::mlir::failure();
3975 }
3976
3977 {
3978 auto attr = dict.get(name: "lhs_columns");
3979 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3980 storage&: prop.lhs_columns, attr, name: "lhs_columns", emitError)))
3981 return ::mlir::failure();
3982 }
3983
3984 {
3985 auto attr = dict.get(name: "lhs_rows");
3986 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3987 storage&: prop.lhs_rows, attr, name: "lhs_rows", emitError)))
3988 return ::mlir::failure();
3989 }
3990
3991 {
3992 auto attr = dict.get(name: "rhs_columns");
3993 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
3994 storage&: prop.rhs_columns, attr, name: "rhs_columns", emitError)))
3995 return ::mlir::failure();
3996 }
3997 return ::mlir::success();
3998}
3999
4000::mlir::Attribute MatrixMultiplyOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4001 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4002 ::mlir::Builder odsBuilder{ctx};
4003 ::mlir::detail::appendAttributeProperty(attrs, name: "lhs_columns", attr: prop.lhs_columns);
4004 ::mlir::detail::appendAttributeProperty(attrs, name: "lhs_rows", attr: prop.lhs_rows);
4005 ::mlir::detail::appendAttributeProperty(attrs, name: "rhs_columns", attr: prop.rhs_columns);
4006
4007 if (!attrs.empty())
4008 return odsBuilder.getDictionaryAttr(value: attrs);
4009 return {};
4010}
4011
4012llvm::hash_code MatrixMultiplyOp::computePropertiesHash(const Properties &prop) {
4013 using llvm::hash_value;
4014 return llvm::hash_combine(
4015 args: llvm::hash_value(ptr: prop.lhs_columns.getAsOpaquePointer()),
4016 args: llvm::hash_value(ptr: prop.lhs_rows.getAsOpaquePointer()),
4017 args: llvm::hash_value(ptr: prop.rhs_columns.getAsOpaquePointer()));
4018}
4019
4020std::optional<mlir::Attribute> MatrixMultiplyOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4021 if (name == "lhs_columns")
4022 return prop.lhs_columns;
4023
4024 if (name == "lhs_rows")
4025 return prop.lhs_rows;
4026
4027 if (name == "rhs_columns")
4028 return prop.rhs_columns;
4029 return std::nullopt;
4030}
4031
4032void MatrixMultiplyOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4033 if (name == "lhs_columns") {
4034 prop.lhs_columns = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lhs_columns)>>(Val&: value);
4035 return;
4036 }
4037
4038 if (name == "lhs_rows") {
4039 prop.lhs_rows = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lhs_rows)>>(Val&: value);
4040 return;
4041 }
4042
4043 if (name == "rhs_columns") {
4044 prop.rhs_columns = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.rhs_columns)>>(Val&: value);
4045 return;
4046 }
4047}
4048
4049void MatrixMultiplyOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
4050 if (prop.lhs_columns) {
4051 ::mlir::Attribute value = prop.lhs_columns;
4052 ::mlir::Attribute originalValue = value;
4053 visitor("lhs_columns", value);
4054 if (value != originalValue)
4055 setInherentAttr(prop, name: "lhs_columns", value);
4056 }
4057
4058 if (prop.lhs_rows) {
4059 ::mlir::Attribute value = prop.lhs_rows;
4060 ::mlir::Attribute originalValue = value;
4061 visitor("lhs_rows", value);
4062 if (value != originalValue)
4063 setInherentAttr(prop, name: "lhs_rows", value);
4064 }
4065
4066 if (prop.rhs_columns) {
4067 ::mlir::Attribute value = prop.rhs_columns;
4068 ::mlir::Attribute originalValue = value;
4069 visitor("rhs_columns", value);
4070 if (value != originalValue)
4071 setInherentAttr(prop, name: "rhs_columns", value);
4072 }
4073}
4074
4075::llvm::LogicalResult MatrixMultiplyOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4076 {
4077 ::mlir::Attribute attr = attrs.get(name: getLhsColumnsAttrName(name: opName));
4078 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "lhs_columns", emitError)))
4079 return ::mlir::failure();
4080 }
4081
4082 {
4083 ::mlir::Attribute attr = attrs.get(name: getLhsRowsAttrName(name: opName));
4084 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "lhs_rows", emitError)))
4085 return ::mlir::failure();
4086 }
4087
4088 {
4089 ::mlir::Attribute attr = attrs.get(name: getRhsColumnsAttrName(name: opName));
4090 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "rhs_columns", emitError)))
4091 return ::mlir::failure();
4092 }
4093 return ::mlir::success();
4094}
4095
4096::llvm::LogicalResult MatrixMultiplyOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
4097 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
4098 if (::mlir::failed(Result: reader.readAttribute(result&: prop.lhs_columns)))
4099 return ::mlir::failure();
4100
4101 if (::mlir::failed(Result: reader.readAttribute(result&: prop.lhs_rows)))
4102 return ::mlir::failure();
4103
4104 if (::mlir::failed(Result: reader.readAttribute(result&: prop.rhs_columns)))
4105 return ::mlir::failure();
4106 return ::mlir::success();
4107}
4108
4109void MatrixMultiplyOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
4110 auto &prop = getProperties(); (void)prop;
4111 writer.writeAttribute(attr: prop.lhs_columns);
4112 writer.writeAttribute(attr: prop.lhs_rows);
4113 writer.writeAttribute(attr: prop.rhs_columns);
4114}
4115
4116uint32_t MatrixMultiplyOp::getLhsRows() {
4117 auto attr = getLhsRowsAttr();
4118 return attr.getValue().getZExtValue();
4119}
4120
4121uint32_t MatrixMultiplyOp::getLhsColumns() {
4122 auto attr = getLhsColumnsAttr();
4123 return attr.getValue().getZExtValue();
4124}
4125
4126uint32_t MatrixMultiplyOp::getRhsColumns() {
4127 auto attr = getRhsColumnsAttr();
4128 return attr.getValue().getZExtValue();
4129}
4130
4131void MatrixMultiplyOp::setLhsRows(uint32_t attrValue) {
4132 getProperties().lhs_rows = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
4133}
4134
4135void MatrixMultiplyOp::setLhsColumns(uint32_t attrValue) {
4136 getProperties().lhs_columns = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
4137}
4138
4139void MatrixMultiplyOp::setRhsColumns(uint32_t attrValue) {
4140 getProperties().rhs_columns = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
4141}
4142
4143void MatrixMultiplyOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
4144 if (resultType) odsState.addTypes(newTypes: resultType);
4145 odsState.addOperands(newOperands: operands);
4146 for (auto namedAttr : attributes)
4147 odsState.addAttribute(name: namedAttr.getName(), attr: namedAttr.getValue());
4148
4149}
4150
4151MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
4152 ::mlir::OperationState __state__(location, getOperationName());
4153 build(odsBuilder&: builder, odsState&: __state__, resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4154 auto __res__ = builder.create(state: __state__);
4155 assert((::llvm::isa<MatrixMultiplyOp>(__res__)) && "builder didn't return the right type");
4156 return ::llvm::cast<MatrixMultiplyOp>(Val: __res__);
4157}
4158
4159MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
4160 return create(builder, location: builder.getLoc(), resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4161}
4162
4163void MatrixMultiplyOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns) {
4164 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4165 odsState.addOperands(newOperands: lhs);
4166 odsState.addOperands(newOperands: rhs);
4167 odsProperties.lhs_rows = lhs_rows;
4168 odsProperties.lhs_columns = lhs_columns;
4169 odsProperties.rhs_columns = rhs_columns;
4170 odsState.addTypes(newTypes: res);
4171}
4172
4173MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns) {
4174 ::mlir::OperationState __state__(location, getOperationName());
4175 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), lhs: std::forward<decltype(lhs)>(t&: lhs), rhs: std::forward<decltype(rhs)>(t&: rhs), lhs_rows: std::forward<decltype(lhs_rows)>(t&: lhs_rows), lhs_columns: std::forward<decltype(lhs_columns)>(t&: lhs_columns), rhs_columns: std::forward<decltype(rhs_columns)>(t&: rhs_columns));
4176 auto __res__ = builder.create(state: __state__);
4177 assert((::llvm::isa<MatrixMultiplyOp>(__res__)) && "builder didn't return the right type");
4178 return ::llvm::cast<MatrixMultiplyOp>(Val: __res__);
4179}
4180
4181MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns) {
4182 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), lhs: std::forward<decltype(lhs)>(t&: lhs), rhs: std::forward<decltype(rhs)>(t&: rhs), lhs_rows: std::forward<decltype(lhs_rows)>(t&: lhs_rows), lhs_columns: std::forward<decltype(lhs_columns)>(t&: lhs_columns), rhs_columns: std::forward<decltype(rhs_columns)>(t&: rhs_columns));
4183}
4184
4185void MatrixMultiplyOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns) {
4186 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4187 odsState.addOperands(newOperands: lhs);
4188 odsState.addOperands(newOperands: rhs);
4189 odsProperties.lhs_rows = lhs_rows;
4190 odsProperties.lhs_columns = lhs_columns;
4191 odsProperties.rhs_columns = rhs_columns;
4192 assert(resultTypes.size() == 1u && "mismatched number of results");
4193 odsState.addTypes(newTypes&: resultTypes);
4194}
4195
4196MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns) {
4197 ::mlir::OperationState __state__(location, getOperationName());
4198 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), lhs: std::forward<decltype(lhs)>(t&: lhs), rhs: std::forward<decltype(rhs)>(t&: rhs), lhs_rows: std::forward<decltype(lhs_rows)>(t&: lhs_rows), lhs_columns: std::forward<decltype(lhs_columns)>(t&: lhs_columns), rhs_columns: std::forward<decltype(rhs_columns)>(t&: rhs_columns));
4199 auto __res__ = builder.create(state: __state__);
4200 assert((::llvm::isa<MatrixMultiplyOp>(__res__)) && "builder didn't return the right type");
4201 return ::llvm::cast<MatrixMultiplyOp>(Val: __res__);
4202}
4203
4204MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns) {
4205 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), lhs: std::forward<decltype(lhs)>(t&: lhs), rhs: std::forward<decltype(rhs)>(t&: rhs), lhs_rows: std::forward<decltype(lhs_rows)>(t&: lhs_rows), lhs_columns: std::forward<decltype(lhs_columns)>(t&: lhs_columns), rhs_columns: std::forward<decltype(rhs_columns)>(t&: rhs_columns));
4206}
4207
4208void MatrixMultiplyOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns) {
4209 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4210 odsState.addOperands(newOperands: lhs);
4211 odsState.addOperands(newOperands: rhs);
4212 odsProperties.lhs_rows = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: lhs_rows);
4213 odsProperties.lhs_columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: lhs_columns);
4214 odsProperties.rhs_columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: rhs_columns);
4215 odsState.addTypes(newTypes: res);
4216}
4217
4218MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns) {
4219 ::mlir::OperationState __state__(location, getOperationName());
4220 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), lhs: std::forward<decltype(lhs)>(t&: lhs), rhs: std::forward<decltype(rhs)>(t&: rhs), lhs_rows: std::forward<decltype(lhs_rows)>(t&: lhs_rows), lhs_columns: std::forward<decltype(lhs_columns)>(t&: lhs_columns), rhs_columns: std::forward<decltype(rhs_columns)>(t&: rhs_columns));
4221 auto __res__ = builder.create(state: __state__);
4222 assert((::llvm::isa<MatrixMultiplyOp>(__res__)) && "builder didn't return the right type");
4223 return ::llvm::cast<MatrixMultiplyOp>(Val: __res__);
4224}
4225
4226MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns) {
4227 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), lhs: std::forward<decltype(lhs)>(t&: lhs), rhs: std::forward<decltype(rhs)>(t&: rhs), lhs_rows: std::forward<decltype(lhs_rows)>(t&: lhs_rows), lhs_columns: std::forward<decltype(lhs_columns)>(t&: lhs_columns), rhs_columns: std::forward<decltype(rhs_columns)>(t&: rhs_columns));
4228}
4229
4230void MatrixMultiplyOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns) {
4231 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4232 odsState.addOperands(newOperands: lhs);
4233 odsState.addOperands(newOperands: rhs);
4234 odsProperties.lhs_rows = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: lhs_rows);
4235 odsProperties.lhs_columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: lhs_columns);
4236 odsProperties.rhs_columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: rhs_columns);
4237 assert(resultTypes.size() == 1u && "mismatched number of results");
4238 odsState.addTypes(newTypes&: resultTypes);
4239}
4240
4241MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns) {
4242 ::mlir::OperationState __state__(location, getOperationName());
4243 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), lhs: std::forward<decltype(lhs)>(t&: lhs), rhs: std::forward<decltype(rhs)>(t&: rhs), lhs_rows: std::forward<decltype(lhs_rows)>(t&: lhs_rows), lhs_columns: std::forward<decltype(lhs_columns)>(t&: lhs_columns), rhs_columns: std::forward<decltype(rhs_columns)>(t&: rhs_columns));
4244 auto __res__ = builder.create(state: __state__);
4245 assert((::llvm::isa<MatrixMultiplyOp>(__res__)) && "builder didn't return the right type");
4246 return ::llvm::cast<MatrixMultiplyOp>(Val: __res__);
4247}
4248
4249MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns) {
4250 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), lhs: std::forward<decltype(lhs)>(t&: lhs), rhs: std::forward<decltype(rhs)>(t&: rhs), lhs_rows: std::forward<decltype(lhs_rows)>(t&: lhs_rows), lhs_columns: std::forward<decltype(lhs_columns)>(t&: lhs_columns), rhs_columns: std::forward<decltype(rhs_columns)>(t&: rhs_columns));
4251}
4252
4253void MatrixMultiplyOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4254 assert(operands.size() == 2u && "mismatched number of parameters");
4255 odsState.addOperands(newOperands: operands);
4256 buildPropertiesAndDiscardableAttributes(odsState, attributes);
4257 assert(resultTypes.size() == 1u && "mismatched number of return types");
4258 odsState.addTypes(newTypes&: resultTypes);
4259}
4260
4261MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4262LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4263
4264 ::mlir::OperationState __state__(location, getOperationName());
4265 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));
4266 auto __res__ = builder.create(state: __state__);
4267 assert((::llvm::isa<MatrixMultiplyOp>(__res__)) && "builder didn't return the right type");
4268 return ::llvm::cast<MatrixMultiplyOp>(Val: __res__);
4269LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4270}
4271
4272MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4273LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4274
4275 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));
4276LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4277}
4278
4279void MatrixMultiplyOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4280 assert(operands.size() == 2u && "mismatched number of parameters");
4281 odsState.addOperands(newOperands: operands);
4282 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
4283 odsState.addAttributes(newAttributes: discardableAttributes);
4284 assert(resultTypes.size() == 1u && "mismatched number of return types");
4285 odsState.addTypes(newTypes&: resultTypes);
4286}
4287
4288MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4289 ::mlir::OperationState __state__(location, getOperationName());
4290 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));
4291 auto __res__ = builder.create(state: __state__);
4292 assert((::llvm::isa<MatrixMultiplyOp>(__res__)) && "builder didn't return the right type");
4293 return ::llvm::cast<MatrixMultiplyOp>(Val: __res__);
4294}
4295
4296MatrixMultiplyOp MatrixMultiplyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4297 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));
4298}
4299
4300::llvm::LogicalResult MatrixMultiplyOp::verifyInvariantsImpl() {
4301 auto tblgen_lhs_columns = getProperties().lhs_columns; (void)tblgen_lhs_columns;
4302 if (!tblgen_lhs_columns) return emitOpError(message: "requires attribute 'lhs_columns'");
4303 auto tblgen_lhs_rows = getProperties().lhs_rows; (void)tblgen_lhs_rows;
4304 if (!tblgen_lhs_rows) return emitOpError(message: "requires attribute 'lhs_rows'");
4305 auto tblgen_rhs_columns = getProperties().rhs_columns; (void)tblgen_rhs_columns;
4306 if (!tblgen_rhs_columns) return emitOpError(message: "requires attribute 'rhs_columns'");
4307
4308 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_lhs_rows, attrName: "lhs_rows")))
4309 return ::mlir::failure();
4310
4311 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_lhs_columns, attrName: "lhs_columns")))
4312 return ::mlir::failure();
4313
4314 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_rhs_columns, attrName: "rhs_columns")))
4315 return ::mlir::failure();
4316 {
4317 unsigned index = 0; (void)index;
4318 auto valueGroup0 = getODSOperands(index: 0);
4319
4320 for (auto v : valueGroup0) {
4321 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4322 return ::mlir::failure();
4323 }
4324 auto valueGroup1 = getODSOperands(index: 1);
4325
4326 for (auto v : valueGroup1) {
4327 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4328 return ::mlir::failure();
4329 }
4330 }
4331 {
4332 unsigned index = 0; (void)index;
4333 auto valueGroup0 = getODSResults(index: 0);
4334
4335 for (auto v : valueGroup0) {
4336 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
4337 return ::mlir::failure();
4338 }
4339 }
4340 return ::mlir::success();
4341}
4342
4343::llvm::LogicalResult MatrixMultiplyOp::verifyInvariants() {
4344 return verifyInvariantsImpl();
4345}
4346
4347::mlir::ParseResult MatrixMultiplyOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4348 ::mlir::OpAsmParser::UnresolvedOperand lhsRawOperand{};
4349 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> lhsOperands(&lhsRawOperand, 1); ::llvm::SMLoc lhsOperandsLoc;
4350 (void)lhsOperandsLoc;
4351 ::mlir::OpAsmParser::UnresolvedOperand rhsRawOperand{};
4352 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> rhsOperands(&rhsRawOperand, 1); ::llvm::SMLoc rhsOperandsLoc;
4353 (void)rhsOperandsLoc;
4354 ::mlir::IntegerAttr lhs_rowsAttr;
4355 ::mlir::IntegerAttr lhs_columnsAttr;
4356 ::mlir::IntegerAttr rhs_columnsAttr;
4357 ::mlir::Type lhsRawType{};
4358 ::llvm::ArrayRef<::mlir::Type> lhsTypes(&lhsRawType, 1);
4359 ::mlir::Type rhsRawType{};
4360 ::llvm::ArrayRef<::mlir::Type> rhsTypes(&rhsRawType, 1);
4361 ::mlir::Type resRawType{};
4362 ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
4363
4364 lhsOperandsLoc = parser.getCurrentLocation();
4365 if (parser.parseOperand(result&: lhsRawOperand))
4366 return ::mlir::failure();
4367 if (parser.parseComma())
4368 return ::mlir::failure();
4369
4370 rhsOperandsLoc = parser.getCurrentLocation();
4371 if (parser.parseOperand(result&: rhsRawOperand))
4372 return ::mlir::failure();
4373 if (parser.parseComma())
4374 return ::mlir::failure();
4375 if (parser.parseKeyword(keyword: "lhs_rows"))
4376 return ::mlir::failure();
4377 if (parser.parseEqual())
4378 return ::mlir::failure();
4379
4380 if (parser.parseCustomAttributeWithFallback(result&: lhs_rowsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
4381 return ::mlir::failure();
4382 }
4383 if (lhs_rowsAttr) result.getOrAddProperties<MatrixMultiplyOp::Properties>().lhs_rows = lhs_rowsAttr;
4384 if (parser.parseComma())
4385 return ::mlir::failure();
4386 if (parser.parseKeyword(keyword: "lhs_columns"))
4387 return ::mlir::failure();
4388 if (parser.parseEqual())
4389 return ::mlir::failure();
4390
4391 if (parser.parseCustomAttributeWithFallback(result&: lhs_columnsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
4392 return ::mlir::failure();
4393 }
4394 if (lhs_columnsAttr) result.getOrAddProperties<MatrixMultiplyOp::Properties>().lhs_columns = lhs_columnsAttr;
4395 if (parser.parseComma())
4396 return ::mlir::failure();
4397 if (parser.parseKeyword(keyword: "rhs_columns"))
4398 return ::mlir::failure();
4399 if (parser.parseEqual())
4400 return ::mlir::failure();
4401
4402 if (parser.parseCustomAttributeWithFallback(result&: rhs_columnsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
4403 return ::mlir::failure();
4404 }
4405 if (rhs_columnsAttr) result.getOrAddProperties<MatrixMultiplyOp::Properties>().rhs_columns = rhs_columnsAttr;
4406 {
4407 auto loc = parser.getCurrentLocation();(void)loc;
4408 if (parser.parseOptionalAttrDict(result&: result.attributes))
4409 return ::mlir::failure();
4410 if (result.attributes.get(name: "lhs_rows"))
4411 return parser.emitError(loc, message: "inherent attribute 'lhs_rows' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
4412 if (result.attributes.get(name: "lhs_columns"))
4413 return parser.emitError(loc, message: "inherent attribute 'lhs_columns' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
4414 if (result.attributes.get(name: "rhs_columns"))
4415 return parser.emitError(loc, message: "inherent attribute 'rhs_columns' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
4416 }
4417 if (parser.parseColon())
4418 return ::mlir::failure();
4419 if (parser.parseLParen())
4420 return ::mlir::failure();
4421
4422 {
4423 ::mlir::VectorType type;
4424 if (parser.parseCustomTypeWithFallback(result&: type))
4425 return ::mlir::failure();
4426 lhsRawType = type;
4427 }
4428 if (parser.parseComma())
4429 return ::mlir::failure();
4430
4431 {
4432 ::mlir::VectorType type;
4433 if (parser.parseCustomTypeWithFallback(result&: type))
4434 return ::mlir::failure();
4435 rhsRawType = type;
4436 }
4437 if (parser.parseRParen())
4438 return ::mlir::failure();
4439 if (parser.parseArrow())
4440 return ::mlir::failure();
4441
4442 {
4443 ::mlir::VectorType type;
4444 if (parser.parseCustomTypeWithFallback(result&: type))
4445 return ::mlir::failure();
4446 resRawType = type;
4447 }
4448 result.addTypes(newTypes: resTypes);
4449 // coverity[ARRAY_VS_SINGLETON]
4450 if (parser.resolveOperands(operands&: lhsOperands, types&: lhsTypes, loc: lhsOperandsLoc, result&: result.operands))
4451 return ::mlir::failure();
4452 // coverity[ARRAY_VS_SINGLETON]
4453 if (parser.resolveOperands(operands&: rhsOperands, types&: rhsTypes, loc: rhsOperandsLoc, result&: result.operands))
4454 return ::mlir::failure();
4455 return ::mlir::success();
4456}
4457
4458LLVM_ATTRIBUTE_MINSIZE void MatrixMultiplyOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4459 _odsPrinter << ' ';
4460 _odsPrinter << getLhs();
4461 _odsPrinter << ",";
4462 _odsPrinter << ' ';
4463 _odsPrinter << getRhs();
4464 _odsPrinter << ",";
4465 _odsPrinter << " lhs_rows";
4466 _odsPrinter << " =";
4467 _odsPrinter << ' ';
4468 _odsPrinter.printAttributeWithoutType(attr: getLhsRowsAttr());
4469 _odsPrinter << ",";
4470 _odsPrinter << " lhs_columns";
4471 _odsPrinter << " =";
4472 _odsPrinter << ' ';
4473 _odsPrinter.printAttributeWithoutType(attr: getLhsColumnsAttr());
4474 _odsPrinter << ",";
4475 _odsPrinter << " rhs_columns";
4476 _odsPrinter << " =";
4477 _odsPrinter << ' ';
4478 _odsPrinter.printAttributeWithoutType(attr: getRhsColumnsAttr());
4479 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
4480 _odsPrinter << " :";
4481 _odsPrinter << " (";
4482 {
4483 auto type = getLhs().getType();
4484 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
4485 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
4486 else
4487 _odsPrinter << type;
4488 }
4489 _odsPrinter << ",";
4490 _odsPrinter << ' ';
4491 {
4492 auto type = getRhs().getType();
4493 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
4494 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
4495 else
4496 _odsPrinter << type;
4497 }
4498 _odsPrinter << ")";
4499 _odsPrinter << " ->";
4500 _odsPrinter << ' ';
4501 {
4502 auto type = getRes().getType();
4503 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
4504 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
4505 else
4506 _odsPrinter << type;
4507 }
4508}
4509
4510void MatrixMultiplyOp::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4511 Properties &properties = odsState.getOrAddProperties<Properties>();
4512 populateDefaultProperties(opName: odsState.name, properties);
4513 const ::llvm::StringRef inherentNames[] = {"lhs_rows", "lhs_columns", "rhs_columns"};
4514 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
4515 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
4516 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
4517 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
4518 });
4519}
4520
4521
4522} // namespace mlir::LLVM
4523MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::MatrixMultiplyOp)
4524MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MatrixMultiplyOpGenericAdaptorBase::Properties)
4525
4526namespace mlir::LLVM {
4527
4528
4529//===----------------------------------------------------------------------===//
4530// ::mlir::LLVM::MatrixTransposeOp definitions
4531//===----------------------------------------------------------------------===//
4532
4533namespace detail {
4534
4535MatrixTransposeOpGenericAdaptorBase::MatrixTransposeOpGenericAdaptorBase(MatrixTransposeOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
4536
4537uint32_t MatrixTransposeOpGenericAdaptorBase::getRows() {
4538 auto attr = getRowsAttr();
4539 return attr.getValue().getZExtValue();
4540}
4541
4542uint32_t MatrixTransposeOpGenericAdaptorBase::getColumns() {
4543 auto attr = getColumnsAttr();
4544 return attr.getValue().getZExtValue();
4545}
4546
4547
4548} // namespace detail
4549MatrixTransposeOpAdaptor::MatrixTransposeOpAdaptor(MatrixTransposeOp op) : MatrixTransposeOpGenericAdaptor(op->getOperands(), op) {}
4550
4551::llvm::LogicalResult MatrixTransposeOpAdaptor::verify(::mlir::Location loc) {
4552 auto tblgen_columns = getProperties().columns; (void)tblgen_columns;
4553 if (!tblgen_columns) return emitError(loc, message: "'llvm.intr.matrix.transpose' op requires attribute 'columns'");
4554 auto tblgen_rows = getProperties().rows; (void)tblgen_rows;
4555 if (!tblgen_rows) return emitError(loc, message: "'llvm.intr.matrix.transpose' op requires attribute 'rows'");
4556
4557 if (tblgen_rows && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_rows))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_rows).getType().isSignlessInteger(width: 32)))))
4558 return emitError(loc, message: "'llvm.intr.matrix.transpose' op attribute 'rows' failed to satisfy constraint: 32-bit signless integer attribute");
4559
4560 if (tblgen_columns && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_columns))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_columns).getType().isSignlessInteger(width: 32)))))
4561 return emitError(loc, message: "'llvm.intr.matrix.transpose' op attribute 'columns' failed to satisfy constraint: 32-bit signless integer attribute");
4562 return ::mlir::success();
4563}
4564
4565::llvm::LogicalResult MatrixTransposeOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4566 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
4567 if (!dict) {
4568 emitError() << "expected DictionaryAttr to set properties";
4569 return ::mlir::failure();
4570 }
4571
4572 {
4573 auto attr = dict.get(name: "columns");
4574 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
4575 storage&: prop.columns, attr, name: "columns", emitError)))
4576 return ::mlir::failure();
4577 }
4578
4579 {
4580 auto attr = dict.get(name: "rows");
4581 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
4582 storage&: prop.rows, attr, name: "rows", emitError)))
4583 return ::mlir::failure();
4584 }
4585 return ::mlir::success();
4586}
4587
4588::mlir::Attribute MatrixTransposeOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
4589 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
4590 ::mlir::Builder odsBuilder{ctx};
4591 ::mlir::detail::appendAttributeProperty(attrs, name: "columns", attr: prop.columns);
4592 ::mlir::detail::appendAttributeProperty(attrs, name: "rows", attr: prop.rows);
4593
4594 if (!attrs.empty())
4595 return odsBuilder.getDictionaryAttr(value: attrs);
4596 return {};
4597}
4598
4599llvm::hash_code MatrixTransposeOp::computePropertiesHash(const Properties &prop) {
4600 using llvm::hash_value;
4601 return llvm::hash_combine(
4602 args: llvm::hash_value(ptr: prop.columns.getAsOpaquePointer()),
4603 args: llvm::hash_value(ptr: prop.rows.getAsOpaquePointer()));
4604}
4605
4606std::optional<mlir::Attribute> MatrixTransposeOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
4607 if (name == "columns")
4608 return prop.columns;
4609
4610 if (name == "rows")
4611 return prop.rows;
4612 return std::nullopt;
4613}
4614
4615void MatrixTransposeOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
4616 if (name == "columns") {
4617 prop.columns = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.columns)>>(Val&: value);
4618 return;
4619 }
4620
4621 if (name == "rows") {
4622 prop.rows = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.rows)>>(Val&: value);
4623 return;
4624 }
4625}
4626
4627void MatrixTransposeOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
4628 if (prop.columns) {
4629 ::mlir::Attribute value = prop.columns;
4630 ::mlir::Attribute originalValue = value;
4631 visitor("columns", value);
4632 if (value != originalValue)
4633 setInherentAttr(prop, name: "columns", value);
4634 }
4635
4636 if (prop.rows) {
4637 ::mlir::Attribute value = prop.rows;
4638 ::mlir::Attribute originalValue = value;
4639 visitor("rows", value);
4640 if (value != originalValue)
4641 setInherentAttr(prop, name: "rows", value);
4642 }
4643}
4644
4645::llvm::LogicalResult MatrixTransposeOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
4646 {
4647 ::mlir::Attribute attr = attrs.get(name: getColumnsAttrName(name: opName));
4648 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "columns", emitError)))
4649 return ::mlir::failure();
4650 }
4651
4652 {
4653 ::mlir::Attribute attr = attrs.get(name: getRowsAttrName(name: opName));
4654 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(attr, attrName: "rows", emitError)))
4655 return ::mlir::failure();
4656 }
4657 return ::mlir::success();
4658}
4659
4660::llvm::LogicalResult MatrixTransposeOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
4661 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
4662 if (::mlir::failed(Result: reader.readAttribute(result&: prop.columns)))
4663 return ::mlir::failure();
4664
4665 if (::mlir::failed(Result: reader.readAttribute(result&: prop.rows)))
4666 return ::mlir::failure();
4667 return ::mlir::success();
4668}
4669
4670void MatrixTransposeOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
4671 auto &prop = getProperties(); (void)prop;
4672 writer.writeAttribute(attr: prop.columns);
4673 writer.writeAttribute(attr: prop.rows);
4674}
4675
4676uint32_t MatrixTransposeOp::getRows() {
4677 auto attr = getRowsAttr();
4678 return attr.getValue().getZExtValue();
4679}
4680
4681uint32_t MatrixTransposeOp::getColumns() {
4682 auto attr = getColumnsAttr();
4683 return attr.getValue().getZExtValue();
4684}
4685
4686void MatrixTransposeOp::setRows(uint32_t attrValue) {
4687 getProperties().rows = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
4688}
4689
4690void MatrixTransposeOp::setColumns(uint32_t attrValue) {
4691 getProperties().columns = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 32), value: attrValue);
4692}
4693
4694void MatrixTransposeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
4695 if (resultType) odsState.addTypes(newTypes: resultType);
4696 odsState.addOperands(newOperands: operands);
4697 for (auto namedAttr : attributes)
4698 odsState.addAttribute(name: namedAttr.getName(), attr: namedAttr.getValue());
4699
4700}
4701
4702MatrixTransposeOp MatrixTransposeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
4703 ::mlir::OperationState __state__(location, getOperationName());
4704 build(odsBuilder&: builder, odsState&: __state__, resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4705 auto __res__ = builder.create(state: __state__);
4706 assert((::llvm::isa<MatrixTransposeOp>(__res__)) && "builder didn't return the right type");
4707 return ::llvm::cast<MatrixTransposeOp>(Val: __res__);
4708}
4709
4710MatrixTransposeOp MatrixTransposeOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
4711 return create(builder, location: builder.getLoc(), resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
4712}
4713
4714void MatrixTransposeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
4715 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4716 odsState.addOperands(newOperands: matrix);
4717 odsProperties.rows = rows;
4718 odsProperties.columns = columns;
4719 odsState.addTypes(newTypes: res);
4720}
4721
4722MatrixTransposeOp MatrixTransposeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
4723 ::mlir::OperationState __state__(location, getOperationName());
4724 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), matrix: std::forward<decltype(matrix)>(t&: matrix), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
4725 auto __res__ = builder.create(state: __state__);
4726 assert((::llvm::isa<MatrixTransposeOp>(__res__)) && "builder didn't return the right type");
4727 return ::llvm::cast<MatrixTransposeOp>(Val: __res__);
4728}
4729
4730MatrixTransposeOp MatrixTransposeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
4731 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), matrix: std::forward<decltype(matrix)>(t&: matrix), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
4732}
4733
4734void MatrixTransposeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
4735 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4736 odsState.addOperands(newOperands: matrix);
4737 odsProperties.rows = rows;
4738 odsProperties.columns = columns;
4739 assert(resultTypes.size() == 1u && "mismatched number of results");
4740 odsState.addTypes(newTypes&: resultTypes);
4741}
4742
4743MatrixTransposeOp MatrixTransposeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
4744 ::mlir::OperationState __state__(location, getOperationName());
4745 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), matrix: std::forward<decltype(matrix)>(t&: matrix), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
4746 auto __res__ = builder.create(state: __state__);
4747 assert((::llvm::isa<MatrixTransposeOp>(__res__)) && "builder didn't return the right type");
4748 return ::llvm::cast<MatrixTransposeOp>(Val: __res__);
4749}
4750
4751MatrixTransposeOp MatrixTransposeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns) {
4752 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), matrix: std::forward<decltype(matrix)>(t&: matrix), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
4753}
4754
4755void MatrixTransposeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value matrix, uint32_t rows, uint32_t columns) {
4756 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4757 odsState.addOperands(newOperands: matrix);
4758 odsProperties.rows = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: rows);
4759 odsProperties.columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: columns);
4760 odsState.addTypes(newTypes: res);
4761}
4762
4763MatrixTransposeOp MatrixTransposeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value matrix, uint32_t rows, uint32_t columns) {
4764 ::mlir::OperationState __state__(location, getOperationName());
4765 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), matrix: std::forward<decltype(matrix)>(t&: matrix), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
4766 auto __res__ = builder.create(state: __state__);
4767 assert((::llvm::isa<MatrixTransposeOp>(__res__)) && "builder didn't return the right type");
4768 return ::llvm::cast<MatrixTransposeOp>(Val: __res__);
4769}
4770
4771MatrixTransposeOp MatrixTransposeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value matrix, uint32_t rows, uint32_t columns) {
4772 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), matrix: std::forward<decltype(matrix)>(t&: matrix), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
4773}
4774
4775void MatrixTransposeOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, uint32_t rows, uint32_t columns) {
4776 auto &odsProperties = odsState.getOrAddProperties<Properties>();
4777 odsState.addOperands(newOperands: matrix);
4778 odsProperties.rows = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: rows);
4779 odsProperties.columns = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 32), value: columns);
4780 assert(resultTypes.size() == 1u && "mismatched number of results");
4781 odsState.addTypes(newTypes&: resultTypes);
4782}
4783
4784MatrixTransposeOp MatrixTransposeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, uint32_t rows, uint32_t columns) {
4785 ::mlir::OperationState __state__(location, getOperationName());
4786 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), matrix: std::forward<decltype(matrix)>(t&: matrix), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
4787 auto __res__ = builder.create(state: __state__);
4788 assert((::llvm::isa<MatrixTransposeOp>(__res__)) && "builder didn't return the right type");
4789 return ::llvm::cast<MatrixTransposeOp>(Val: __res__);
4790}
4791
4792MatrixTransposeOp MatrixTransposeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, uint32_t rows, uint32_t columns) {
4793 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), matrix: std::forward<decltype(matrix)>(t&: matrix), rows: std::forward<decltype(rows)>(t&: rows), columns: std::forward<decltype(columns)>(t&: columns));
4794}
4795
4796void MatrixTransposeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4797 assert(operands.size() == 1u && "mismatched number of parameters");
4798 odsState.addOperands(newOperands: operands);
4799 buildPropertiesAndDiscardableAttributes(odsState, attributes);
4800 assert(resultTypes.size() == 1u && "mismatched number of return types");
4801 odsState.addTypes(newTypes&: resultTypes);
4802}
4803
4804MatrixTransposeOp MatrixTransposeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4805LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4806
4807 ::mlir::OperationState __state__(location, getOperationName());
4808 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));
4809 auto __res__ = builder.create(state: __state__);
4810 assert((::llvm::isa<MatrixTransposeOp>(__res__)) && "builder didn't return the right type");
4811 return ::llvm::cast<MatrixTransposeOp>(Val: __res__);
4812LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4813}
4814
4815MatrixTransposeOp MatrixTransposeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4816LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
4817
4818 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));
4819LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
4820}
4821
4822void MatrixTransposeOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4823 assert(operands.size() == 1u && "mismatched number of parameters");
4824 odsState.addOperands(newOperands: operands);
4825 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
4826 odsState.addAttributes(newAttributes: discardableAttributes);
4827 assert(resultTypes.size() == 1u && "mismatched number of return types");
4828 odsState.addTypes(newTypes&: resultTypes);
4829}
4830
4831MatrixTransposeOp MatrixTransposeOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4832 ::mlir::OperationState __state__(location, getOperationName());
4833 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));
4834 auto __res__ = builder.create(state: __state__);
4835 assert((::llvm::isa<MatrixTransposeOp>(__res__)) && "builder didn't return the right type");
4836 return ::llvm::cast<MatrixTransposeOp>(Val: __res__);
4837}
4838
4839MatrixTransposeOp MatrixTransposeOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
4840 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));
4841}
4842
4843::llvm::LogicalResult MatrixTransposeOp::verifyInvariantsImpl() {
4844 auto tblgen_columns = getProperties().columns; (void)tblgen_columns;
4845 if (!tblgen_columns) return emitOpError(message: "requires attribute 'columns'");
4846 auto tblgen_rows = getProperties().rows; (void)tblgen_rows;
4847 if (!tblgen_rows) return emitOpError(message: "requires attribute 'rows'");
4848
4849 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_rows, attrName: "rows")))
4850 return ::mlir::failure();
4851
4852 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, attr: tblgen_columns, attrName: "columns")))
4853 return ::mlir::failure();
4854 {
4855 unsigned index = 0; (void)index;
4856 auto valueGroup0 = getODSOperands(index: 0);
4857
4858 for (auto v : valueGroup0) {
4859 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
4860 return ::mlir::failure();
4861 }
4862 }
4863 {
4864 unsigned index = 0; (void)index;
4865 auto valueGroup0 = getODSResults(index: 0);
4866
4867 for (auto v : valueGroup0) {
4868 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
4869 return ::mlir::failure();
4870 }
4871 }
4872 return ::mlir::success();
4873}
4874
4875::llvm::LogicalResult MatrixTransposeOp::verifyInvariants() {
4876 return verifyInvariantsImpl();
4877}
4878
4879::mlir::ParseResult MatrixTransposeOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
4880 ::mlir::OpAsmParser::UnresolvedOperand matrixRawOperand{};
4881 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> matrixOperands(&matrixRawOperand, 1); ::llvm::SMLoc matrixOperandsLoc;
4882 (void)matrixOperandsLoc;
4883 ::mlir::IntegerAttr rowsAttr;
4884 ::mlir::IntegerAttr columnsAttr;
4885 ::mlir::Type matrixRawType{};
4886 ::llvm::ArrayRef<::mlir::Type> matrixTypes(&matrixRawType, 1);
4887 ::mlir::Type resRawType{};
4888 ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
4889
4890 matrixOperandsLoc = parser.getCurrentLocation();
4891 if (parser.parseOperand(result&: matrixRawOperand))
4892 return ::mlir::failure();
4893 if (parser.parseComma())
4894 return ::mlir::failure();
4895 if (parser.parseKeyword(keyword: "rows"))
4896 return ::mlir::failure();
4897 if (parser.parseEqual())
4898 return ::mlir::failure();
4899
4900 if (parser.parseCustomAttributeWithFallback(result&: rowsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
4901 return ::mlir::failure();
4902 }
4903 if (rowsAttr) result.getOrAddProperties<MatrixTransposeOp::Properties>().rows = rowsAttr;
4904 if (parser.parseComma())
4905 return ::mlir::failure();
4906 if (parser.parseKeyword(keyword: "columns"))
4907 return ::mlir::failure();
4908 if (parser.parseEqual())
4909 return ::mlir::failure();
4910
4911 if (parser.parseCustomAttributeWithFallback(result&: columnsAttr, type: parser.getBuilder().getIntegerType(width: 32))) {
4912 return ::mlir::failure();
4913 }
4914 if (columnsAttr) result.getOrAddProperties<MatrixTransposeOp::Properties>().columns = columnsAttr;
4915 {
4916 auto loc = parser.getCurrentLocation();(void)loc;
4917 if (parser.parseOptionalAttrDict(result&: result.attributes))
4918 return ::mlir::failure();
4919 if (result.attributes.get(name: "rows"))
4920 return parser.emitError(loc, message: "inherent attribute 'rows' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
4921 if (result.attributes.get(name: "columns"))
4922 return parser.emitError(loc, message: "inherent attribute 'columns' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
4923 }
4924 if (parser.parseColon())
4925 return ::mlir::failure();
4926
4927 {
4928 ::mlir::VectorType type;
4929 if (parser.parseCustomTypeWithFallback(result&: type))
4930 return ::mlir::failure();
4931 matrixRawType = type;
4932 }
4933 if (parser.parseKeyword(keyword: "into"))
4934 return ::mlir::failure();
4935
4936 {
4937 ::mlir::VectorType type;
4938 if (parser.parseCustomTypeWithFallback(result&: type))
4939 return ::mlir::failure();
4940 resRawType = type;
4941 }
4942 result.addTypes(newTypes: resTypes);
4943 // coverity[ARRAY_VS_SINGLETON]
4944 if (parser.resolveOperands(operands&: matrixOperands, types&: matrixTypes, loc: matrixOperandsLoc, result&: result.operands))
4945 return ::mlir::failure();
4946 return ::mlir::success();
4947}
4948
4949LLVM_ATTRIBUTE_MINSIZE void MatrixTransposeOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
4950 _odsPrinter << ' ';
4951 _odsPrinter << getMatrix();
4952 _odsPrinter << ",";
4953 _odsPrinter << " rows";
4954 _odsPrinter << " =";
4955 _odsPrinter << ' ';
4956 _odsPrinter.printAttributeWithoutType(attr: getRowsAttr());
4957 _odsPrinter << ",";
4958 _odsPrinter << " columns";
4959 _odsPrinter << " =";
4960 _odsPrinter << ' ';
4961 _odsPrinter.printAttributeWithoutType(attr: getColumnsAttr());
4962 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
4963 _odsPrinter << " :";
4964 _odsPrinter << ' ';
4965 {
4966 auto type = getMatrix().getType();
4967 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
4968 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
4969 else
4970 _odsPrinter << type;
4971 }
4972 _odsPrinter << " into";
4973 _odsPrinter << ' ';
4974 {
4975 auto type = getRes().getType();
4976 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
4977 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
4978 else
4979 _odsPrinter << type;
4980 }
4981}
4982
4983void MatrixTransposeOp::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
4984 Properties &properties = odsState.getOrAddProperties<Properties>();
4985 populateDefaultProperties(opName: odsState.name, properties);
4986 const ::llvm::StringRef inherentNames[] = {"rows", "columns"};
4987 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
4988 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
4989 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
4990 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
4991 });
4992}
4993
4994
4995} // namespace mlir::LLVM
4996MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::MatrixTransposeOp)
4997MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MatrixTransposeOpGenericAdaptorBase::Properties)
4998
4999namespace mlir::LLVM {
5000
5001
5002//===----------------------------------------------------------------------===//
5003// ::mlir::LLVM::StepVectorOp definitions
5004//===----------------------------------------------------------------------===//
5005
5006namespace detail {
5007
5008StepVectorOpGenericAdaptorBase::StepVectorOpGenericAdaptorBase(StepVectorOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
5009
5010
5011} // namespace detail
5012StepVectorOpAdaptor::StepVectorOpAdaptor(StepVectorOp op) : StepVectorOpGenericAdaptor(op->getOperands(), op) {}
5013
5014::llvm::LogicalResult StepVectorOpAdaptor::verify(::mlir::Location loc) {
5015 return ::mlir::success();
5016}
5017
5018::llvm::LogicalResult StepVectorOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5019 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5020 if (!dict) {
5021 emitError() << "expected DictionaryAttr to set properties";
5022 return ::mlir::failure();
5023 }
5024 return ::mlir::success();
5025}
5026
5027::mlir::Attribute StepVectorOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
5028 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5029 ::mlir::Builder odsBuilder{ctx};
5030
5031 if (!attrs.empty())
5032 return odsBuilder.getDictionaryAttr(value: attrs);
5033 return {};
5034}
5035
5036llvm::hash_code StepVectorOp::computePropertiesHash(const Properties &prop) {
5037 using llvm::hash_value;
5038 return llvm::hash_combine();
5039}
5040
5041std::optional<mlir::Attribute> StepVectorOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
5042 return std::nullopt;
5043}
5044
5045void StepVectorOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
5046}
5047
5048void StepVectorOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
5049}
5050
5051::llvm::LogicalResult StepVectorOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5052 return ::mlir::success();
5053}
5054
5055void StepVectorOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res) {
5056 odsState.addTypes(newTypes: res);
5057}
5058
5059StepVectorOp StepVectorOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res) {
5060 ::mlir::OperationState __state__(location, getOperationName());
5061 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res));
5062 auto __res__ = builder.create(state: __state__);
5063 assert((::llvm::isa<StepVectorOp>(__res__)) && "builder didn't return the right type");
5064 return ::llvm::cast<StepVectorOp>(Val: __res__);
5065}
5066
5067StepVectorOp StepVectorOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res) {
5068 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res));
5069}
5070
5071void StepVectorOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
5072 assert(resultTypes.size() == 1u && "mismatched number of results");
5073 odsState.addTypes(newTypes&: resultTypes);
5074}
5075
5076StepVectorOp StepVectorOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
5077 ::mlir::OperationState __state__(location, getOperationName());
5078 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes));
5079 auto __res__ = builder.create(state: __state__);
5080 assert((::llvm::isa<StepVectorOp>(__res__)) && "builder didn't return the right type");
5081 return ::llvm::cast<StepVectorOp>(Val: __res__);
5082}
5083
5084StepVectorOp StepVectorOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
5085 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes));
5086}
5087
5088void StepVectorOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5089 assert(operands.size() == 0u && "mismatched number of parameters");
5090 odsState.addOperands(newOperands: operands);
5091 odsState.addAttributes(newAttributes: attributes);
5092 assert(resultTypes.size() == 1u && "mismatched number of return types");
5093 odsState.addTypes(newTypes&: resultTypes);
5094}
5095
5096StepVectorOp StepVectorOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5097 ::mlir::OperationState __state__(location, getOperationName());
5098 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));
5099 auto __res__ = builder.create(state: __state__);
5100 assert((::llvm::isa<StepVectorOp>(__res__)) && "builder didn't return the right type");
5101 return ::llvm::cast<StepVectorOp>(Val: __res__);
5102}
5103
5104StepVectorOp StepVectorOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5105 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));
5106}
5107
5108void StepVectorOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5109 assert(operands.size() == 0u && "mismatched number of parameters");
5110 odsState.addOperands(newOperands: operands);
5111 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
5112 odsState.addAttributes(newAttributes: discardableAttributes);
5113 assert(resultTypes.size() == 1u && "mismatched number of return types");
5114 odsState.addTypes(newTypes&: resultTypes);
5115}
5116
5117StepVectorOp StepVectorOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5118 ::mlir::OperationState __state__(location, getOperationName());
5119 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));
5120 auto __res__ = builder.create(state: __state__);
5121 assert((::llvm::isa<StepVectorOp>(__res__)) && "builder didn't return the right type");
5122 return ::llvm::cast<StepVectorOp>(Val: __res__);
5123}
5124
5125StepVectorOp StepVectorOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5126 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));
5127}
5128
5129::llvm::LogicalResult StepVectorOp::verifyInvariantsImpl() {
5130 {
5131 unsigned index = 0; (void)index;
5132 auto valueGroup0 = getODSResults(index: 0);
5133
5134 for (auto v : valueGroup0) {
5135 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
5136 return ::mlir::failure();
5137 }
5138 }
5139 return ::mlir::success();
5140}
5141
5142::llvm::LogicalResult StepVectorOp::verifyInvariants() {
5143 return verifyInvariantsImpl();
5144}
5145
5146::mlir::ParseResult StepVectorOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
5147 ::mlir::Type resRawType{};
5148 ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
5149 {
5150 auto loc = parser.getCurrentLocation();(void)loc;
5151 if (parser.parseOptionalAttrDict(result&: result.attributes))
5152 return ::mlir::failure();
5153 }
5154 if (parser.parseColon())
5155 return ::mlir::failure();
5156
5157 {
5158 ::mlir::VectorType type;
5159 if (parser.parseCustomTypeWithFallback(result&: type))
5160 return ::mlir::failure();
5161 resRawType = type;
5162 }
5163 result.addTypes(newTypes: resTypes);
5164 return ::mlir::success();
5165}
5166
5167LLVM_ATTRIBUTE_MINSIZE void StepVectorOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
5168 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
5169 _odsPrinter << " :";
5170 _odsPrinter << ' ';
5171 {
5172 auto type = getRes().getType();
5173 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
5174 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
5175 else
5176 _odsPrinter << type;
5177 }
5178}
5179
5180void StepVectorOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
5181}
5182
5183
5184} // namespace mlir::LLVM
5185MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::StepVectorOp)
5186
5187namespace mlir::LLVM {
5188
5189
5190//===----------------------------------------------------------------------===//
5191// ::mlir::LLVM::masked_compressstore definitions
5192//===----------------------------------------------------------------------===//
5193
5194namespace detail {
5195
5196masked_compressstoreGenericAdaptorBase::masked_compressstoreGenericAdaptorBase(masked_compressstore op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
5197
5198::std::optional< ::mlir::ArrayAttr > masked_compressstoreGenericAdaptorBase::getArgAttrs() {
5199 auto attr = getArgAttrsAttr();
5200 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5201}
5202
5203::std::optional< ::mlir::ArrayAttr > masked_compressstoreGenericAdaptorBase::getResAttrs() {
5204 auto attr = getResAttrsAttr();
5205 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5206}
5207
5208
5209} // namespace detail
5210masked_compressstoreAdaptor::masked_compressstoreAdaptor(masked_compressstore op) : masked_compressstoreGenericAdaptor(op->getOperands(), op) {}
5211
5212::llvm::LogicalResult masked_compressstoreAdaptor::verify(::mlir::Location loc) {
5213 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
5214 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
5215
5216 if (tblgen_arg_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_arg_attrs))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_arg_attrs), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(Val: attr))); }))))
5217 return emitError(loc, message: "'llvm.intr.masked.compressstore' op attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
5218
5219 if (tblgen_res_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_res_attrs))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_res_attrs), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(Val: attr))); }))))
5220 return emitError(loc, message: "'llvm.intr.masked.compressstore' op attribute 'res_attrs' failed to satisfy constraint: Array of dictionary attributes");
5221 return ::mlir::success();
5222}
5223
5224::llvm::LogicalResult masked_compressstore::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5225 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5226 if (!dict) {
5227 emitError() << "expected DictionaryAttr to set properties";
5228 return ::mlir::failure();
5229 }
5230
5231 {
5232 auto attr = dict.get(name: "arg_attrs");
5233 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
5234 storage&: prop.arg_attrs, attr, name: "arg_attrs", emitError)))
5235 return ::mlir::failure();
5236 }
5237
5238 {
5239 auto attr = dict.get(name: "res_attrs");
5240 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
5241 storage&: prop.res_attrs, attr, name: "res_attrs", emitError)))
5242 return ::mlir::failure();
5243 }
5244 return ::mlir::success();
5245}
5246
5247::mlir::Attribute masked_compressstore::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
5248 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5249 ::mlir::Builder odsBuilder{ctx};
5250 ::mlir::detail::appendAttributeProperty(attrs, name: "arg_attrs", attr: prop.arg_attrs);
5251 ::mlir::detail::appendAttributeProperty(attrs, name: "res_attrs", attr: prop.res_attrs);
5252
5253 if (!attrs.empty())
5254 return odsBuilder.getDictionaryAttr(value: attrs);
5255 return {};
5256}
5257
5258llvm::hash_code masked_compressstore::computePropertiesHash(const Properties &prop) {
5259 using llvm::hash_value;
5260 return llvm::hash_combine(
5261 args: llvm::hash_value(ptr: prop.arg_attrs.getAsOpaquePointer()),
5262 args: llvm::hash_value(ptr: prop.res_attrs.getAsOpaquePointer()));
5263}
5264
5265std::optional<mlir::Attribute> masked_compressstore::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
5266 if (name == "arg_attrs")
5267 return prop.arg_attrs;
5268
5269 if (name == "res_attrs")
5270 return prop.res_attrs;
5271 return std::nullopt;
5272}
5273
5274void masked_compressstore::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
5275 if (name == "arg_attrs") {
5276 prop.arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.arg_attrs)>>(Val&: value);
5277 return;
5278 }
5279
5280 if (name == "res_attrs") {
5281 prop.res_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.res_attrs)>>(Val&: value);
5282 return;
5283 }
5284}
5285
5286void masked_compressstore::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
5287 if (prop.arg_attrs) {
5288 ::mlir::Attribute value = prop.arg_attrs;
5289 ::mlir::Attribute originalValue = value;
5290 visitor("arg_attrs", value);
5291 if (value != originalValue)
5292 setInherentAttr(prop, name: "arg_attrs", value);
5293 }
5294
5295 if (prop.res_attrs) {
5296 ::mlir::Attribute value = prop.res_attrs;
5297 ::mlir::Attribute originalValue = value;
5298 visitor("res_attrs", value);
5299 if (value != originalValue)
5300 setInherentAttr(prop, name: "res_attrs", value);
5301 }
5302}
5303
5304::llvm::LogicalResult masked_compressstore::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5305 {
5306 ::mlir::Attribute attr = attrs.get(name: getArgAttrsAttrName(name: opName));
5307 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(attr, attrName: "arg_attrs", emitError)))
5308 return ::mlir::failure();
5309 }
5310
5311 {
5312 ::mlir::Attribute attr = attrs.get(name: getResAttrsAttrName(name: opName));
5313 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(attr, attrName: "res_attrs", emitError)))
5314 return ::mlir::failure();
5315 }
5316 return ::mlir::success();
5317}
5318
5319::llvm::LogicalResult masked_compressstore::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
5320 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
5321 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.arg_attrs)))
5322 return ::mlir::failure();
5323
5324 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.res_attrs)))
5325 return ::mlir::failure();
5326 return ::mlir::success();
5327}
5328
5329void masked_compressstore::writeProperties(::mlir::DialectBytecodeWriter &writer) {
5330 auto &prop = getProperties(); (void)prop;
5331
5332 writer.writeOptionalAttribute(attr: prop.arg_attrs);
5333
5334 writer.writeOptionalAttribute(attr: prop.res_attrs);
5335}
5336
5337::std::optional< ::mlir::ArrayAttr > masked_compressstore::getArgAttrs() {
5338 auto attr = getArgAttrsAttr();
5339 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5340}
5341
5342::std::optional< ::mlir::ArrayAttr > masked_compressstore::getResAttrs() {
5343 auto attr = getResAttrsAttr();
5344 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5345}
5346
5347masked_compressstore masked_compressstore::create(::mlir::OpBuilder &builder, ::mlir::Location location, Value value, Value ptr, Value mask, uint64_t align) {
5348 ::mlir::OperationState __state__(location, getOperationName());
5349 build(builder, state&: __state__, value: std::forward<decltype(value)>(t&: value), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), align: std::forward<decltype(align)>(t&: align));
5350 auto __res__ = builder.create(state: __state__);
5351 assert((::llvm::isa<masked_compressstore>(__res__)) && "builder didn't return the right type");
5352 return ::llvm::cast<masked_compressstore>(Val: __res__);
5353}
5354
5355masked_compressstore masked_compressstore::create(::mlir::ImplicitLocOpBuilder &builder, Value value, Value ptr, Value mask, uint64_t align) {
5356 return create(builder, location: builder.getLoc(), value: std::forward<decltype(value)>(t&: value), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), align: std::forward<decltype(align)>(t&: align));
5357}
5358
5359void masked_compressstore::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5360 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, value, ptr, mask, arg_attrs, res_attrs);
5361}
5362
5363masked_compressstore masked_compressstore::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5364 ::mlir::OperationState __state__(location, getOperationName());
5365 build(odsBuilder&: builder, odsState&: __state__, value: std::forward<decltype(value)>(t&: value), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), arg_attrs: std::forward<decltype(arg_attrs)>(t&: arg_attrs), res_attrs: std::forward<decltype(res_attrs)>(t&: res_attrs));
5366 auto __res__ = builder.create(state: __state__);
5367 assert((::llvm::isa<masked_compressstore>(__res__)) && "builder didn't return the right type");
5368 return ::llvm::cast<masked_compressstore>(Val: __res__);
5369}
5370
5371masked_compressstore masked_compressstore::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5372 return create(builder, location: builder.getLoc(), value: std::forward<decltype(value)>(t&: value), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), arg_attrs: std::forward<decltype(arg_attrs)>(t&: arg_attrs), res_attrs: std::forward<decltype(res_attrs)>(t&: res_attrs));
5373}
5374
5375void masked_compressstore::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5376 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5377 odsState.addOperands(newOperands: value);
5378 odsState.addOperands(newOperands: ptr);
5379 odsState.addOperands(newOperands: mask);
5380 if (arg_attrs) {
5381 odsProperties.arg_attrs = arg_attrs;
5382 }
5383 if (res_attrs) {
5384 odsProperties.res_attrs = res_attrs;
5385 }
5386 assert(resultTypes.size() == 0u && "mismatched number of results");
5387 odsState.addTypes(newTypes&: resultTypes);
5388}
5389
5390masked_compressstore masked_compressstore::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5391 ::mlir::OperationState __state__(location, getOperationName());
5392 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), value: std::forward<decltype(value)>(t&: value), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), arg_attrs: std::forward<decltype(arg_attrs)>(t&: arg_attrs), res_attrs: std::forward<decltype(res_attrs)>(t&: res_attrs));
5393 auto __res__ = builder.create(state: __state__);
5394 assert((::llvm::isa<masked_compressstore>(__res__)) && "builder didn't return the right type");
5395 return ::llvm::cast<masked_compressstore>(Val: __res__);
5396}
5397
5398masked_compressstore masked_compressstore::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5399 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), value: std::forward<decltype(value)>(t&: value), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), arg_attrs: std::forward<decltype(arg_attrs)>(t&: arg_attrs), res_attrs: std::forward<decltype(res_attrs)>(t&: res_attrs));
5400}
5401
5402void masked_compressstore::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5403 assert(operands.size() == 3u && "mismatched number of parameters");
5404 odsState.addOperands(newOperands: operands);
5405 buildPropertiesAndDiscardableAttributes(odsState, attributes);
5406 assert(resultTypes.size() == 0u && "mismatched number of return types");
5407 odsState.addTypes(newTypes&: resultTypes);
5408}
5409
5410masked_compressstore masked_compressstore::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5411LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5412
5413 ::mlir::OperationState __state__(location, getOperationName());
5414 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));
5415 auto __res__ = builder.create(state: __state__);
5416 assert((::llvm::isa<masked_compressstore>(__res__)) && "builder didn't return the right type");
5417 return ::llvm::cast<masked_compressstore>(Val: __res__);
5418LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5419}
5420
5421masked_compressstore masked_compressstore::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5422LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5423
5424 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));
5425LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5426}
5427
5428void masked_compressstore::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5429 assert(operands.size() == 3u && "mismatched number of parameters");
5430 odsState.addOperands(newOperands: operands);
5431 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
5432 odsState.addAttributes(newAttributes: discardableAttributes);
5433 assert(resultTypes.size() == 0u && "mismatched number of return types");
5434 odsState.addTypes(newTypes&: resultTypes);
5435}
5436
5437masked_compressstore masked_compressstore::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5438 ::mlir::OperationState __state__(location, getOperationName());
5439 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));
5440 auto __res__ = builder.create(state: __state__);
5441 assert((::llvm::isa<masked_compressstore>(__res__)) && "builder didn't return the right type");
5442 return ::llvm::cast<masked_compressstore>(Val: __res__);
5443}
5444
5445masked_compressstore masked_compressstore::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5446 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));
5447}
5448
5449::llvm::LogicalResult masked_compressstore::verifyInvariantsImpl() {
5450 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
5451 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
5452
5453 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(op: *this, attr: tblgen_arg_attrs, attrName: "arg_attrs")))
5454 return ::mlir::failure();
5455
5456 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(op: *this, attr: tblgen_res_attrs, attrName: "res_attrs")))
5457 return ::mlir::failure();
5458 {
5459 unsigned index = 0; (void)index;
5460 auto valueGroup0 = getODSOperands(index: 0);
5461
5462 for (auto v : valueGroup0) {
5463 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5464 return ::mlir::failure();
5465 }
5466 auto valueGroup1 = getODSOperands(index: 1);
5467
5468 for (auto v : valueGroup1) {
5469 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5470 return ::mlir::failure();
5471 }
5472 auto valueGroup2 = getODSOperands(index: 2);
5473
5474 for (auto v : valueGroup2) {
5475 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5476 return ::mlir::failure();
5477 }
5478 }
5479 return ::mlir::success();
5480}
5481
5482::llvm::LogicalResult masked_compressstore::verifyInvariants() {
5483 return verifyInvariantsImpl();
5484}
5485
5486::llvm::LogicalResult masked_compressstore::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5487 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5488 if (!dict) {
5489 emitError() << "expected DictionaryAttr to set properties";
5490 return ::mlir::failure();
5491 }
5492 // keep track of used keys in the input dictionary to be able to error out
5493 // if there are some unknown ones.
5494 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
5495 ::mlir::MLIRContext *ctx = dict.getContext();
5496 (void)ctx;
5497 {
5498
5499 auto &propStorage = prop.arg_attrs;
5500 auto arg_attrsAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "arg_attrs");
5501 auto attr = dict.get(name: arg_attrsAttrName);
5502 usedKeys.insert(V: arg_attrsAttrName);
5503 if (attr || /*isRequired=*/false) {
5504 if (!attr) {
5505 emitError() << "expected key entry for arg_attrs in DictionaryAttr to set "
5506 "Properties.";
5507 return ::mlir::failure();
5508 }
5509 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
5510 if (convertedAttr) {
5511 propStorage = convertedAttr;
5512 } else {
5513 emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
5514 return ::mlir::failure();
5515 }
5516 }
5517 }
5518 {
5519
5520 auto &propStorage = prop.res_attrs;
5521 auto res_attrsAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "res_attrs");
5522 auto attr = dict.get(name: res_attrsAttrName);
5523 usedKeys.insert(V: res_attrsAttrName);
5524 if (attr || /*isRequired=*/false) {
5525 if (!attr) {
5526 emitError() << "expected key entry for res_attrs in DictionaryAttr to set "
5527 "Properties.";
5528 return ::mlir::failure();
5529 }
5530 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
5531 if (convertedAttr) {
5532 propStorage = convertedAttr;
5533 } else {
5534 emitError() << "Invalid attribute `res_attrs` in property conversion: " << attr;
5535 return ::mlir::failure();
5536 }
5537 }
5538 }
5539
5540 for (::mlir::NamedAttribute attr : dict) {
5541 if (!usedKeys.contains(V: attr.getName()))
5542 return emitError() << "unknown key '" << attr.getName() <<
5543 "' when parsing properties dictionary";
5544 }
5545 return ::mlir::success();
5546}
5547
5548void masked_compressstore::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5549 Properties &properties = odsState.getOrAddProperties<Properties>();
5550 populateDefaultProperties(opName: odsState.name, properties);
5551 const ::llvm::StringRef inherentNames[] = {"arg_attrs", "res_attrs"};
5552 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
5553 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
5554 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
5555 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
5556 });
5557}
5558
5559
5560} // namespace mlir::LLVM
5561MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::masked_compressstore)
5562MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::masked_compressstoreGenericAdaptorBase::Properties)
5563
5564namespace mlir::LLVM {
5565
5566
5567//===----------------------------------------------------------------------===//
5568// ::mlir::LLVM::masked_expandload definitions
5569//===----------------------------------------------------------------------===//
5570
5571namespace detail {
5572
5573masked_expandloadGenericAdaptorBase::masked_expandloadGenericAdaptorBase(masked_expandload op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
5574
5575::std::optional< ::mlir::ArrayAttr > masked_expandloadGenericAdaptorBase::getArgAttrs() {
5576 auto attr = getArgAttrsAttr();
5577 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5578}
5579
5580::std::optional< ::mlir::ArrayAttr > masked_expandloadGenericAdaptorBase::getResAttrs() {
5581 auto attr = getResAttrsAttr();
5582 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5583}
5584
5585
5586} // namespace detail
5587masked_expandloadAdaptor::masked_expandloadAdaptor(masked_expandload op) : masked_expandloadGenericAdaptor(op->getOperands(), op) {}
5588
5589::llvm::LogicalResult masked_expandloadAdaptor::verify(::mlir::Location loc) {
5590 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
5591 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
5592
5593 if (tblgen_arg_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_arg_attrs))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_arg_attrs), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(Val: attr))); }))))
5594 return emitError(loc, message: "'llvm.intr.masked.expandload' op attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
5595
5596 if (tblgen_res_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_res_attrs))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_res_attrs), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::DictionaryAttr>(Val: attr))); }))))
5597 return emitError(loc, message: "'llvm.intr.masked.expandload' op attribute 'res_attrs' failed to satisfy constraint: Array of dictionary attributes");
5598 return ::mlir::success();
5599}
5600
5601::llvm::LogicalResult masked_expandload::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5602 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5603 if (!dict) {
5604 emitError() << "expected DictionaryAttr to set properties";
5605 return ::mlir::failure();
5606 }
5607
5608 {
5609 auto attr = dict.get(name: "arg_attrs");
5610 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
5611 storage&: prop.arg_attrs, attr, name: "arg_attrs", emitError)))
5612 return ::mlir::failure();
5613 }
5614
5615 {
5616 auto attr = dict.get(name: "res_attrs");
5617 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
5618 storage&: prop.res_attrs, attr, name: "res_attrs", emitError)))
5619 return ::mlir::failure();
5620 }
5621 return ::mlir::success();
5622}
5623
5624::mlir::Attribute masked_expandload::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
5625 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
5626 ::mlir::Builder odsBuilder{ctx};
5627 ::mlir::detail::appendAttributeProperty(attrs, name: "arg_attrs", attr: prop.arg_attrs);
5628 ::mlir::detail::appendAttributeProperty(attrs, name: "res_attrs", attr: prop.res_attrs);
5629
5630 if (!attrs.empty())
5631 return odsBuilder.getDictionaryAttr(value: attrs);
5632 return {};
5633}
5634
5635llvm::hash_code masked_expandload::computePropertiesHash(const Properties &prop) {
5636 using llvm::hash_value;
5637 return llvm::hash_combine(
5638 args: llvm::hash_value(ptr: prop.arg_attrs.getAsOpaquePointer()),
5639 args: llvm::hash_value(ptr: prop.res_attrs.getAsOpaquePointer()));
5640}
5641
5642std::optional<mlir::Attribute> masked_expandload::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
5643 if (name == "arg_attrs")
5644 return prop.arg_attrs;
5645
5646 if (name == "res_attrs")
5647 return prop.res_attrs;
5648 return std::nullopt;
5649}
5650
5651void masked_expandload::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
5652 if (name == "arg_attrs") {
5653 prop.arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.arg_attrs)>>(Val&: value);
5654 return;
5655 }
5656
5657 if (name == "res_attrs") {
5658 prop.res_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.res_attrs)>>(Val&: value);
5659 return;
5660 }
5661}
5662
5663void masked_expandload::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
5664 if (prop.arg_attrs) {
5665 ::mlir::Attribute value = prop.arg_attrs;
5666 ::mlir::Attribute originalValue = value;
5667 visitor("arg_attrs", value);
5668 if (value != originalValue)
5669 setInherentAttr(prop, name: "arg_attrs", value);
5670 }
5671
5672 if (prop.res_attrs) {
5673 ::mlir::Attribute value = prop.res_attrs;
5674 ::mlir::Attribute originalValue = value;
5675 visitor("res_attrs", value);
5676 if (value != originalValue)
5677 setInherentAttr(prop, name: "res_attrs", value);
5678 }
5679}
5680
5681::llvm::LogicalResult masked_expandload::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5682 {
5683 ::mlir::Attribute attr = attrs.get(name: getArgAttrsAttrName(name: opName));
5684 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(attr, attrName: "arg_attrs", emitError)))
5685 return ::mlir::failure();
5686 }
5687
5688 {
5689 ::mlir::Attribute attr = attrs.get(name: getResAttrsAttrName(name: opName));
5690 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(attr, attrName: "res_attrs", emitError)))
5691 return ::mlir::failure();
5692 }
5693 return ::mlir::success();
5694}
5695
5696::llvm::LogicalResult masked_expandload::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
5697 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
5698 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.arg_attrs)))
5699 return ::mlir::failure();
5700
5701 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.res_attrs)))
5702 return ::mlir::failure();
5703 return ::mlir::success();
5704}
5705
5706void masked_expandload::writeProperties(::mlir::DialectBytecodeWriter &writer) {
5707 auto &prop = getProperties(); (void)prop;
5708
5709 writer.writeOptionalAttribute(attr: prop.arg_attrs);
5710
5711 writer.writeOptionalAttribute(attr: prop.res_attrs);
5712}
5713
5714::std::optional< ::mlir::ArrayAttr > masked_expandload::getArgAttrs() {
5715 auto attr = getArgAttrsAttr();
5716 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5717}
5718
5719::std::optional< ::mlir::ArrayAttr > masked_expandload::getResAttrs() {
5720 auto attr = getResAttrsAttr();
5721 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5722}
5723
5724masked_expandload masked_expandload::create(::mlir::OpBuilder &builder, ::mlir::Location location, TypeRange resTy, Value ptr, Value mask, Value passthru, uint64_t align) {
5725 ::mlir::OperationState __state__(location, getOperationName());
5726 build(builder, state&: __state__, resTys: std::forward<decltype(resTy)>(t&: resTy), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), passthru: std::forward<decltype(passthru)>(t&: passthru), align: std::forward<decltype(align)>(t&: align));
5727 auto __res__ = builder.create(state: __state__);
5728 assert((::llvm::isa<masked_expandload>(__res__)) && "builder didn't return the right type");
5729 return ::llvm::cast<masked_expandload>(Val: __res__);
5730}
5731
5732masked_expandload masked_expandload::create(::mlir::ImplicitLocOpBuilder &builder, TypeRange resTy, Value ptr, Value mask, Value passthru, uint64_t align) {
5733 return create(builder, location: builder.getLoc(), resTy: std::forward<decltype(resTy)>(t&: resTy), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), passthru: std::forward<decltype(passthru)>(t&: passthru), align: std::forward<decltype(align)>(t&: align));
5734}
5735
5736void masked_expandload::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5737 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5738 odsState.addOperands(newOperands: ptr);
5739 odsState.addOperands(newOperands: mask);
5740 odsState.addOperands(newOperands: passthru);
5741 if (arg_attrs) {
5742 odsProperties.arg_attrs = arg_attrs;
5743 }
5744 if (res_attrs) {
5745 odsProperties.res_attrs = res_attrs;
5746 }
5747 odsState.addTypes(newTypes: res);
5748}
5749
5750masked_expandload masked_expandload::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5751 ::mlir::OperationState __state__(location, getOperationName());
5752 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), passthru: std::forward<decltype(passthru)>(t&: passthru), arg_attrs: std::forward<decltype(arg_attrs)>(t&: arg_attrs), res_attrs: std::forward<decltype(res_attrs)>(t&: res_attrs));
5753 auto __res__ = builder.create(state: __state__);
5754 assert((::llvm::isa<masked_expandload>(__res__)) && "builder didn't return the right type");
5755 return ::llvm::cast<masked_expandload>(Val: __res__);
5756}
5757
5758masked_expandload masked_expandload::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5759 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), passthru: std::forward<decltype(passthru)>(t&: passthru), arg_attrs: std::forward<decltype(arg_attrs)>(t&: arg_attrs), res_attrs: std::forward<decltype(res_attrs)>(t&: res_attrs));
5760}
5761
5762void masked_expandload::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5763 auto &odsProperties = odsState.getOrAddProperties<Properties>();
5764 odsState.addOperands(newOperands: ptr);
5765 odsState.addOperands(newOperands: mask);
5766 odsState.addOperands(newOperands: passthru);
5767 if (arg_attrs) {
5768 odsProperties.arg_attrs = arg_attrs;
5769 }
5770 if (res_attrs) {
5771 odsProperties.res_attrs = res_attrs;
5772 }
5773 assert(resultTypes.size() == 1u && "mismatched number of results");
5774 odsState.addTypes(newTypes&: resultTypes);
5775}
5776
5777masked_expandload masked_expandload::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5778 ::mlir::OperationState __state__(location, getOperationName());
5779 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), passthru: std::forward<decltype(passthru)>(t&: passthru), arg_attrs: std::forward<decltype(arg_attrs)>(t&: arg_attrs), res_attrs: std::forward<decltype(res_attrs)>(t&: res_attrs));
5780 auto __res__ = builder.create(state: __state__);
5781 assert((::llvm::isa<masked_expandload>(__res__)) && "builder didn't return the right type");
5782 return ::llvm::cast<masked_expandload>(Val: __res__);
5783}
5784
5785masked_expandload masked_expandload::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs) {
5786 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), ptr: std::forward<decltype(ptr)>(t&: ptr), mask: std::forward<decltype(mask)>(t&: mask), passthru: std::forward<decltype(passthru)>(t&: passthru), arg_attrs: std::forward<decltype(arg_attrs)>(t&: arg_attrs), res_attrs: std::forward<decltype(res_attrs)>(t&: res_attrs));
5787}
5788
5789void masked_expandload::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5790 assert(operands.size() == 3u && "mismatched number of parameters");
5791 odsState.addOperands(newOperands: operands);
5792 buildPropertiesAndDiscardableAttributes(odsState, attributes);
5793 assert(resultTypes.size() == 1u && "mismatched number of return types");
5794 odsState.addTypes(newTypes&: resultTypes);
5795}
5796
5797masked_expandload masked_expandload::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5798LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5799
5800 ::mlir::OperationState __state__(location, getOperationName());
5801 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));
5802 auto __res__ = builder.create(state: __state__);
5803 assert((::llvm::isa<masked_expandload>(__res__)) && "builder didn't return the right type");
5804 return ::llvm::cast<masked_expandload>(Val: __res__);
5805LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5806}
5807
5808masked_expandload masked_expandload::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5809LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
5810
5811 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));
5812LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
5813}
5814
5815void masked_expandload::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5816 assert(operands.size() == 3u && "mismatched number of parameters");
5817 odsState.addOperands(newOperands: operands);
5818 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
5819 odsState.addAttributes(newAttributes: discardableAttributes);
5820 assert(resultTypes.size() == 1u && "mismatched number of return types");
5821 odsState.addTypes(newTypes&: resultTypes);
5822}
5823
5824masked_expandload masked_expandload::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5825 ::mlir::OperationState __state__(location, getOperationName());
5826 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));
5827 auto __res__ = builder.create(state: __state__);
5828 assert((::llvm::isa<masked_expandload>(__res__)) && "builder didn't return the right type");
5829 return ::llvm::cast<masked_expandload>(Val: __res__);
5830}
5831
5832masked_expandload masked_expandload::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
5833 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));
5834}
5835
5836::llvm::LogicalResult masked_expandload::verifyInvariantsImpl() {
5837 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
5838 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
5839
5840 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(op: *this, attr: tblgen_arg_attrs, attrName: "arg_attrs")))
5841 return ::mlir::failure();
5842
5843 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps8(op: *this, attr: tblgen_res_attrs, attrName: "res_attrs")))
5844 return ::mlir::failure();
5845 {
5846 unsigned index = 0; (void)index;
5847 auto valueGroup0 = getODSOperands(index: 0);
5848
5849 for (auto v : valueGroup0) {
5850 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5851 return ::mlir::failure();
5852 }
5853 auto valueGroup1 = getODSOperands(index: 1);
5854
5855 for (auto v : valueGroup1) {
5856 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5857 return ::mlir::failure();
5858 }
5859 auto valueGroup2 = getODSOperands(index: 2);
5860
5861 for (auto v : valueGroup2) {
5862 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
5863 return ::mlir::failure();
5864 }
5865 }
5866 {
5867 unsigned index = 0; (void)index;
5868 auto valueGroup0 = getODSResults(index: 0);
5869
5870 for (auto v : valueGroup0) {
5871 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
5872 return ::mlir::failure();
5873 }
5874 }
5875 return ::mlir::success();
5876}
5877
5878::llvm::LogicalResult masked_expandload::verifyInvariants() {
5879 return verifyInvariantsImpl();
5880}
5881
5882::llvm::LogicalResult masked_expandload::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
5883 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
5884 if (!dict) {
5885 emitError() << "expected DictionaryAttr to set properties";
5886 return ::mlir::failure();
5887 }
5888 // keep track of used keys in the input dictionary to be able to error out
5889 // if there are some unknown ones.
5890 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
5891 ::mlir::MLIRContext *ctx = dict.getContext();
5892 (void)ctx;
5893 {
5894
5895 auto &propStorage = prop.arg_attrs;
5896 auto arg_attrsAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "arg_attrs");
5897 auto attr = dict.get(name: arg_attrsAttrName);
5898 usedKeys.insert(V: arg_attrsAttrName);
5899 if (attr || /*isRequired=*/false) {
5900 if (!attr) {
5901 emitError() << "expected key entry for arg_attrs in DictionaryAttr to set "
5902 "Properties.";
5903 return ::mlir::failure();
5904 }
5905 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
5906 if (convertedAttr) {
5907 propStorage = convertedAttr;
5908 } else {
5909 emitError() << "Invalid attribute `arg_attrs` in property conversion: " << attr;
5910 return ::mlir::failure();
5911 }
5912 }
5913 }
5914 {
5915
5916 auto &propStorage = prop.res_attrs;
5917 auto res_attrsAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "res_attrs");
5918 auto attr = dict.get(name: res_attrsAttrName);
5919 usedKeys.insert(V: res_attrsAttrName);
5920 if (attr || /*isRequired=*/false) {
5921 if (!attr) {
5922 emitError() << "expected key entry for res_attrs in DictionaryAttr to set "
5923 "Properties.";
5924 return ::mlir::failure();
5925 }
5926 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
5927 if (convertedAttr) {
5928 propStorage = convertedAttr;
5929 } else {
5930 emitError() << "Invalid attribute `res_attrs` in property conversion: " << attr;
5931 return ::mlir::failure();
5932 }
5933 }
5934 }
5935
5936 for (::mlir::NamedAttribute attr : dict) {
5937 if (!usedKeys.contains(V: attr.getName()))
5938 return emitError() << "unknown key '" << attr.getName() <<
5939 "' when parsing properties dictionary";
5940 }
5941 return ::mlir::success();
5942}
5943
5944void masked_expandload::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
5945 Properties &properties = odsState.getOrAddProperties<Properties>();
5946 populateDefaultProperties(opName: odsState.name, properties);
5947 const ::llvm::StringRef inherentNames[] = {"arg_attrs", "res_attrs"};
5948 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
5949 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
5950 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
5951 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
5952 });
5953}
5954
5955
5956} // namespace mlir::LLVM
5957MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::masked_expandload)
5958MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::masked_expandloadGenericAdaptorBase::Properties)
5959
5960namespace mlir::LLVM {
5961
5962
5963//===----------------------------------------------------------------------===//
5964// ::mlir::LLVM::masked_gather definitions
5965//===----------------------------------------------------------------------===//
5966
5967namespace detail {
5968
5969masked_gatherGenericAdaptorBase::masked_gatherGenericAdaptorBase(masked_gather op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
5970
5971std::pair<unsigned, unsigned> masked_gatherGenericAdaptorBase::getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
5972 bool isVariadic[] = {false, false, true};
5973 int prevVariadicCount = 0;
5974 for (unsigned i = 0; i < index; ++i)
5975 if (isVariadic[i]) ++prevVariadicCount;
5976
5977 // Calculate how many dynamic values a static variadic operand corresponds to.
5978 // This assumes all static variadic operands have the same dynamic value count.
5979 int variadicSize = (odsOperandsSize - 2) / 1;
5980 // `index` passed in as the parameter is the static index which counts each
5981 // operand (variadic or not) as size 1. So here for each previous static variadic
5982 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
5983 // value pack for this static operand starts.
5984 int start = index + (variadicSize - 1) * prevVariadicCount;
5985 int size = isVariadic[index] ? variadicSize : 1;
5986 return {start, size};
5987}
5988
5989::std::optional<uint64_t> masked_gatherGenericAdaptorBase::getAlignment() {
5990 auto attr = getAlignmentAttr();
5991 return attr ? ::std::optional<uint64_t>(attr.getValue().getZExtValue()) : (::std::nullopt);
5992}
5993
5994::std::optional< ::mlir::ArrayAttr > masked_gatherGenericAdaptorBase::getAccessGroups() {
5995 auto attr = getAccessGroupsAttr();
5996 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
5997}
5998
5999::std::optional< ::mlir::ArrayAttr > masked_gatherGenericAdaptorBase::getAliasScopes() {
6000 auto attr = getAliasScopesAttr();
6001 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6002}
6003
6004::std::optional< ::mlir::ArrayAttr > masked_gatherGenericAdaptorBase::getNoaliasScopes() {
6005 auto attr = getNoaliasScopesAttr();
6006 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6007}
6008
6009::std::optional< ::mlir::ArrayAttr > masked_gatherGenericAdaptorBase::getTbaa() {
6010 auto attr = getTbaaAttr();
6011 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6012}
6013
6014
6015} // namespace detail
6016masked_gatherAdaptor::masked_gatherAdaptor(masked_gather op) : masked_gatherGenericAdaptor(op->getOperands(), op) {}
6017
6018::llvm::LogicalResult masked_gatherAdaptor::verify(::mlir::Location loc) {
6019 auto tblgen_access_groups = getProperties().access_groups; (void)tblgen_access_groups;
6020 auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
6021 auto tblgen_alignment = getProperties().alignment; (void)tblgen_alignment;
6022 auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
6023 auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;
6024
6025 if (tblgen_alignment && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_alignment))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_alignment).getType().isSignlessInteger(width: 64)))))
6026 return emitError(loc, message: "'llvm.intr.masked.gather' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute");
6027
6028 if (tblgen_access_groups && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_access_groups))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_access_groups), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AccessGroupAttr>(Val: attr))); }))))
6029 return emitError(loc, message: "'llvm.intr.masked.gather' op attribute 'access_groups' failed to satisfy constraint: LLVM dialect access group metadata array");
6030
6031 if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_alias_scopes))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_alias_scopes), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
6032 return emitError(loc, message: "'llvm.intr.masked.gather' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");
6033
6034 if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_noalias_scopes))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_noalias_scopes), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
6035 return emitError(loc, message: "'llvm.intr.masked.gather' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");
6036
6037 if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_tbaa))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_tbaa), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(Val: attr))); }))))
6038 return emitError(loc, message: "'llvm.intr.masked.gather' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
6039 return ::mlir::success();
6040}
6041
6042std::pair<unsigned, unsigned> masked_gather::getODSOperandIndexAndLength(unsigned index) {
6043 bool isVariadic[] = {false, false, true};
6044 int prevVariadicCount = 0;
6045 for (unsigned i = 0; i < index; ++i)
6046 if (isVariadic[i]) ++prevVariadicCount;
6047
6048 // Calculate how many dynamic values a static variadic operand corresponds to.
6049 // This assumes all static variadic operands have the same dynamic value count.
6050 int variadicSize = (getOperation()->getNumOperands() - 2) / 1;
6051 // `index` passed in as the parameter is the static index which counts each
6052 // operand (variadic or not) as size 1. So here for each previous static variadic
6053 // operand, we need to offset by (variadicSize - 1) to get where the dynamic
6054 // value pack for this static operand starts.
6055 int start = index + (variadicSize - 1) * prevVariadicCount;
6056 int size = isVariadic[index] ? variadicSize : 1;
6057 return {start, size};
6058}
6059
6060::mlir::MutableOperandRange masked_gather::getPassThruMutable() {
6061 auto range = getODSOperandIndexAndLength(index: 2);
6062 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
6063 return mutableRange;
6064}
6065
6066::llvm::LogicalResult masked_gather::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6067 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6068 if (!dict) {
6069 emitError() << "expected DictionaryAttr to set properties";
6070 return ::mlir::failure();
6071 }
6072
6073 {
6074 auto attr = dict.get(name: "access_groups");
6075 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6076 storage&: prop.access_groups, attr, name: "access_groups", emitError)))
6077 return ::mlir::failure();
6078 }
6079
6080 {
6081 auto attr = dict.get(name: "alias_scopes");
6082 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6083 storage&: prop.alias_scopes, attr, name: "alias_scopes", emitError)))
6084 return ::mlir::failure();
6085 }
6086
6087 {
6088 auto attr = dict.get(name: "alignment");
6089 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6090 storage&: prop.alignment, attr, name: "alignment", emitError)))
6091 return ::mlir::failure();
6092 }
6093
6094 {
6095 auto attr = dict.get(name: "noalias_scopes");
6096 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6097 storage&: prop.noalias_scopes, attr, name: "noalias_scopes", emitError)))
6098 return ::mlir::failure();
6099 }
6100
6101 {
6102 auto attr = dict.get(name: "tbaa");
6103 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6104 storage&: prop.tbaa, attr, name: "tbaa", emitError)))
6105 return ::mlir::failure();
6106 }
6107 return ::mlir::success();
6108}
6109
6110::mlir::Attribute masked_gather::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6111 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6112 ::mlir::Builder odsBuilder{ctx};
6113 ::mlir::detail::appendAttributeProperty(attrs, name: "access_groups", attr: prop.access_groups);
6114 ::mlir::detail::appendAttributeProperty(attrs, name: "alias_scopes", attr: prop.alias_scopes);
6115 ::mlir::detail::appendAttributeProperty(attrs, name: "alignment", attr: prop.alignment);
6116 ::mlir::detail::appendAttributeProperty(attrs, name: "noalias_scopes", attr: prop.noalias_scopes);
6117 ::mlir::detail::appendAttributeProperty(attrs, name: "tbaa", attr: prop.tbaa);
6118
6119 if (!attrs.empty())
6120 return odsBuilder.getDictionaryAttr(value: attrs);
6121 return {};
6122}
6123
6124llvm::hash_code masked_gather::computePropertiesHash(const Properties &prop) {
6125 using llvm::hash_value;
6126 return llvm::hash_combine(
6127 args: llvm::hash_value(ptr: prop.access_groups.getAsOpaquePointer()),
6128 args: llvm::hash_value(ptr: prop.alias_scopes.getAsOpaquePointer()),
6129 args: llvm::hash_value(ptr: prop.alignment.getAsOpaquePointer()),
6130 args: llvm::hash_value(ptr: prop.noalias_scopes.getAsOpaquePointer()),
6131 args: llvm::hash_value(ptr: prop.tbaa.getAsOpaquePointer()));
6132}
6133
6134std::optional<mlir::Attribute> masked_gather::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6135 if (name == "access_groups")
6136 return prop.access_groups;
6137
6138 if (name == "alias_scopes")
6139 return prop.alias_scopes;
6140
6141 if (name == "alignment")
6142 return prop.alignment;
6143
6144 if (name == "noalias_scopes")
6145 return prop.noalias_scopes;
6146
6147 if (name == "tbaa")
6148 return prop.tbaa;
6149 return std::nullopt;
6150}
6151
6152void masked_gather::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
6153 if (name == "access_groups") {
6154 prop.access_groups = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.access_groups)>>(Val&: value);
6155 return;
6156 }
6157
6158 if (name == "alias_scopes") {
6159 prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(Val&: value);
6160 return;
6161 }
6162
6163 if (name == "alignment") {
6164 prop.alignment = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alignment)>>(Val&: value);
6165 return;
6166 }
6167
6168 if (name == "noalias_scopes") {
6169 prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(Val&: value);
6170 return;
6171 }
6172
6173 if (name == "tbaa") {
6174 prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(Val&: value);
6175 return;
6176 }
6177}
6178
6179void masked_gather::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
6180 if (prop.access_groups) {
6181 ::mlir::Attribute value = prop.access_groups;
6182 ::mlir::Attribute originalValue = value;
6183 visitor("access_groups", value);
6184 if (value != originalValue)
6185 setInherentAttr(prop, name: "access_groups", value);
6186 }
6187
6188 if (prop.alias_scopes) {
6189 ::mlir::Attribute value = prop.alias_scopes;
6190 ::mlir::Attribute originalValue = value;
6191 visitor("alias_scopes", value);
6192 if (value != originalValue)
6193 setInherentAttr(prop, name: "alias_scopes", value);
6194 }
6195
6196 if (prop.alignment) {
6197 ::mlir::Attribute value = prop.alignment;
6198 ::mlir::Attribute originalValue = value;
6199 visitor("alignment", value);
6200 if (value != originalValue)
6201 setInherentAttr(prop, name: "alignment", value);
6202 }
6203
6204 if (prop.noalias_scopes) {
6205 ::mlir::Attribute value = prop.noalias_scopes;
6206 ::mlir::Attribute originalValue = value;
6207 visitor("noalias_scopes", value);
6208 if (value != originalValue)
6209 setInherentAttr(prop, name: "noalias_scopes", value);
6210 }
6211
6212 if (prop.tbaa) {
6213 ::mlir::Attribute value = prop.tbaa;
6214 ::mlir::Attribute originalValue = value;
6215 visitor("tbaa", value);
6216 if (value != originalValue)
6217 setInherentAttr(prop, name: "tbaa", value);
6218 }
6219}
6220
6221::llvm::LogicalResult masked_gather::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6222 {
6223 ::mlir::Attribute attr = attrs.get(name: getAccessGroupsAttrName(name: opName));
6224 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(attr, attrName: "access_groups", emitError)))
6225 return ::mlir::failure();
6226 }
6227
6228 {
6229 ::mlir::Attribute attr = attrs.get(name: getAliasScopesAttrName(name: opName));
6230 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName: "alias_scopes", emitError)))
6231 return ::mlir::failure();
6232 }
6233
6234 {
6235 ::mlir::Attribute attr = attrs.get(name: getAlignmentAttrName(name: opName));
6236 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(attr, attrName: "alignment", emitError)))
6237 return ::mlir::failure();
6238 }
6239
6240 {
6241 ::mlir::Attribute attr = attrs.get(name: getNoaliasScopesAttrName(name: opName));
6242 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName: "noalias_scopes", emitError)))
6243 return ::mlir::failure();
6244 }
6245
6246 {
6247 ::mlir::Attribute attr = attrs.get(name: getTbaaAttrName(name: opName));
6248 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(attr, attrName: "tbaa", emitError)))
6249 return ::mlir::failure();
6250 }
6251 return ::mlir::success();
6252}
6253
6254::llvm::LogicalResult masked_gather::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
6255 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
6256 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.access_groups)))
6257 return ::mlir::failure();
6258
6259 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.alias_scopes)))
6260 return ::mlir::failure();
6261
6262 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.alignment)))
6263 return ::mlir::failure();
6264
6265 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.noalias_scopes)))
6266 return ::mlir::failure();
6267
6268 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.tbaa)))
6269 return ::mlir::failure();
6270 return ::mlir::success();
6271}
6272
6273void masked_gather::writeProperties(::mlir::DialectBytecodeWriter &writer) {
6274 auto &prop = getProperties(); (void)prop;
6275
6276 writer.writeOptionalAttribute(attr: prop.access_groups);
6277
6278 writer.writeOptionalAttribute(attr: prop.alias_scopes);
6279
6280 writer.writeOptionalAttribute(attr: prop.alignment);
6281
6282 writer.writeOptionalAttribute(attr: prop.noalias_scopes);
6283
6284 writer.writeOptionalAttribute(attr: prop.tbaa);
6285}
6286
6287::std::optional<uint64_t> masked_gather::getAlignment() {
6288 auto attr = getAlignmentAttr();
6289 return attr ? ::std::optional<uint64_t>(attr.getValue().getZExtValue()) : (::std::nullopt);
6290}
6291
6292::std::optional< ::mlir::ArrayAttr > masked_gather::getAccessGroups() {
6293 auto attr = getAccessGroupsAttr();
6294 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6295}
6296
6297::std::optional< ::mlir::ArrayAttr > masked_gather::getAliasScopes() {
6298 auto attr = getAliasScopesAttr();
6299 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6300}
6301
6302::std::optional< ::mlir::ArrayAttr > masked_gather::getNoaliasScopes() {
6303 auto attr = getNoaliasScopesAttr();
6304 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6305}
6306
6307::std::optional< ::mlir::ArrayAttr > masked_gather::getTbaa() {
6308 auto attr = getTbaaAttr();
6309 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6310}
6311
6312void masked_gather::setAlignment(::std::optional<uint64_t> attrValue) {
6313 auto &odsProp = getProperties().alignment;
6314 if (attrValue)
6315 odsProp = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 64), value: *attrValue);
6316 else
6317 odsProp = nullptr;
6318}
6319
6320void masked_gather::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
6321 if (resultType) odsState.addTypes(newTypes: resultType);
6322 odsState.addOperands(newOperands: operands);
6323 for (auto namedAttr : attributes)
6324 odsState.addAttribute(name: namedAttr.getName(), attr: namedAttr.getValue());
6325
6326}
6327
6328masked_gather masked_gather::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
6329 ::mlir::OperationState __state__(location, getOperationName());
6330 build(odsBuilder&: builder, odsState&: __state__, resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
6331 auto __res__ = builder.create(state: __state__);
6332 assert((::llvm::isa<masked_gather>(__res__)) && "builder didn't return the right type");
6333 return ::llvm::cast<masked_gather>(Val: __res__);
6334}
6335
6336masked_gather masked_gather::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
6337 return create(builder, location: builder.getLoc(), resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
6338}
6339
6340void masked_gather::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type res, Value ptrs, Value mask, ValueRange pass_thru, uint64_t alignment) {
6341 build(odsBuilder, odsState, res, ptrs, mask, pass_thru,
6342 alignment: odsBuilder.getI64IntegerAttr(value: alignment),
6343 /*access_groups=*/access_groups: nullptr, /*alias_scopes=*/alias_scopes: nullptr,
6344 /*noalias_scopes=*/noalias_scopes: nullptr, /*tbaa=*/tbaa: nullptr);
6345
6346}
6347
6348masked_gather masked_gather::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type res, Value ptrs, Value mask, ValueRange pass_thru, uint64_t alignment) {
6349 ::mlir::OperationState __state__(location, getOperationName());
6350 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment));
6351 auto __res__ = builder.create(state: __state__);
6352 assert((::llvm::isa<masked_gather>(__res__)) && "builder didn't return the right type");
6353 return ::llvm::cast<masked_gather>(Val: __res__);
6354}
6355
6356masked_gather masked_gather::create(::mlir::ImplicitLocOpBuilder &builder, Type res, Value ptrs, Value mask, ValueRange pass_thru, uint64_t alignment) {
6357 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment));
6358}
6359
6360void masked_gather::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
6361 auto &odsProperties = odsState.getOrAddProperties<Properties>();
6362 odsState.addOperands(newOperands: ptrs);
6363 odsState.addOperands(newOperands: mask);
6364 odsState.addOperands(newOperands: pass_thru);
6365 if (alignment) {
6366 odsProperties.alignment = alignment;
6367 }
6368 if (access_groups) {
6369 odsProperties.access_groups = access_groups;
6370 }
6371 if (alias_scopes) {
6372 odsProperties.alias_scopes = alias_scopes;
6373 }
6374 if (noalias_scopes) {
6375 odsProperties.noalias_scopes = noalias_scopes;
6376 }
6377 if (tbaa) {
6378 odsProperties.tbaa = tbaa;
6379 }
6380 odsState.addTypes(newTypes: res);
6381}
6382
6383masked_gather masked_gather::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
6384 ::mlir::OperationState __state__(location, getOperationName());
6385 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
6386 auto __res__ = builder.create(state: __state__);
6387 assert((::llvm::isa<masked_gather>(__res__)) && "builder didn't return the right type");
6388 return ::llvm::cast<masked_gather>(Val: __res__);
6389}
6390
6391masked_gather masked_gather::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
6392 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
6393}
6394
6395void masked_gather::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
6396 auto &odsProperties = odsState.getOrAddProperties<Properties>();
6397 odsState.addOperands(newOperands: ptrs);
6398 odsState.addOperands(newOperands: mask);
6399 odsState.addOperands(newOperands: pass_thru);
6400 if (alignment) {
6401 odsProperties.alignment = alignment;
6402 }
6403 if (access_groups) {
6404 odsProperties.access_groups = access_groups;
6405 }
6406 if (alias_scopes) {
6407 odsProperties.alias_scopes = alias_scopes;
6408 }
6409 if (noalias_scopes) {
6410 odsProperties.noalias_scopes = noalias_scopes;
6411 }
6412 if (tbaa) {
6413 odsProperties.tbaa = tbaa;
6414 }
6415 assert(resultTypes.size() == 1u && "mismatched number of results");
6416 odsState.addTypes(newTypes&: resultTypes);
6417}
6418
6419masked_gather masked_gather::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
6420 ::mlir::OperationState __state__(location, getOperationName());
6421 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
6422 auto __res__ = builder.create(state: __state__);
6423 assert((::llvm::isa<masked_gather>(__res__)) && "builder didn't return the right type");
6424 return ::llvm::cast<masked_gather>(Val: __res__);
6425}
6426
6427masked_gather masked_gather::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
6428 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), pass_thru: std::forward<decltype(pass_thru)>(t&: pass_thru), alignment: std::forward<decltype(alignment)>(t&: alignment), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
6429}
6430
6431void masked_gather::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6432 assert(operands.size() >= 2u && "mismatched number of parameters");
6433 odsState.addOperands(newOperands: operands);
6434 buildPropertiesAndDiscardableAttributes(odsState, attributes);
6435 assert(resultTypes.size() == 1u && "mismatched number of return types");
6436 odsState.addTypes(newTypes&: resultTypes);
6437}
6438
6439masked_gather masked_gather::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6440LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
6441
6442 ::mlir::OperationState __state__(location, getOperationName());
6443 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));
6444 auto __res__ = builder.create(state: __state__);
6445 assert((::llvm::isa<masked_gather>(__res__)) && "builder didn't return the right type");
6446 return ::llvm::cast<masked_gather>(Val: __res__);
6447LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
6448}
6449
6450masked_gather masked_gather::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6451LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
6452
6453 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));
6454LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
6455}
6456
6457void masked_gather::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6458 assert(operands.size() >= 2u && "mismatched number of parameters");
6459 odsState.addOperands(newOperands: operands);
6460 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
6461 odsState.addAttributes(newAttributes: discardableAttributes);
6462 assert(resultTypes.size() == 1u && "mismatched number of return types");
6463 odsState.addTypes(newTypes&: resultTypes);
6464}
6465
6466masked_gather masked_gather::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6467 ::mlir::OperationState __state__(location, getOperationName());
6468 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));
6469 auto __res__ = builder.create(state: __state__);
6470 assert((::llvm::isa<masked_gather>(__res__)) && "builder didn't return the right type");
6471 return ::llvm::cast<masked_gather>(Val: __res__);
6472}
6473
6474masked_gather masked_gather::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
6475 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));
6476}
6477
6478::llvm::LogicalResult masked_gather::verifyInvariantsImpl() {
6479 auto tblgen_access_groups = getProperties().access_groups; (void)tblgen_access_groups;
6480 auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
6481 auto tblgen_alignment = getProperties().alignment; (void)tblgen_alignment;
6482 auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
6483 auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;
6484
6485 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, attr: tblgen_alignment, attrName: "alignment")))
6486 return ::mlir::failure();
6487
6488 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, attr: tblgen_access_groups, attrName: "access_groups")))
6489 return ::mlir::failure();
6490
6491 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, attr: tblgen_alias_scopes, attrName: "alias_scopes")))
6492 return ::mlir::failure();
6493
6494 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, attr: tblgen_noalias_scopes, attrName: "noalias_scopes")))
6495 return ::mlir::failure();
6496
6497 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, attr: tblgen_tbaa, attrName: "tbaa")))
6498 return ::mlir::failure();
6499 {
6500 unsigned index = 0; (void)index;
6501 auto valueGroup0 = getODSOperands(index: 0);
6502
6503 for (auto v : valueGroup0) {
6504 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6505 return ::mlir::failure();
6506 }
6507 auto valueGroup1 = getODSOperands(index: 1);
6508
6509 for (auto v : valueGroup1) {
6510 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6511 return ::mlir::failure();
6512 }
6513 auto valueGroup2 = getODSOperands(index: 2);
6514
6515 for (auto v : valueGroup2) {
6516 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps8(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
6517 return ::mlir::failure();
6518 }
6519 }
6520 {
6521 unsigned index = 0; (void)index;
6522 auto valueGroup0 = getODSResults(index: 0);
6523
6524 for (auto v : valueGroup0) {
6525 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
6526 return ::mlir::failure();
6527 }
6528 }
6529 return ::mlir::success();
6530}
6531
6532::llvm::LogicalResult masked_gather::verifyInvariants() {
6533 if(::mlir::succeeded(Result: verifyInvariantsImpl()) && ::mlir::succeeded(Result: verify()))
6534 return ::mlir::success();
6535 return ::mlir::failure();
6536}
6537
6538::mlir::ParseResult masked_gather::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6539 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
6540 ::mlir::IntegerAttr alignmentAttr;
6541 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
6542 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
6543 if (parser.parseLParen())
6544 return ::mlir::failure();
6545 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
6546 if (parser.parseOperandList(result&: allOperands))
6547 return ::mlir::failure();
6548 if (parser.parseRParen())
6549 return ::mlir::failure();
6550 if (::mlir::succeeded(Result: parser.parseOptionalComma())) {
6551 if (parser.parseKeyword(keyword: "alignment"))
6552 return ::mlir::failure();
6553 if (parser.parseLParen())
6554 return ::mlir::failure();
6555
6556 if (parser.parseCustomAttributeWithFallback(result&: alignmentAttr, type: parser.getBuilder().getIntegerType(width: 64))) {
6557 return ::mlir::failure();
6558 }
6559 if (alignmentAttr) result.getOrAddProperties<masked_gather::Properties>().alignment = alignmentAttr;
6560 if (parser.parseRParen())
6561 return ::mlir::failure();
6562 }
6563 if (parseProperties(parser, result))
6564 return ::mlir::failure();
6565 {
6566 auto loc = parser.getCurrentLocation();(void)loc;
6567 if (parser.parseOptionalAttrDict(result&: result.attributes))
6568 return ::mlir::failure();
6569 if (result.attributes.get(name: "alignment"))
6570 return parser.emitError(loc, message: "inherent attribute 'alignment' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
6571 if (result.attributes.get(name: "access_groups"))
6572 return parser.emitError(loc, message: "inherent attribute 'access_groups' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
6573 if (result.attributes.get(name: "alias_scopes"))
6574 return parser.emitError(loc, message: "inherent attribute 'alias_scopes' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
6575 if (result.attributes.get(name: "noalias_scopes"))
6576 return parser.emitError(loc, message: "inherent attribute 'noalias_scopes' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
6577 if (result.attributes.get(name: "tbaa"))
6578 return parser.emitError(loc, message: "inherent attribute 'tbaa' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
6579 }
6580 if (parser.parseColon())
6581 return ::mlir::failure();
6582
6583 ::mlir::FunctionType allOperand__allResult_functionType;
6584 if (parser.parseType(result&: allOperand__allResult_functionType))
6585 return ::mlir::failure();
6586 allOperandTypes = allOperand__allResult_functionType.getInputs();
6587 allResultTypes = allOperand__allResult_functionType.getResults();
6588 result.addTypes(newTypes: allResultTypes);
6589 // coverity[ARRAY_VS_SINGLETON]
6590 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
6591 return ::mlir::failure();
6592 return ::mlir::success();
6593}
6594
6595::llvm::LogicalResult masked_gather::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6596 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6597 if (!dict) {
6598 emitError() << "expected DictionaryAttr to set properties";
6599 return ::mlir::failure();
6600 }
6601 // keep track of used keys in the input dictionary to be able to error out
6602 // if there are some unknown ones.
6603 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
6604 ::mlir::MLIRContext *ctx = dict.getContext();
6605 (void)ctx;
6606 {
6607
6608 auto &propStorage = prop.access_groups;
6609 auto access_groupsAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "access_groups");
6610 auto attr = dict.get(name: access_groupsAttrName);
6611 usedKeys.insert(V: access_groupsAttrName);
6612 if (attr || /*isRequired=*/false) {
6613 if (!attr) {
6614 emitError() << "expected key entry for access_groups in DictionaryAttr to set "
6615 "Properties.";
6616 return ::mlir::failure();
6617 }
6618 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
6619 if (convertedAttr) {
6620 propStorage = convertedAttr;
6621 } else {
6622 emitError() << "Invalid attribute `access_groups` in property conversion: " << attr;
6623 return ::mlir::failure();
6624 }
6625 }
6626 }
6627 {
6628
6629 auto &propStorage = prop.alias_scopes;
6630 auto alias_scopesAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "alias_scopes");
6631 auto attr = dict.get(name: alias_scopesAttrName);
6632 usedKeys.insert(V: alias_scopesAttrName);
6633 if (attr || /*isRequired=*/false) {
6634 if (!attr) {
6635 emitError() << "expected key entry for alias_scopes in DictionaryAttr to set "
6636 "Properties.";
6637 return ::mlir::failure();
6638 }
6639 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
6640 if (convertedAttr) {
6641 propStorage = convertedAttr;
6642 } else {
6643 emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
6644 return ::mlir::failure();
6645 }
6646 }
6647 }
6648 {
6649
6650 auto &propStorage = prop.noalias_scopes;
6651 auto noalias_scopesAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "noalias_scopes");
6652 auto attr = dict.get(name: noalias_scopesAttrName);
6653 usedKeys.insert(V: noalias_scopesAttrName);
6654 if (attr || /*isRequired=*/false) {
6655 if (!attr) {
6656 emitError() << "expected key entry for noalias_scopes in DictionaryAttr to set "
6657 "Properties.";
6658 return ::mlir::failure();
6659 }
6660 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
6661 if (convertedAttr) {
6662 propStorage = convertedAttr;
6663 } else {
6664 emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
6665 return ::mlir::failure();
6666 }
6667 }
6668 }
6669 {
6670
6671 auto &propStorage = prop.tbaa;
6672 auto tbaaAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tbaa");
6673 auto attr = dict.get(name: tbaaAttrName);
6674 usedKeys.insert(V: tbaaAttrName);
6675 if (attr || /*isRequired=*/false) {
6676 if (!attr) {
6677 emitError() << "expected key entry for tbaa in DictionaryAttr to set "
6678 "Properties.";
6679 return ::mlir::failure();
6680 }
6681 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
6682 if (convertedAttr) {
6683 propStorage = convertedAttr;
6684 } else {
6685 emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
6686 return ::mlir::failure();
6687 }
6688 }
6689 }
6690
6691 for (::mlir::NamedAttribute attr : dict) {
6692 if (!usedKeys.contains(V: attr.getName()))
6693 return emitError() << "unknown key '" << attr.getName() <<
6694 "' when parsing properties dictionary";
6695 }
6696 return ::mlir::success();
6697}
6698
6699::mlir::ParseResult masked_gather::parsePropertiesFromKeyValueList(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
6700 auto &prop = result.getOrAddProperties<Properties>();
6701 (void)prop;
6702 bool seen_access_groups = false;
6703 bool seen_alias_scopes = false;
6704 bool seen_noalias_scopes = false;
6705 bool seen_tbaa = false;
6706
6707 if (succeeded(Result: parser.parseOptionalLess())) {
6708 ::llvm::SMLoc dictionaryLoc = parser.getCurrentLocation();
6709 ::mlir::NamedAttrList propertyAttributes;
6710 if (parser.parseOptionalAttrDict(result&: propertyAttributes))
6711 return ::mlir::failure();
6712 if (dictionaryLoc != parser.getCurrentLocation()) {
6713 if (parser.parseGreater())
6714 return ::mlir::failure();
6715 auto propertyDictionary =
6716 ::mlir::DictionaryAttr::get(context: parser.getContext(), value: propertyAttributes);
6717 return setPropertiesFromParsedAttr(prop, attr: propertyDictionary, emitError: [&]() {
6718 return parser.emitError(loc: dictionaryLoc)
6719 << "invalid properties " << propertyDictionary << ": ";
6720 });
6721 }
6722
6723 bool reachedEnd = succeeded(Result: parser.parseOptionalGreater());
6724 while (!reachedEnd) {
6725 ::llvm::SMLoc keyLoc = parser.getCurrentLocation();
6726 ::llvm::StringRef key;
6727 if (parser.parseKeyword(keyword: &key))
6728 return ::mlir::failure();
6729 if (parser.parseEqual())
6730 return ::mlir::failure();
6731 if (!seen_access_groups && key == "access_groups") {
6732 seen_access_groups = true;
6733 ::mlir::ArrayAttr access_groupsAttr;
6734
6735 if (parser.parseCustomAttributeWithFallback(result&: access_groupsAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
6736 return ::mlir::failure();
6737 }
6738 if (access_groupsAttr) result.getOrAddProperties<masked_gather::Properties>().access_groups = access_groupsAttr;
6739 }
6740 else if (!seen_alias_scopes && key == "alias_scopes") {
6741 seen_alias_scopes = true;
6742 ::mlir::ArrayAttr alias_scopesAttr;
6743
6744 if (parser.parseCustomAttributeWithFallback(result&: alias_scopesAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
6745 return ::mlir::failure();
6746 }
6747 if (alias_scopesAttr) result.getOrAddProperties<masked_gather::Properties>().alias_scopes = alias_scopesAttr;
6748 }
6749 else if (!seen_noalias_scopes && key == "noalias_scopes") {
6750 seen_noalias_scopes = true;
6751 ::mlir::ArrayAttr noalias_scopesAttr;
6752
6753 if (parser.parseCustomAttributeWithFallback(result&: noalias_scopesAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
6754 return ::mlir::failure();
6755 }
6756 if (noalias_scopesAttr) result.getOrAddProperties<masked_gather::Properties>().noalias_scopes = noalias_scopesAttr;
6757 }
6758 else if (!seen_tbaa && key == "tbaa") {
6759 seen_tbaa = true;
6760 ::mlir::ArrayAttr tbaaAttr;
6761
6762 if (parser.parseCustomAttributeWithFallback(result&: tbaaAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
6763 return ::mlir::failure();
6764 }
6765 if (tbaaAttr) result.getOrAddProperties<masked_gather::Properties>().tbaa = tbaaAttr;
6766 }
6767
6768 else {
6769 return parser.emitError(
6770 loc: keyLoc,
6771 message: "duplicate or unknown property in properties dictionary: ")
6772 << key;
6773 }
6774
6775 reachedEnd = succeeded(Result: parser.parseOptionalGreater());
6776 if (!reachedEnd && parser.parseComma())
6777 return ::mlir::failure();
6778 }
6779 }
6780 return ::mlir::success();
6781}
6782
6783LLVM_ATTRIBUTE_MINSIZE void masked_gather::print(::mlir::OpAsmPrinter &_odsPrinter) {
6784 _odsPrinter << "(";
6785 _odsPrinter << getOperation()->getOperands();
6786 _odsPrinter << ")";
6787 if (getAlignmentAttr()) {
6788 _odsPrinter << ",";
6789 _odsPrinter << " alignment";
6790 _odsPrinter << "(";
6791 _odsPrinter.printAttributeWithoutType(attr: getAlignmentAttr());
6792 _odsPrinter << ")";
6793 }
6794 ::llvm::SmallVector<::llvm::StringRef, 2> elidedProps;
6795 elidedProps.push_back(Elt: "alignment");
6796 printProperties(ctx: (*this)->getContext(), p&: _odsPrinter, properties: getProperties(), elidedProps);
6797 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
6798 _odsPrinter << " :";
6799 _odsPrinter << ' ';
6800 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
6801}
6802
6803void masked_gather::_odsPrintPropertiesAsKeyValueList(::mlir::MLIRContext *_odsContext, ::mlir::OpAsmPrinter &_odsPrinter, const Properties &prop, ::mlir::ArrayRef<::llvm::StringRef> elidedProps) {
6804 bool first = true;
6805 auto printKey = [&](::llvm::StringRef name, bool printValue) {
6806 _odsPrinter << (first ? " <" : ", ") << name;
6807 if (printValue)
6808 _odsPrinter << " = ";
6809 first = false;
6810 };
6811 auto shouldPrint = [&](::llvm::StringRef name) {
6812 return !::llvm::is_contained(Range&: elidedProps, Element: name);
6813 };
6814 if (shouldPrint("alignment") && prop.alignment) {
6815 printKey("alignment", /*printValue=*/true);
6816 _odsPrinter.printAttributeWithoutType(attr: prop.alignment);
6817 }
6818 if (shouldPrint("access_groups") && prop.access_groups) {
6819 printKey("access_groups", /*printValue=*/true);
6820 _odsPrinter.printAttributeWithoutType(attr: prop.access_groups);
6821 }
6822 if (shouldPrint("alias_scopes") && prop.alias_scopes) {
6823 printKey("alias_scopes", /*printValue=*/true);
6824 _odsPrinter.printAttributeWithoutType(attr: prop.alias_scopes);
6825 }
6826 if (shouldPrint("noalias_scopes") && prop.noalias_scopes) {
6827 printKey("noalias_scopes", /*printValue=*/true);
6828 _odsPrinter.printAttributeWithoutType(attr: prop.noalias_scopes);
6829 }
6830 if (shouldPrint("tbaa") && prop.tbaa) {
6831 printKey("tbaa", /*printValue=*/true);
6832 _odsPrinter.printAttributeWithoutType(attr: prop.tbaa);
6833 }
6834 if (!first)
6835 _odsPrinter << ">";
6836}
6837
6838void masked_gather::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
6839 Properties &properties = odsState.getOrAddProperties<Properties>();
6840 populateDefaultProperties(opName: odsState.name, properties);
6841 const ::llvm::StringRef inherentNames[] = {"alignment", "access_groups", "alias_scopes", "noalias_scopes", "tbaa"};
6842 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
6843 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
6844 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
6845 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
6846 });
6847}
6848
6849
6850} // namespace mlir::LLVM
6851MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::masked_gather)
6852MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::masked_gatherGenericAdaptorBase::Properties)
6853
6854namespace mlir::LLVM {
6855
6856
6857//===----------------------------------------------------------------------===//
6858// ::mlir::LLVM::masked_scatter definitions
6859//===----------------------------------------------------------------------===//
6860
6861namespace detail {
6862
6863masked_scatterGenericAdaptorBase::masked_scatterGenericAdaptorBase(masked_scatter op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
6864
6865::std::optional<uint64_t> masked_scatterGenericAdaptorBase::getAlignment() {
6866 auto attr = getAlignmentAttr();
6867 return attr ? ::std::optional<uint64_t>(attr.getValue().getZExtValue()) : (::std::nullopt);
6868}
6869
6870::std::optional< ::mlir::ArrayAttr > masked_scatterGenericAdaptorBase::getAccessGroups() {
6871 auto attr = getAccessGroupsAttr();
6872 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6873}
6874
6875::std::optional< ::mlir::ArrayAttr > masked_scatterGenericAdaptorBase::getAliasScopes() {
6876 auto attr = getAliasScopesAttr();
6877 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6878}
6879
6880::std::optional< ::mlir::ArrayAttr > masked_scatterGenericAdaptorBase::getNoaliasScopes() {
6881 auto attr = getNoaliasScopesAttr();
6882 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6883}
6884
6885::std::optional< ::mlir::ArrayAttr > masked_scatterGenericAdaptorBase::getTbaa() {
6886 auto attr = getTbaaAttr();
6887 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
6888}
6889
6890
6891} // namespace detail
6892masked_scatterAdaptor::masked_scatterAdaptor(masked_scatter op) : masked_scatterGenericAdaptor(op->getOperands(), op) {}
6893
6894::llvm::LogicalResult masked_scatterAdaptor::verify(::mlir::Location loc) {
6895 auto tblgen_access_groups = getProperties().access_groups; (void)tblgen_access_groups;
6896 auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
6897 auto tblgen_alignment = getProperties().alignment; (void)tblgen_alignment;
6898 auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
6899 auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;
6900
6901 if (tblgen_alignment && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_alignment))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_alignment).getType().isSignlessInteger(width: 64)))))
6902 return emitError(loc, message: "'llvm.intr.masked.scatter' op attribute 'alignment' failed to satisfy constraint: 64-bit signless integer attribute");
6903
6904 if (tblgen_access_groups && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_access_groups))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_access_groups), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AccessGroupAttr>(Val: attr))); }))))
6905 return emitError(loc, message: "'llvm.intr.masked.scatter' op attribute 'access_groups' failed to satisfy constraint: LLVM dialect access group metadata array");
6906
6907 if (tblgen_alias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_alias_scopes))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_alias_scopes), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
6908 return emitError(loc, message: "'llvm.intr.masked.scatter' op attribute 'alias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");
6909
6910 if (tblgen_noalias_scopes && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_noalias_scopes))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_noalias_scopes), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::AliasScopeAttr>(Val: attr))); }))))
6911 return emitError(loc, message: "'llvm.intr.masked.scatter' op attribute 'noalias_scopes' failed to satisfy constraint: LLVM dialect alias scope array");
6912
6913 if (tblgen_tbaa && !(((::llvm::isa<::mlir::ArrayAttr>(Val: tblgen_tbaa))) && (::llvm::all_of(Range: ::llvm::cast<::mlir::ArrayAttr>(Val&: tblgen_tbaa), P: [&](::mlir::Attribute attr) { return attr && ((::llvm::isa<::mlir::LLVM::TBAATagAttr>(Val: attr))); }))))
6914 return emitError(loc, message: "'llvm.intr.masked.scatter' op attribute 'tbaa' failed to satisfy constraint: LLVM dialect TBAA tag metadata array");
6915 return ::mlir::success();
6916}
6917
6918::llvm::LogicalResult masked_scatter::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
6919 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
6920 if (!dict) {
6921 emitError() << "expected DictionaryAttr to set properties";
6922 return ::mlir::failure();
6923 }
6924
6925 {
6926 auto attr = dict.get(name: "access_groups");
6927 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6928 storage&: prop.access_groups, attr, name: "access_groups", emitError)))
6929 return ::mlir::failure();
6930 }
6931
6932 {
6933 auto attr = dict.get(name: "alias_scopes");
6934 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6935 storage&: prop.alias_scopes, attr, name: "alias_scopes", emitError)))
6936 return ::mlir::failure();
6937 }
6938
6939 {
6940 auto attr = dict.get(name: "alignment");
6941 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6942 storage&: prop.alignment, attr, name: "alignment", emitError)))
6943 return ::mlir::failure();
6944 }
6945
6946 {
6947 auto attr = dict.get(name: "noalias_scopes");
6948 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6949 storage&: prop.noalias_scopes, attr, name: "noalias_scopes", emitError)))
6950 return ::mlir::failure();
6951 }
6952
6953 {
6954 auto attr = dict.get(name: "tbaa");
6955 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
6956 storage&: prop.tbaa, attr, name: "tbaa", emitError)))
6957 return ::mlir::failure();
6958 }
6959 return ::mlir::success();
6960}
6961
6962::mlir::Attribute masked_scatter::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
6963 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
6964 ::mlir::Builder odsBuilder{ctx};
6965 ::mlir::detail::appendAttributeProperty(attrs, name: "access_groups", attr: prop.access_groups);
6966 ::mlir::detail::appendAttributeProperty(attrs, name: "alias_scopes", attr: prop.alias_scopes);
6967 ::mlir::detail::appendAttributeProperty(attrs, name: "alignment", attr: prop.alignment);
6968 ::mlir::detail::appendAttributeProperty(attrs, name: "noalias_scopes", attr: prop.noalias_scopes);
6969 ::mlir::detail::appendAttributeProperty(attrs, name: "tbaa", attr: prop.tbaa);
6970
6971 if (!attrs.empty())
6972 return odsBuilder.getDictionaryAttr(value: attrs);
6973 return {};
6974}
6975
6976llvm::hash_code masked_scatter::computePropertiesHash(const Properties &prop) {
6977 using llvm::hash_value;
6978 return llvm::hash_combine(
6979 args: llvm::hash_value(ptr: prop.access_groups.getAsOpaquePointer()),
6980 args: llvm::hash_value(ptr: prop.alias_scopes.getAsOpaquePointer()),
6981 args: llvm::hash_value(ptr: prop.alignment.getAsOpaquePointer()),
6982 args: llvm::hash_value(ptr: prop.noalias_scopes.getAsOpaquePointer()),
6983 args: llvm::hash_value(ptr: prop.tbaa.getAsOpaquePointer()));
6984}
6985
6986std::optional<mlir::Attribute> masked_scatter::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
6987 if (name == "access_groups")
6988 return prop.access_groups;
6989
6990 if (name == "alias_scopes")
6991 return prop.alias_scopes;
6992
6993 if (name == "alignment")
6994 return prop.alignment;
6995
6996 if (name == "noalias_scopes")
6997 return prop.noalias_scopes;
6998
6999 if (name == "tbaa")
7000 return prop.tbaa;
7001 return std::nullopt;
7002}
7003
7004void masked_scatter::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
7005 if (name == "access_groups") {
7006 prop.access_groups = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.access_groups)>>(Val&: value);
7007 return;
7008 }
7009
7010 if (name == "alias_scopes") {
7011 prop.alias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alias_scopes)>>(Val&: value);
7012 return;
7013 }
7014
7015 if (name == "alignment") {
7016 prop.alignment = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.alignment)>>(Val&: value);
7017 return;
7018 }
7019
7020 if (name == "noalias_scopes") {
7021 prop.noalias_scopes = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.noalias_scopes)>>(Val&: value);
7022 return;
7023 }
7024
7025 if (name == "tbaa") {
7026 prop.tbaa = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.tbaa)>>(Val&: value);
7027 return;
7028 }
7029}
7030
7031void masked_scatter::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
7032 if (prop.access_groups) {
7033 ::mlir::Attribute value = prop.access_groups;
7034 ::mlir::Attribute originalValue = value;
7035 visitor("access_groups", value);
7036 if (value != originalValue)
7037 setInherentAttr(prop, name: "access_groups", value);
7038 }
7039
7040 if (prop.alias_scopes) {
7041 ::mlir::Attribute value = prop.alias_scopes;
7042 ::mlir::Attribute originalValue = value;
7043 visitor("alias_scopes", value);
7044 if (value != originalValue)
7045 setInherentAttr(prop, name: "alias_scopes", value);
7046 }
7047
7048 if (prop.alignment) {
7049 ::mlir::Attribute value = prop.alignment;
7050 ::mlir::Attribute originalValue = value;
7051 visitor("alignment", value);
7052 if (value != originalValue)
7053 setInherentAttr(prop, name: "alignment", value);
7054 }
7055
7056 if (prop.noalias_scopes) {
7057 ::mlir::Attribute value = prop.noalias_scopes;
7058 ::mlir::Attribute originalValue = value;
7059 visitor("noalias_scopes", value);
7060 if (value != originalValue)
7061 setInherentAttr(prop, name: "noalias_scopes", value);
7062 }
7063
7064 if (prop.tbaa) {
7065 ::mlir::Attribute value = prop.tbaa;
7066 ::mlir::Attribute originalValue = value;
7067 visitor("tbaa", value);
7068 if (value != originalValue)
7069 setInherentAttr(prop, name: "tbaa", value);
7070 }
7071}
7072
7073::llvm::LogicalResult masked_scatter::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7074 {
7075 ::mlir::Attribute attr = attrs.get(name: getAccessGroupsAttrName(name: opName));
7076 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(attr, attrName: "access_groups", emitError)))
7077 return ::mlir::failure();
7078 }
7079
7080 {
7081 ::mlir::Attribute attr = attrs.get(name: getAliasScopesAttrName(name: opName));
7082 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName: "alias_scopes", emitError)))
7083 return ::mlir::failure();
7084 }
7085
7086 {
7087 ::mlir::Attribute attr = attrs.get(name: getAlignmentAttrName(name: opName));
7088 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(attr, attrName: "alignment", emitError)))
7089 return ::mlir::failure();
7090 }
7091
7092 {
7093 ::mlir::Attribute attr = attrs.get(name: getNoaliasScopesAttrName(name: opName));
7094 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(attr, attrName: "noalias_scopes", emitError)))
7095 return ::mlir::failure();
7096 }
7097
7098 {
7099 ::mlir::Attribute attr = attrs.get(name: getTbaaAttrName(name: opName));
7100 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(attr, attrName: "tbaa", emitError)))
7101 return ::mlir::failure();
7102 }
7103 return ::mlir::success();
7104}
7105
7106::llvm::LogicalResult masked_scatter::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
7107 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
7108 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.access_groups)))
7109 return ::mlir::failure();
7110
7111 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.alias_scopes)))
7112 return ::mlir::failure();
7113
7114 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.alignment)))
7115 return ::mlir::failure();
7116
7117 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.noalias_scopes)))
7118 return ::mlir::failure();
7119
7120 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.tbaa)))
7121 return ::mlir::failure();
7122 return ::mlir::success();
7123}
7124
7125void masked_scatter::writeProperties(::mlir::DialectBytecodeWriter &writer) {
7126 auto &prop = getProperties(); (void)prop;
7127
7128 writer.writeOptionalAttribute(attr: prop.access_groups);
7129
7130 writer.writeOptionalAttribute(attr: prop.alias_scopes);
7131
7132 writer.writeOptionalAttribute(attr: prop.alignment);
7133
7134 writer.writeOptionalAttribute(attr: prop.noalias_scopes);
7135
7136 writer.writeOptionalAttribute(attr: prop.tbaa);
7137}
7138
7139::std::optional<uint64_t> masked_scatter::getAlignment() {
7140 auto attr = getAlignmentAttr();
7141 return attr ? ::std::optional<uint64_t>(attr.getValue().getZExtValue()) : (::std::nullopt);
7142}
7143
7144::std::optional< ::mlir::ArrayAttr > masked_scatter::getAccessGroups() {
7145 auto attr = getAccessGroupsAttr();
7146 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
7147}
7148
7149::std::optional< ::mlir::ArrayAttr > masked_scatter::getAliasScopes() {
7150 auto attr = getAliasScopesAttr();
7151 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
7152}
7153
7154::std::optional< ::mlir::ArrayAttr > masked_scatter::getNoaliasScopes() {
7155 auto attr = getNoaliasScopesAttr();
7156 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
7157}
7158
7159::std::optional< ::mlir::ArrayAttr > masked_scatter::getTbaa() {
7160 auto attr = getTbaaAttr();
7161 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
7162}
7163
7164void masked_scatter::setAlignment(::std::optional<uint64_t> attrValue) {
7165 auto &odsProp = getProperties().alignment;
7166 if (attrValue)
7167 odsProp = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 64), value: *attrValue);
7168 else
7169 odsProp = nullptr;
7170}
7171
7172void masked_scatter::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
7173 assert(isCompatibleType(resultType) && "result must be an LLVM type");
7174 assert(::llvm::isa<LLVMVoidType>(resultType) &&
7175 "for zero-result operands, only 'void' is accepted as result type");
7176 build(odsBuilder, odsState, operands, attributes);
7177
7178}
7179
7180masked_scatter masked_scatter::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
7181 ::mlir::OperationState __state__(location, getOperationName());
7182 build(odsBuilder&: builder, odsState&: __state__, resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7183 auto __res__ = builder.create(state: __state__);
7184 assert((::llvm::isa<masked_scatter>(__res__)) && "builder didn't return the right type");
7185 return ::llvm::cast<masked_scatter>(Val: __res__);
7186}
7187
7188masked_scatter masked_scatter::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
7189 return create(builder, location: builder.getLoc(), resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7190}
7191
7192void masked_scatter::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
7193 odsState.addOperands(newOperands: operands);
7194 for (auto namedAttr : attributes)
7195 odsState.addAttribute(name: namedAttr.getName(), attr: namedAttr.getValue());
7196
7197}
7198
7199masked_scatter masked_scatter::create(::mlir::OpBuilder &builder, ::mlir::Location location, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
7200 ::mlir::OperationState __state__(location, getOperationName());
7201 build(odsBuilder&: builder, odsState&: __state__, operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7202 auto __res__ = builder.create(state: __state__);
7203 assert((::llvm::isa<masked_scatter>(__res__)) && "builder didn't return the right type");
7204 return ::llvm::cast<masked_scatter>(Val: __res__);
7205}
7206
7207masked_scatter masked_scatter::create(::mlir::ImplicitLocOpBuilder &builder, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
7208 return create(builder, location: builder.getLoc(), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
7209}
7210
7211void masked_scatter::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value value, Value ptrs, Value mask, uint64_t alignment) {
7212 build(odsBuilder, odsState, value, ptrs, mask,
7213 alignment: odsBuilder.getI64IntegerAttr(value: alignment),
7214 /*access_groups=*/access_groups: nullptr, /*alias_scopes=*/alias_scopes: nullptr,
7215 /*noalias_scopes=*/noalias_scopes: nullptr, /*tbaa=*/tbaa: nullptr);
7216
7217}
7218
7219masked_scatter masked_scatter::create(::mlir::OpBuilder &builder, ::mlir::Location location, Value value, Value ptrs, Value mask, uint64_t alignment) {
7220 ::mlir::OperationState __state__(location, getOperationName());
7221 build(odsBuilder&: builder, odsState&: __state__, value: std::forward<decltype(value)>(t&: value), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment));
7222 auto __res__ = builder.create(state: __state__);
7223 assert((::llvm::isa<masked_scatter>(__res__)) && "builder didn't return the right type");
7224 return ::llvm::cast<masked_scatter>(Val: __res__);
7225}
7226
7227masked_scatter masked_scatter::create(::mlir::ImplicitLocOpBuilder &builder, Value value, Value ptrs, Value mask, uint64_t alignment) {
7228 return create(builder, location: builder.getLoc(), value: std::forward<decltype(value)>(t&: value), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment));
7229}
7230
7231void masked_scatter::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
7232 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, value, ptrs, mask, alignment, access_groups, alias_scopes, noalias_scopes, tbaa);
7233}
7234
7235masked_scatter masked_scatter::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
7236 ::mlir::OperationState __state__(location, getOperationName());
7237 build(odsBuilder&: builder, odsState&: __state__, value: std::forward<decltype(value)>(t&: value), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
7238 auto __res__ = builder.create(state: __state__);
7239 assert((::llvm::isa<masked_scatter>(__res__)) && "builder didn't return the right type");
7240 return ::llvm::cast<masked_scatter>(Val: __res__);
7241}
7242
7243masked_scatter masked_scatter::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
7244 return create(builder, location: builder.getLoc(), value: std::forward<decltype(value)>(t&: value), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
7245}
7246
7247void masked_scatter::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
7248 auto &odsProperties = odsState.getOrAddProperties<Properties>();
7249 odsState.addOperands(newOperands: value);
7250 odsState.addOperands(newOperands: ptrs);
7251 odsState.addOperands(newOperands: mask);
7252 if (alignment) {
7253 odsProperties.alignment = alignment;
7254 }
7255 if (access_groups) {
7256 odsProperties.access_groups = access_groups;
7257 }
7258 if (alias_scopes) {
7259 odsProperties.alias_scopes = alias_scopes;
7260 }
7261 if (noalias_scopes) {
7262 odsProperties.noalias_scopes = noalias_scopes;
7263 }
7264 if (tbaa) {
7265 odsProperties.tbaa = tbaa;
7266 }
7267 assert(resultTypes.size() == 0u && "mismatched number of results");
7268 odsState.addTypes(newTypes&: resultTypes);
7269}
7270
7271masked_scatter masked_scatter::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
7272 ::mlir::OperationState __state__(location, getOperationName());
7273 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), value: std::forward<decltype(value)>(t&: value), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
7274 auto __res__ = builder.create(state: __state__);
7275 assert((::llvm::isa<masked_scatter>(__res__)) && "builder didn't return the right type");
7276 return ::llvm::cast<masked_scatter>(Val: __res__);
7277}
7278
7279masked_scatter masked_scatter::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, /*optional*/::mlir::IntegerAttr alignment, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa) {
7280 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), value: std::forward<decltype(value)>(t&: value), ptrs: std::forward<decltype(ptrs)>(t&: ptrs), mask: std::forward<decltype(mask)>(t&: mask), alignment: std::forward<decltype(alignment)>(t&: alignment), access_groups: std::forward<decltype(access_groups)>(t&: access_groups), alias_scopes: std::forward<decltype(alias_scopes)>(t&: alias_scopes), noalias_scopes: std::forward<decltype(noalias_scopes)>(t&: noalias_scopes), tbaa: std::forward<decltype(tbaa)>(t&: tbaa));
7281}
7282
7283void masked_scatter::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7284 assert(operands.size() == 3u && "mismatched number of parameters");
7285 odsState.addOperands(newOperands: operands);
7286 buildPropertiesAndDiscardableAttributes(odsState, attributes);
7287 assert(resultTypes.size() == 0u && "mismatched number of return types");
7288 odsState.addTypes(newTypes&: resultTypes);
7289}
7290
7291masked_scatter masked_scatter::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7292LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
7293
7294 ::mlir::OperationState __state__(location, getOperationName());
7295 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));
7296 auto __res__ = builder.create(state: __state__);
7297 assert((::llvm::isa<masked_scatter>(__res__)) && "builder didn't return the right type");
7298 return ::llvm::cast<masked_scatter>(Val: __res__);
7299LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
7300}
7301
7302masked_scatter masked_scatter::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7303LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
7304
7305 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));
7306LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
7307}
7308
7309void masked_scatter::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7310 assert(operands.size() == 3u && "mismatched number of parameters");
7311 odsState.addOperands(newOperands: operands);
7312 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
7313 odsState.addAttributes(newAttributes: discardableAttributes);
7314 assert(resultTypes.size() == 0u && "mismatched number of return types");
7315 odsState.addTypes(newTypes&: resultTypes);
7316}
7317
7318masked_scatter masked_scatter::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7319 ::mlir::OperationState __state__(location, getOperationName());
7320 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));
7321 auto __res__ = builder.create(state: __state__);
7322 assert((::llvm::isa<masked_scatter>(__res__)) && "builder didn't return the right type");
7323 return ::llvm::cast<masked_scatter>(Val: __res__);
7324}
7325
7326masked_scatter masked_scatter::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7327 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));
7328}
7329
7330::llvm::LogicalResult masked_scatter::verifyInvariantsImpl() {
7331 auto tblgen_access_groups = getProperties().access_groups; (void)tblgen_access_groups;
7332 auto tblgen_alias_scopes = getProperties().alias_scopes; (void)tblgen_alias_scopes;
7333 auto tblgen_alignment = getProperties().alignment; (void)tblgen_alignment;
7334 auto tblgen_noalias_scopes = getProperties().noalias_scopes; (void)tblgen_noalias_scopes;
7335 auto tblgen_tbaa = getProperties().tbaa; (void)tblgen_tbaa;
7336
7337 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, attr: tblgen_alignment, attrName: "alignment")))
7338 return ::mlir::failure();
7339
7340 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps3(op: *this, attr: tblgen_access_groups, attrName: "access_groups")))
7341 return ::mlir::failure();
7342
7343 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, attr: tblgen_alias_scopes, attrName: "alias_scopes")))
7344 return ::mlir::failure();
7345
7346 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, attr: tblgen_noalias_scopes, attrName: "noalias_scopes")))
7347 return ::mlir::failure();
7348
7349 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, attr: tblgen_tbaa, attrName: "tbaa")))
7350 return ::mlir::failure();
7351 {
7352 unsigned index = 0; (void)index;
7353 auto valueGroup0 = getODSOperands(index: 0);
7354
7355 for (auto v : valueGroup0) {
7356 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7357 return ::mlir::failure();
7358 }
7359 auto valueGroup1 = getODSOperands(index: 1);
7360
7361 for (auto v : valueGroup1) {
7362 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps7(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7363 return ::mlir::failure();
7364 }
7365 auto valueGroup2 = getODSOperands(index: 2);
7366
7367 for (auto v : valueGroup2) {
7368 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps4(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7369 return ::mlir::failure();
7370 }
7371 }
7372 return ::mlir::success();
7373}
7374
7375::llvm::LogicalResult masked_scatter::verifyInvariants() {
7376 if(::mlir::succeeded(Result: verifyInvariantsImpl()) && ::mlir::succeeded(Result: verify()))
7377 return ::mlir::success();
7378 return ::mlir::failure();
7379}
7380
7381::mlir::ParseResult masked_scatter::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7382 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
7383 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
7384 (void)valueOperandsLoc;
7385 ::mlir::OpAsmParser::UnresolvedOperand ptrsRawOperand{};
7386 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> ptrsOperands(&ptrsRawOperand, 1); ::llvm::SMLoc ptrsOperandsLoc;
7387 (void)ptrsOperandsLoc;
7388 ::mlir::OpAsmParser::UnresolvedOperand maskRawOperand{};
7389 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> maskOperands(&maskRawOperand, 1); ::llvm::SMLoc maskOperandsLoc;
7390 (void)maskOperandsLoc;
7391 ::mlir::IntegerAttr alignmentAttr;
7392 ::mlir::Type valueRawType{};
7393 ::llvm::ArrayRef<::mlir::Type> valueTypes(&valueRawType, 1);
7394 ::mlir::Type maskRawType{};
7395 ::llvm::ArrayRef<::mlir::Type> maskTypes(&maskRawType, 1);
7396 ::mlir::Type ptrsRawType{};
7397 ::llvm::ArrayRef<::mlir::Type> ptrsTypes(&ptrsRawType, 1);
7398 if (parser.parseLParen())
7399 return ::mlir::failure();
7400
7401 valueOperandsLoc = parser.getCurrentLocation();
7402 if (parser.parseOperand(result&: valueRawOperand))
7403 return ::mlir::failure();
7404 if (parser.parseComma())
7405 return ::mlir::failure();
7406
7407 ptrsOperandsLoc = parser.getCurrentLocation();
7408 if (parser.parseOperand(result&: ptrsRawOperand))
7409 return ::mlir::failure();
7410 if (parser.parseComma())
7411 return ::mlir::failure();
7412
7413 maskOperandsLoc = parser.getCurrentLocation();
7414 if (parser.parseOperand(result&: maskRawOperand))
7415 return ::mlir::failure();
7416 if (parser.parseRParen())
7417 return ::mlir::failure();
7418 if (::mlir::succeeded(Result: parser.parseOptionalComma())) {
7419 if (parser.parseKeyword(keyword: "alignment"))
7420 return ::mlir::failure();
7421 if (parser.parseLParen())
7422 return ::mlir::failure();
7423
7424 if (parser.parseCustomAttributeWithFallback(result&: alignmentAttr, type: parser.getBuilder().getIntegerType(width: 64))) {
7425 return ::mlir::failure();
7426 }
7427 if (alignmentAttr) result.getOrAddProperties<masked_scatter::Properties>().alignment = alignmentAttr;
7428 if (parser.parseRParen())
7429 return ::mlir::failure();
7430 }
7431 if (parseProperties(parser, result))
7432 return ::mlir::failure();
7433 {
7434 auto loc = parser.getCurrentLocation();(void)loc;
7435 if (parser.parseOptionalAttrDict(result&: result.attributes))
7436 return ::mlir::failure();
7437 if (result.attributes.get(name: "alignment"))
7438 return parser.emitError(loc, message: "inherent attribute 'alignment' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
7439 if (result.attributes.get(name: "access_groups"))
7440 return parser.emitError(loc, message: "inherent attribute 'access_groups' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
7441 if (result.attributes.get(name: "alias_scopes"))
7442 return parser.emitError(loc, message: "inherent attribute 'alias_scopes' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
7443 if (result.attributes.get(name: "noalias_scopes"))
7444 return parser.emitError(loc, message: "inherent attribute 'noalias_scopes' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
7445 if (result.attributes.get(name: "tbaa"))
7446 return parser.emitError(loc, message: "inherent attribute 'tbaa' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
7447 }
7448 if (parser.parseColon())
7449 return ::mlir::failure();
7450
7451 {
7452 ::mlir::VectorType type;
7453 if (parser.parseCustomTypeWithFallback(result&: type))
7454 return ::mlir::failure();
7455 valueRawType = type;
7456 }
7457 if (parser.parseComma())
7458 return ::mlir::failure();
7459
7460 {
7461 ::mlir::VectorType type;
7462 if (parser.parseCustomTypeWithFallback(result&: type))
7463 return ::mlir::failure();
7464 maskRawType = type;
7465 }
7466 if (parser.parseKeyword(keyword: "into"))
7467 return ::mlir::failure();
7468
7469 {
7470 ::mlir::VectorType type;
7471 if (parser.parseCustomTypeWithFallback(result&: type))
7472 return ::mlir::failure();
7473 ptrsRawType = type;
7474 }
7475 // coverity[ARRAY_VS_SINGLETON]
7476 if (parser.resolveOperands(operands&: valueOperands, types&: valueTypes, loc: valueOperandsLoc, result&: result.operands))
7477 return ::mlir::failure();
7478 // coverity[ARRAY_VS_SINGLETON]
7479 if (parser.resolveOperands(operands&: ptrsOperands, types&: ptrsTypes, loc: ptrsOperandsLoc, result&: result.operands))
7480 return ::mlir::failure();
7481 // coverity[ARRAY_VS_SINGLETON]
7482 if (parser.resolveOperands(operands&: maskOperands, types&: maskTypes, loc: maskOperandsLoc, result&: result.operands))
7483 return ::mlir::failure();
7484 return ::mlir::success();
7485}
7486
7487::llvm::LogicalResult masked_scatter::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7488 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7489 if (!dict) {
7490 emitError() << "expected DictionaryAttr to set properties";
7491 return ::mlir::failure();
7492 }
7493 // keep track of used keys in the input dictionary to be able to error out
7494 // if there are some unknown ones.
7495 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
7496 ::mlir::MLIRContext *ctx = dict.getContext();
7497 (void)ctx;
7498 {
7499
7500 auto &propStorage = prop.access_groups;
7501 auto access_groupsAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "access_groups");
7502 auto attr = dict.get(name: access_groupsAttrName);
7503 usedKeys.insert(V: access_groupsAttrName);
7504 if (attr || /*isRequired=*/false) {
7505 if (!attr) {
7506 emitError() << "expected key entry for access_groups in DictionaryAttr to set "
7507 "Properties.";
7508 return ::mlir::failure();
7509 }
7510 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
7511 if (convertedAttr) {
7512 propStorage = convertedAttr;
7513 } else {
7514 emitError() << "Invalid attribute `access_groups` in property conversion: " << attr;
7515 return ::mlir::failure();
7516 }
7517 }
7518 }
7519 {
7520
7521 auto &propStorage = prop.alias_scopes;
7522 auto alias_scopesAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "alias_scopes");
7523 auto attr = dict.get(name: alias_scopesAttrName);
7524 usedKeys.insert(V: alias_scopesAttrName);
7525 if (attr || /*isRequired=*/false) {
7526 if (!attr) {
7527 emitError() << "expected key entry for alias_scopes in DictionaryAttr to set "
7528 "Properties.";
7529 return ::mlir::failure();
7530 }
7531 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
7532 if (convertedAttr) {
7533 propStorage = convertedAttr;
7534 } else {
7535 emitError() << "Invalid attribute `alias_scopes` in property conversion: " << attr;
7536 return ::mlir::failure();
7537 }
7538 }
7539 }
7540 {
7541
7542 auto &propStorage = prop.noalias_scopes;
7543 auto noalias_scopesAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "noalias_scopes");
7544 auto attr = dict.get(name: noalias_scopesAttrName);
7545 usedKeys.insert(V: noalias_scopesAttrName);
7546 if (attr || /*isRequired=*/false) {
7547 if (!attr) {
7548 emitError() << "expected key entry for noalias_scopes in DictionaryAttr to set "
7549 "Properties.";
7550 return ::mlir::failure();
7551 }
7552 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
7553 if (convertedAttr) {
7554 propStorage = convertedAttr;
7555 } else {
7556 emitError() << "Invalid attribute `noalias_scopes` in property conversion: " << attr;
7557 return ::mlir::failure();
7558 }
7559 }
7560 }
7561 {
7562
7563 auto &propStorage = prop.tbaa;
7564 auto tbaaAttrName = ::mlir::StringAttr::get(context: ctx, bytes: "tbaa");
7565 auto attr = dict.get(name: tbaaAttrName);
7566 usedKeys.insert(V: tbaaAttrName);
7567 if (attr || /*isRequired=*/false) {
7568 if (!attr) {
7569 emitError() << "expected key entry for tbaa in DictionaryAttr to set "
7570 "Properties.";
7571 return ::mlir::failure();
7572 }
7573 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(Val&: attr);
7574 if (convertedAttr) {
7575 propStorage = convertedAttr;
7576 } else {
7577 emitError() << "Invalid attribute `tbaa` in property conversion: " << attr;
7578 return ::mlir::failure();
7579 }
7580 }
7581 }
7582
7583 for (::mlir::NamedAttribute attr : dict) {
7584 if (!usedKeys.contains(V: attr.getName()))
7585 return emitError() << "unknown key '" << attr.getName() <<
7586 "' when parsing properties dictionary";
7587 }
7588 return ::mlir::success();
7589}
7590
7591::mlir::ParseResult masked_scatter::parsePropertiesFromKeyValueList(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
7592 auto &prop = result.getOrAddProperties<Properties>();
7593 (void)prop;
7594 bool seen_access_groups = false;
7595 bool seen_alias_scopes = false;
7596 bool seen_noalias_scopes = false;
7597 bool seen_tbaa = false;
7598
7599 if (succeeded(Result: parser.parseOptionalLess())) {
7600 ::llvm::SMLoc dictionaryLoc = parser.getCurrentLocation();
7601 ::mlir::NamedAttrList propertyAttributes;
7602 if (parser.parseOptionalAttrDict(result&: propertyAttributes))
7603 return ::mlir::failure();
7604 if (dictionaryLoc != parser.getCurrentLocation()) {
7605 if (parser.parseGreater())
7606 return ::mlir::failure();
7607 auto propertyDictionary =
7608 ::mlir::DictionaryAttr::get(context: parser.getContext(), value: propertyAttributes);
7609 return setPropertiesFromParsedAttr(prop, attr: propertyDictionary, emitError: [&]() {
7610 return parser.emitError(loc: dictionaryLoc)
7611 << "invalid properties " << propertyDictionary << ": ";
7612 });
7613 }
7614
7615 bool reachedEnd = succeeded(Result: parser.parseOptionalGreater());
7616 while (!reachedEnd) {
7617 ::llvm::SMLoc keyLoc = parser.getCurrentLocation();
7618 ::llvm::StringRef key;
7619 if (parser.parseKeyword(keyword: &key))
7620 return ::mlir::failure();
7621 if (parser.parseEqual())
7622 return ::mlir::failure();
7623 if (!seen_access_groups && key == "access_groups") {
7624 seen_access_groups = true;
7625 ::mlir::ArrayAttr access_groupsAttr;
7626
7627 if (parser.parseCustomAttributeWithFallback(result&: access_groupsAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
7628 return ::mlir::failure();
7629 }
7630 if (access_groupsAttr) result.getOrAddProperties<masked_scatter::Properties>().access_groups = access_groupsAttr;
7631 }
7632 else if (!seen_alias_scopes && key == "alias_scopes") {
7633 seen_alias_scopes = true;
7634 ::mlir::ArrayAttr alias_scopesAttr;
7635
7636 if (parser.parseCustomAttributeWithFallback(result&: alias_scopesAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
7637 return ::mlir::failure();
7638 }
7639 if (alias_scopesAttr) result.getOrAddProperties<masked_scatter::Properties>().alias_scopes = alias_scopesAttr;
7640 }
7641 else if (!seen_noalias_scopes && key == "noalias_scopes") {
7642 seen_noalias_scopes = true;
7643 ::mlir::ArrayAttr noalias_scopesAttr;
7644
7645 if (parser.parseCustomAttributeWithFallback(result&: noalias_scopesAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
7646 return ::mlir::failure();
7647 }
7648 if (noalias_scopesAttr) result.getOrAddProperties<masked_scatter::Properties>().noalias_scopes = noalias_scopesAttr;
7649 }
7650 else if (!seen_tbaa && key == "tbaa") {
7651 seen_tbaa = true;
7652 ::mlir::ArrayAttr tbaaAttr;
7653
7654 if (parser.parseCustomAttributeWithFallback(result&: tbaaAttr, type: parser.getBuilder().getType<::mlir::NoneType>())) {
7655 return ::mlir::failure();
7656 }
7657 if (tbaaAttr) result.getOrAddProperties<masked_scatter::Properties>().tbaa = tbaaAttr;
7658 }
7659
7660 else {
7661 return parser.emitError(
7662 loc: keyLoc,
7663 message: "duplicate or unknown property in properties dictionary: ")
7664 << key;
7665 }
7666
7667 reachedEnd = succeeded(Result: parser.parseOptionalGreater());
7668 if (!reachedEnd && parser.parseComma())
7669 return ::mlir::failure();
7670 }
7671 }
7672 return ::mlir::success();
7673}
7674
7675LLVM_ATTRIBUTE_MINSIZE void masked_scatter::print(::mlir::OpAsmPrinter &_odsPrinter) {
7676 _odsPrinter << "(";
7677 _odsPrinter << getValue();
7678 _odsPrinter << ",";
7679 _odsPrinter << ' ';
7680 _odsPrinter << getPtrs();
7681 _odsPrinter << ",";
7682 _odsPrinter << ' ';
7683 _odsPrinter << getMask();
7684 _odsPrinter << ")";
7685 if (getAlignmentAttr()) {
7686 _odsPrinter << ",";
7687 _odsPrinter << " alignment";
7688 _odsPrinter << "(";
7689 _odsPrinter.printAttributeWithoutType(attr: getAlignmentAttr());
7690 _odsPrinter << ")";
7691 }
7692 ::llvm::SmallVector<::llvm::StringRef, 2> elidedProps;
7693 elidedProps.push_back(Elt: "alignment");
7694 printProperties(ctx: (*this)->getContext(), p&: _odsPrinter, properties: getProperties(), elidedProps);
7695 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
7696 _odsPrinter << " :";
7697 _odsPrinter << ' ';
7698 {
7699 auto type = getValue().getType();
7700 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
7701 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
7702 else
7703 _odsPrinter << type;
7704 }
7705 _odsPrinter << ",";
7706 _odsPrinter << ' ';
7707 {
7708 auto type = getMask().getType();
7709 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
7710 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
7711 else
7712 _odsPrinter << type;
7713 }
7714 _odsPrinter << " into";
7715 _odsPrinter << ' ';
7716 {
7717 auto type = getPtrs().getType();
7718 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
7719 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
7720 else
7721 _odsPrinter << type;
7722 }
7723}
7724
7725void masked_scatter::_odsPrintPropertiesAsKeyValueList(::mlir::MLIRContext *_odsContext, ::mlir::OpAsmPrinter &_odsPrinter, const Properties &prop, ::mlir::ArrayRef<::llvm::StringRef> elidedProps) {
7726 bool first = true;
7727 auto printKey = [&](::llvm::StringRef name, bool printValue) {
7728 _odsPrinter << (first ? " <" : ", ") << name;
7729 if (printValue)
7730 _odsPrinter << " = ";
7731 first = false;
7732 };
7733 auto shouldPrint = [&](::llvm::StringRef name) {
7734 return !::llvm::is_contained(Range&: elidedProps, Element: name);
7735 };
7736 if (shouldPrint("alignment") && prop.alignment) {
7737 printKey("alignment", /*printValue=*/true);
7738 _odsPrinter.printAttributeWithoutType(attr: prop.alignment);
7739 }
7740 if (shouldPrint("access_groups") && prop.access_groups) {
7741 printKey("access_groups", /*printValue=*/true);
7742 _odsPrinter.printAttributeWithoutType(attr: prop.access_groups);
7743 }
7744 if (shouldPrint("alias_scopes") && prop.alias_scopes) {
7745 printKey("alias_scopes", /*printValue=*/true);
7746 _odsPrinter.printAttributeWithoutType(attr: prop.alias_scopes);
7747 }
7748 if (shouldPrint("noalias_scopes") && prop.noalias_scopes) {
7749 printKey("noalias_scopes", /*printValue=*/true);
7750 _odsPrinter.printAttributeWithoutType(attr: prop.noalias_scopes);
7751 }
7752 if (shouldPrint("tbaa") && prop.tbaa) {
7753 printKey("tbaa", /*printValue=*/true);
7754 _odsPrinter.printAttributeWithoutType(attr: prop.tbaa);
7755 }
7756 if (!first)
7757 _odsPrinter << ">";
7758}
7759
7760void masked_scatter::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7761 Properties &properties = odsState.getOrAddProperties<Properties>();
7762 populateDefaultProperties(opName: odsState.name, properties);
7763 const ::llvm::StringRef inherentNames[] = {"alignment", "access_groups", "alias_scopes", "noalias_scopes", "tbaa"};
7764 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
7765 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
7766 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
7767 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
7768 });
7769}
7770
7771
7772} // namespace mlir::LLVM
7773MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::masked_scatter)
7774MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::masked_scatterGenericAdaptorBase::Properties)
7775
7776namespace mlir::LLVM {
7777
7778
7779//===----------------------------------------------------------------------===//
7780// ::mlir::LLVM::vector_deinterleave2 definitions
7781//===----------------------------------------------------------------------===//
7782
7783namespace detail {
7784
7785vector_deinterleave2GenericAdaptorBase::vector_deinterleave2GenericAdaptorBase(vector_deinterleave2 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
7786
7787
7788} // namespace detail
7789vector_deinterleave2Adaptor::vector_deinterleave2Adaptor(vector_deinterleave2 op) : vector_deinterleave2GenericAdaptor(op->getOperands(), op) {}
7790
7791::llvm::LogicalResult vector_deinterleave2Adaptor::verify(::mlir::Location loc) {
7792 return ::mlir::success();
7793}
7794
7795::llvm::LogicalResult vector_deinterleave2::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7796 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7797 if (!dict) {
7798 emitError() << "expected DictionaryAttr to set properties";
7799 return ::mlir::failure();
7800 }
7801 return ::mlir::success();
7802}
7803
7804::mlir::Attribute vector_deinterleave2::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
7805 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
7806 ::mlir::Builder odsBuilder{ctx};
7807
7808 if (!attrs.empty())
7809 return odsBuilder.getDictionaryAttr(value: attrs);
7810 return {};
7811}
7812
7813llvm::hash_code vector_deinterleave2::computePropertiesHash(const Properties &prop) {
7814 using llvm::hash_value;
7815 return llvm::hash_combine();
7816}
7817
7818std::optional<mlir::Attribute> vector_deinterleave2::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
7819 return std::nullopt;
7820}
7821
7822void vector_deinterleave2::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
7823}
7824
7825void vector_deinterleave2::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
7826}
7827
7828::llvm::LogicalResult vector_deinterleave2::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7829 return ::mlir::success();
7830}
7831
7832void vector_deinterleave2::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value vec) {
7833 odsState.addOperands(newOperands: vec);
7834 odsState.addTypes(newTypes: res);
7835}
7836
7837vector_deinterleave2 vector_deinterleave2::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vec) {
7838 ::mlir::OperationState __state__(location, getOperationName());
7839 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), vec: std::forward<decltype(vec)>(t&: vec));
7840 auto __res__ = builder.create(state: __state__);
7841 assert((::llvm::isa<vector_deinterleave2>(__res__)) && "builder didn't return the right type");
7842 return ::llvm::cast<vector_deinterleave2>(Val: __res__);
7843}
7844
7845vector_deinterleave2 vector_deinterleave2::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vec) {
7846 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), vec: std::forward<decltype(vec)>(t&: vec));
7847}
7848
7849void vector_deinterleave2::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vec) {
7850 odsState.addOperands(newOperands: vec);
7851 assert(resultTypes.size() == 1u && "mismatched number of results");
7852 odsState.addTypes(newTypes&: resultTypes);
7853}
7854
7855vector_deinterleave2 vector_deinterleave2::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vec) {
7856 ::mlir::OperationState __state__(location, getOperationName());
7857 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vec: std::forward<decltype(vec)>(t&: vec));
7858 auto __res__ = builder.create(state: __state__);
7859 assert((::llvm::isa<vector_deinterleave2>(__res__)) && "builder didn't return the right type");
7860 return ::llvm::cast<vector_deinterleave2>(Val: __res__);
7861}
7862
7863vector_deinterleave2 vector_deinterleave2::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vec) {
7864 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vec: std::forward<decltype(vec)>(t&: vec));
7865}
7866
7867void vector_deinterleave2::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7868 assert(operands.size() == 1u && "mismatched number of parameters");
7869 odsState.addOperands(newOperands: operands);
7870 odsState.addAttributes(newAttributes: attributes);
7871 assert(resultTypes.size() == 1u && "mismatched number of return types");
7872 odsState.addTypes(newTypes&: resultTypes);
7873}
7874
7875vector_deinterleave2 vector_deinterleave2::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7876 ::mlir::OperationState __state__(location, getOperationName());
7877 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));
7878 auto __res__ = builder.create(state: __state__);
7879 assert((::llvm::isa<vector_deinterleave2>(__res__)) && "builder didn't return the right type");
7880 return ::llvm::cast<vector_deinterleave2>(Val: __res__);
7881}
7882
7883vector_deinterleave2 vector_deinterleave2::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
7884 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));
7885}
7886
7887void vector_deinterleave2::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7888 assert(operands.size() == 1u && "mismatched number of parameters");
7889 odsState.addOperands(newOperands: operands);
7890 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
7891 odsState.addAttributes(newAttributes: discardableAttributes);
7892 assert(resultTypes.size() == 1u && "mismatched number of return types");
7893 odsState.addTypes(newTypes&: resultTypes);
7894}
7895
7896vector_deinterleave2 vector_deinterleave2::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7897 ::mlir::OperationState __state__(location, getOperationName());
7898 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));
7899 auto __res__ = builder.create(state: __state__);
7900 assert((::llvm::isa<vector_deinterleave2>(__res__)) && "builder didn't return the right type");
7901 return ::llvm::cast<vector_deinterleave2>(Val: __res__);
7902}
7903
7904vector_deinterleave2 vector_deinterleave2::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
7905 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));
7906}
7907
7908::llvm::LogicalResult vector_deinterleave2::verifyInvariantsImpl() {
7909 {
7910 unsigned index = 0; (void)index;
7911 auto valueGroup0 = getODSOperands(index: 0);
7912
7913 for (auto v : valueGroup0) {
7914 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
7915 return ::mlir::failure();
7916 }
7917 }
7918 {
7919 unsigned index = 0; (void)index;
7920 auto valueGroup0 = getODSResults(index: 0);
7921
7922 for (auto v : valueGroup0) {
7923 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
7924 return ::mlir::failure();
7925 }
7926 }
7927 return ::mlir::success();
7928}
7929
7930::llvm::LogicalResult vector_deinterleave2::verifyInvariants() {
7931 return verifyInvariantsImpl();
7932}
7933
7934::llvm::LogicalResult vector_deinterleave2::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7935 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7936 if (!dict) {
7937 emitError() << "expected DictionaryAttr to set properties";
7938 return ::mlir::failure();
7939 }
7940 // keep track of used keys in the input dictionary to be able to error out
7941 // if there are some unknown ones.
7942 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
7943 ::mlir::MLIRContext *ctx = dict.getContext();
7944 (void)ctx;
7945
7946 for (::mlir::NamedAttribute attr : dict) {
7947 if (!usedKeys.contains(V: attr.getName()))
7948 return emitError() << "unknown key '" << attr.getName() <<
7949 "' when parsing properties dictionary";
7950 }
7951 return ::mlir::success();
7952}
7953
7954void vector_deinterleave2::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
7955}
7956
7957
7958} // namespace mlir::LLVM
7959MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_deinterleave2)
7960
7961namespace mlir::LLVM {
7962
7963
7964//===----------------------------------------------------------------------===//
7965// ::mlir::LLVM::vector_extract definitions
7966//===----------------------------------------------------------------------===//
7967
7968namespace detail {
7969
7970vector_extractGenericAdaptorBase::vector_extractGenericAdaptorBase(vector_extract op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
7971
7972uint64_t vector_extractGenericAdaptorBase::getPos() {
7973 auto attr = getPosAttr();
7974 return attr.getValue().getZExtValue();
7975}
7976
7977
7978} // namespace detail
7979vector_extractAdaptor::vector_extractAdaptor(vector_extract op) : vector_extractGenericAdaptor(op->getOperands(), op) {}
7980
7981::llvm::LogicalResult vector_extractAdaptor::verify(::mlir::Location loc) {
7982 auto tblgen_pos = getProperties().pos; (void)tblgen_pos;
7983 if (!tblgen_pos) return emitError(loc, message: "'llvm.intr.vector.extract' op requires attribute 'pos'");
7984
7985 if (tblgen_pos && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_pos))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_pos).getType().isSignlessInteger(width: 64)))))
7986 return emitError(loc, message: "'llvm.intr.vector.extract' op attribute 'pos' failed to satisfy constraint: 64-bit signless integer attribute");
7987 return ::mlir::success();
7988}
7989
7990::llvm::LogicalResult vector_extract::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
7991 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
7992 if (!dict) {
7993 emitError() << "expected DictionaryAttr to set properties";
7994 return ::mlir::failure();
7995 }
7996
7997 {
7998 auto attr = dict.get(name: "pos");
7999 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
8000 storage&: prop.pos, attr, name: "pos", emitError)))
8001 return ::mlir::failure();
8002 }
8003 return ::mlir::success();
8004}
8005
8006::mlir::Attribute vector_extract::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
8007 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
8008 ::mlir::Builder odsBuilder{ctx};
8009 ::mlir::detail::appendAttributeProperty(attrs, name: "pos", attr: prop.pos);
8010
8011 if (!attrs.empty())
8012 return odsBuilder.getDictionaryAttr(value: attrs);
8013 return {};
8014}
8015
8016llvm::hash_code vector_extract::computePropertiesHash(const Properties &prop) {
8017 using llvm::hash_value;
8018 return llvm::hash_combine(
8019 args: llvm::hash_value(ptr: prop.pos.getAsOpaquePointer()));
8020}
8021
8022std::optional<mlir::Attribute> vector_extract::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
8023 if (name == "pos")
8024 return prop.pos;
8025 return std::nullopt;
8026}
8027
8028void vector_extract::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
8029 if (name == "pos") {
8030 prop.pos = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.pos)>>(Val&: value);
8031 return;
8032 }
8033}
8034
8035void vector_extract::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
8036 if (prop.pos) {
8037 ::mlir::Attribute value = prop.pos;
8038 ::mlir::Attribute originalValue = value;
8039 visitor("pos", value);
8040 if (value != originalValue)
8041 setInherentAttr(prop, name: "pos", value);
8042 }
8043}
8044
8045::llvm::LogicalResult vector_extract::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8046 {
8047 ::mlir::Attribute attr = attrs.get(name: getPosAttrName(name: opName));
8048 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(attr, attrName: "pos", emitError)))
8049 return ::mlir::failure();
8050 }
8051 return ::mlir::success();
8052}
8053
8054::llvm::LogicalResult vector_extract::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
8055 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
8056 if (::mlir::failed(Result: reader.readAttribute(result&: prop.pos)))
8057 return ::mlir::failure();
8058 return ::mlir::success();
8059}
8060
8061void vector_extract::writeProperties(::mlir::DialectBytecodeWriter &writer) {
8062 auto &prop = getProperties(); (void)prop;
8063 writer.writeAttribute(attr: prop.pos);
8064}
8065
8066uint64_t vector_extract::getPos() {
8067 auto attr = getPosAttr();
8068 return attr.getValue().getZExtValue();
8069}
8070
8071void vector_extract::setPos(uint64_t attrValue) {
8072 getProperties().pos = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 64), value: attrValue);
8073}
8074
8075void vector_extract::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8076 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8077 odsState.addOperands(newOperands: srcvec);
8078 odsProperties.pos = pos;
8079 odsState.addTypes(newTypes: res);
8080}
8081
8082vector_extract vector_extract::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8083 ::mlir::OperationState __state__(location, getOperationName());
8084 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8085 auto __res__ = builder.create(state: __state__);
8086 assert((::llvm::isa<vector_extract>(__res__)) && "builder didn't return the right type");
8087 return ::llvm::cast<vector_extract>(Val: __res__);
8088}
8089
8090vector_extract vector_extract::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8091 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8092}
8093
8094void vector_extract::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8095 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8096 odsState.addOperands(newOperands: srcvec);
8097 odsProperties.pos = pos;
8098 assert(resultTypes.size() == 1u && "mismatched number of results");
8099 odsState.addTypes(newTypes&: resultTypes);
8100}
8101
8102vector_extract vector_extract::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8103 ::mlir::OperationState __state__(location, getOperationName());
8104 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8105 auto __res__ = builder.create(state: __state__);
8106 assert((::llvm::isa<vector_extract>(__res__)) && "builder didn't return the right type");
8107 return ::llvm::cast<vector_extract>(Val: __res__);
8108}
8109
8110vector_extract vector_extract::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8111 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8112}
8113
8114void vector_extract::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcvec, uint64_t pos) {
8115 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8116 odsState.addOperands(newOperands: srcvec);
8117 odsProperties.pos = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 64), value: pos);
8118 odsState.addTypes(newTypes: res);
8119}
8120
8121vector_extract vector_extract::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcvec, uint64_t pos) {
8122 ::mlir::OperationState __state__(location, getOperationName());
8123 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8124 auto __res__ = builder.create(state: __state__);
8125 assert((::llvm::isa<vector_extract>(__res__)) && "builder didn't return the right type");
8126 return ::llvm::cast<vector_extract>(Val: __res__);
8127}
8128
8129vector_extract vector_extract::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcvec, uint64_t pos) {
8130 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8131}
8132
8133void vector_extract::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, uint64_t pos) {
8134 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8135 odsState.addOperands(newOperands: srcvec);
8136 odsProperties.pos = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 64), value: pos);
8137 assert(resultTypes.size() == 1u && "mismatched number of results");
8138 odsState.addTypes(newTypes&: resultTypes);
8139}
8140
8141vector_extract vector_extract::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, uint64_t pos) {
8142 ::mlir::OperationState __state__(location, getOperationName());
8143 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8144 auto __res__ = builder.create(state: __state__);
8145 assert((::llvm::isa<vector_extract>(__res__)) && "builder didn't return the right type");
8146 return ::llvm::cast<vector_extract>(Val: __res__);
8147}
8148
8149vector_extract vector_extract::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, uint64_t pos) {
8150 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8151}
8152
8153void vector_extract::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8154 assert(operands.size() == 1u && "mismatched number of parameters");
8155 odsState.addOperands(newOperands: operands);
8156 buildPropertiesAndDiscardableAttributes(odsState, attributes);
8157 assert(resultTypes.size() == 1u && "mismatched number of return types");
8158 odsState.addTypes(newTypes&: resultTypes);
8159}
8160
8161vector_extract vector_extract::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8162LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8163
8164 ::mlir::OperationState __state__(location, getOperationName());
8165 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));
8166 auto __res__ = builder.create(state: __state__);
8167 assert((::llvm::isa<vector_extract>(__res__)) && "builder didn't return the right type");
8168 return ::llvm::cast<vector_extract>(Val: __res__);
8169LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8170}
8171
8172vector_extract vector_extract::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8173LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8174
8175 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));
8176LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8177}
8178
8179void vector_extract::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8180 assert(operands.size() == 1u && "mismatched number of parameters");
8181 odsState.addOperands(newOperands: operands);
8182 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
8183 odsState.addAttributes(newAttributes: discardableAttributes);
8184 assert(resultTypes.size() == 1u && "mismatched number of return types");
8185 odsState.addTypes(newTypes&: resultTypes);
8186}
8187
8188vector_extract vector_extract::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8189 ::mlir::OperationState __state__(location, getOperationName());
8190 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));
8191 auto __res__ = builder.create(state: __state__);
8192 assert((::llvm::isa<vector_extract>(__res__)) && "builder didn't return the right type");
8193 return ::llvm::cast<vector_extract>(Val: __res__);
8194}
8195
8196vector_extract vector_extract::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8197 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));
8198}
8199
8200::llvm::LogicalResult vector_extract::verifyInvariantsImpl() {
8201 auto tblgen_pos = getProperties().pos; (void)tblgen_pos;
8202 if (!tblgen_pos) return emitOpError(message: "requires attribute 'pos'");
8203
8204 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, attr: tblgen_pos, attrName: "pos")))
8205 return ::mlir::failure();
8206 {
8207 unsigned index = 0; (void)index;
8208 auto valueGroup0 = getODSOperands(index: 0);
8209
8210 for (auto v : valueGroup0) {
8211 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8212 return ::mlir::failure();
8213 }
8214 }
8215 {
8216 unsigned index = 0; (void)index;
8217 auto valueGroup0 = getODSResults(index: 0);
8218
8219 for (auto v : valueGroup0) {
8220 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
8221 return ::mlir::failure();
8222 }
8223 }
8224 if (!(((getSrcVectorBitWidth() <= 131072)) && ((getResVectorBitWidth() <= 131072))))
8225 return emitOpError(message: "failed to verify that vectors are not bigger than 2^17 bits.");
8226 if (!((!isScalableVectorType(vectorType: (*this->getODSResults(index: 0).begin()).getType()) || isScalableVectorType(vectorType: (*this->getODSOperands(index: 0).begin()).getType()))))
8227 return emitOpError(message: "failed to verify that it is not extracting scalable from fixed-length vectors.");
8228 return ::mlir::success();
8229}
8230
8231::llvm::LogicalResult vector_extract::verifyInvariants() {
8232 return verifyInvariantsImpl();
8233}
8234
8235::mlir::ParseResult vector_extract::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8236 ::mlir::OpAsmParser::UnresolvedOperand srcvecRawOperand{};
8237 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcvecOperands(&srcvecRawOperand, 1); ::llvm::SMLoc srcvecOperandsLoc;
8238 (void)srcvecOperandsLoc;
8239 ::mlir::IntegerAttr posAttr;
8240 ::mlir::Type resRawType{};
8241 ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
8242 ::mlir::Type srcvecRawType{};
8243 ::llvm::ArrayRef<::mlir::Type> srcvecTypes(&srcvecRawType, 1);
8244
8245 srcvecOperandsLoc = parser.getCurrentLocation();
8246 if (parser.parseOperand(result&: srcvecRawOperand))
8247 return ::mlir::failure();
8248 if (parser.parseLSquare())
8249 return ::mlir::failure();
8250
8251 if (parser.parseCustomAttributeWithFallback(result&: posAttr, type: parser.getBuilder().getIntegerType(width: 64))) {
8252 return ::mlir::failure();
8253 }
8254 if (posAttr) result.getOrAddProperties<vector_extract::Properties>().pos = posAttr;
8255 if (parser.parseRSquare())
8256 return ::mlir::failure();
8257 {
8258 auto loc = parser.getCurrentLocation();(void)loc;
8259 if (parser.parseOptionalAttrDict(result&: result.attributes))
8260 return ::mlir::failure();
8261 if (result.attributes.get(name: "pos"))
8262 return parser.emitError(loc, message: "inherent attribute 'pos' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
8263 }
8264 if (parser.parseColon())
8265 return ::mlir::failure();
8266
8267 {
8268 ::mlir::VectorType type;
8269 if (parser.parseCustomTypeWithFallback(result&: type))
8270 return ::mlir::failure();
8271 resRawType = type;
8272 }
8273 if (parser.parseKeyword(keyword: "from"))
8274 return ::mlir::failure();
8275
8276 {
8277 ::mlir::VectorType type;
8278 if (parser.parseCustomTypeWithFallback(result&: type))
8279 return ::mlir::failure();
8280 srcvecRawType = type;
8281 }
8282 result.addTypes(newTypes: resTypes);
8283 // coverity[ARRAY_VS_SINGLETON]
8284 if (parser.resolveOperands(operands&: srcvecOperands, types&: srcvecTypes, loc: srcvecOperandsLoc, result&: result.operands))
8285 return ::mlir::failure();
8286 return ::mlir::success();
8287}
8288
8289LLVM_ATTRIBUTE_MINSIZE void vector_extract::print(::mlir::OpAsmPrinter &_odsPrinter) {
8290 _odsPrinter << ' ';
8291 _odsPrinter << getSrcvec();
8292 _odsPrinter << "[";
8293 _odsPrinter.printAttributeWithoutType(attr: getPosAttr());
8294 _odsPrinter << "]";
8295 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
8296 _odsPrinter << " :";
8297 _odsPrinter << ' ';
8298 {
8299 auto type = getRes().getType();
8300 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
8301 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
8302 else
8303 _odsPrinter << type;
8304 }
8305 _odsPrinter << " from";
8306 _odsPrinter << ' ';
8307 {
8308 auto type = getSrcvec().getType();
8309 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
8310 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
8311 else
8312 _odsPrinter << type;
8313 }
8314}
8315
8316void vector_extract::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8317}
8318
8319void vector_extract::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8320 Properties &properties = odsState.getOrAddProperties<Properties>();
8321 populateDefaultProperties(opName: odsState.name, properties);
8322 const ::llvm::StringRef inherentNames[] = {"pos"};
8323 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
8324 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
8325 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
8326 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
8327 });
8328}
8329
8330
8331} // namespace mlir::LLVM
8332MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_extract)
8333MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_extractGenericAdaptorBase::Properties)
8334
8335namespace mlir::LLVM {
8336
8337
8338//===----------------------------------------------------------------------===//
8339// ::mlir::LLVM::vector_insert definitions
8340//===----------------------------------------------------------------------===//
8341
8342namespace detail {
8343
8344vector_insertGenericAdaptorBase::vector_insertGenericAdaptorBase(vector_insert op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
8345
8346uint64_t vector_insertGenericAdaptorBase::getPos() {
8347 auto attr = getPosAttr();
8348 return attr.getValue().getZExtValue();
8349}
8350
8351
8352} // namespace detail
8353vector_insertAdaptor::vector_insertAdaptor(vector_insert op) : vector_insertGenericAdaptor(op->getOperands(), op) {}
8354
8355::llvm::LogicalResult vector_insertAdaptor::verify(::mlir::Location loc) {
8356 auto tblgen_pos = getProperties().pos; (void)tblgen_pos;
8357 if (!tblgen_pos) return emitError(loc, message: "'llvm.intr.vector.insert' op requires attribute 'pos'");
8358
8359 if (tblgen_pos && !(((::llvm::isa<::mlir::IntegerAttr>(Val: tblgen_pos))) && ((::llvm::cast<::mlir::IntegerAttr>(Val&: tblgen_pos).getType().isSignlessInteger(width: 64)))))
8360 return emitError(loc, message: "'llvm.intr.vector.insert' op attribute 'pos' failed to satisfy constraint: 64-bit signless integer attribute");
8361 return ::mlir::success();
8362}
8363
8364::llvm::LogicalResult vector_insert::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8365 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
8366 if (!dict) {
8367 emitError() << "expected DictionaryAttr to set properties";
8368 return ::mlir::failure();
8369 }
8370
8371 {
8372 auto attr = dict.get(name: "pos");
8373 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
8374 storage&: prop.pos, attr, name: "pos", emitError)))
8375 return ::mlir::failure();
8376 }
8377 return ::mlir::success();
8378}
8379
8380::mlir::Attribute vector_insert::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
8381 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
8382 ::mlir::Builder odsBuilder{ctx};
8383 ::mlir::detail::appendAttributeProperty(attrs, name: "pos", attr: prop.pos);
8384
8385 if (!attrs.empty())
8386 return odsBuilder.getDictionaryAttr(value: attrs);
8387 return {};
8388}
8389
8390llvm::hash_code vector_insert::computePropertiesHash(const Properties &prop) {
8391 using llvm::hash_value;
8392 return llvm::hash_combine(
8393 args: llvm::hash_value(ptr: prop.pos.getAsOpaquePointer()));
8394}
8395
8396std::optional<mlir::Attribute> vector_insert::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
8397 if (name == "pos")
8398 return prop.pos;
8399 return std::nullopt;
8400}
8401
8402void vector_insert::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
8403 if (name == "pos") {
8404 prop.pos = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.pos)>>(Val&: value);
8405 return;
8406 }
8407}
8408
8409void vector_insert::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
8410 if (prop.pos) {
8411 ::mlir::Attribute value = prop.pos;
8412 ::mlir::Attribute originalValue = value;
8413 visitor("pos", value);
8414 if (value != originalValue)
8415 setInherentAttr(prop, name: "pos", value);
8416 }
8417}
8418
8419::llvm::LogicalResult vector_insert::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8420 {
8421 ::mlir::Attribute attr = attrs.get(name: getPosAttrName(name: opName));
8422 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(attr, attrName: "pos", emitError)))
8423 return ::mlir::failure();
8424 }
8425 return ::mlir::success();
8426}
8427
8428::llvm::LogicalResult vector_insert::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
8429 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
8430 if (::mlir::failed(Result: reader.readAttribute(result&: prop.pos)))
8431 return ::mlir::failure();
8432 return ::mlir::success();
8433}
8434
8435void vector_insert::writeProperties(::mlir::DialectBytecodeWriter &writer) {
8436 auto &prop = getProperties(); (void)prop;
8437 writer.writeAttribute(attr: prop.pos);
8438}
8439
8440uint64_t vector_insert::getPos() {
8441 auto attr = getPosAttr();
8442 return attr.getValue().getZExtValue();
8443}
8444
8445void vector_insert::setPos(uint64_t attrValue) {
8446 getProperties().pos = ::mlir::Builder((*this)->getContext()).getIntegerAttr(type: ::mlir::Builder((*this)->getContext()).getIntegerType(width: 64), value: attrValue);
8447}
8448
8449void vector_insert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8450 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8451 odsState.addOperands(newOperands: dstvec);
8452 odsState.addOperands(newOperands: srcvec);
8453 odsProperties.pos = pos;
8454 odsState.addTypes(newTypes: res);
8455}
8456
8457vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8458 ::mlir::OperationState __state__(location, getOperationName());
8459 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8460 auto __res__ = builder.create(state: __state__);
8461 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8462 return ::llvm::cast<vector_insert>(Val: __res__);
8463}
8464
8465vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8466 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8467}
8468
8469void vector_insert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8470 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8471 odsState.addOperands(newOperands: dstvec);
8472 odsState.addOperands(newOperands: srcvec);
8473 odsProperties.pos = pos;
8474
8475 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8476 if (::mlir::succeeded(Result: vector_insert::inferReturnTypes(context: odsBuilder.getContext(),
8477 location: odsState.location, operands: odsState.operands,
8478 attributes: odsState.attributes.getDictionary(context: odsState.getContext()),
8479 properties: odsState.getRawProperties(),
8480 regions: odsState.regions, inferredReturnTypes)))
8481 odsState.addTypes(newTypes: inferredReturnTypes);
8482 else
8483 ::mlir::detail::reportFatalInferReturnTypesError(state&: odsState);
8484
8485}
8486
8487vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8488 ::mlir::OperationState __state__(location, getOperationName());
8489 build(odsBuilder&: builder, odsState&: __state__, dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8490 auto __res__ = builder.create(state: __state__);
8491 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8492 return ::llvm::cast<vector_insert>(Val: __res__);
8493}
8494
8495vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8496 return create(builder, location: builder.getLoc(), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8497}
8498
8499void vector_insert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8500 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8501 odsState.addOperands(newOperands: dstvec);
8502 odsState.addOperands(newOperands: srcvec);
8503 odsProperties.pos = pos;
8504 assert(resultTypes.size() == 1u && "mismatched number of results");
8505 odsState.addTypes(newTypes&: resultTypes);
8506}
8507
8508vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8509 ::mlir::OperationState __state__(location, getOperationName());
8510 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8511 auto __res__ = builder.create(state: __state__);
8512 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8513 return ::llvm::cast<vector_insert>(Val: __res__);
8514}
8515
8516vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos) {
8517 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8518}
8519
8520void vector_insert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8521 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8522 odsState.addOperands(newOperands: dstvec);
8523 odsState.addOperands(newOperands: srcvec);
8524 odsProperties.pos = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 64), value: pos);
8525 odsState.addTypes(newTypes: res);
8526}
8527
8528vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8529 ::mlir::OperationState __state__(location, getOperationName());
8530 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8531 auto __res__ = builder.create(state: __state__);
8532 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8533 return ::llvm::cast<vector_insert>(Val: __res__);
8534}
8535
8536vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8537 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8538}
8539
8540void vector_insert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8541 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8542 odsState.addOperands(newOperands: dstvec);
8543 odsState.addOperands(newOperands: srcvec);
8544 odsProperties.pos = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 64), value: pos);
8545
8546 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8547 if (::mlir::succeeded(Result: vector_insert::inferReturnTypes(context: odsBuilder.getContext(),
8548 location: odsState.location, operands: odsState.operands,
8549 attributes: odsState.attributes.getDictionary(context: odsState.getContext()),
8550 properties: odsState.getRawProperties(),
8551 regions: odsState.regions, inferredReturnTypes)))
8552 odsState.addTypes(newTypes: inferredReturnTypes);
8553 else
8554 ::mlir::detail::reportFatalInferReturnTypesError(state&: odsState);
8555
8556}
8557
8558vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8559 ::mlir::OperationState __state__(location, getOperationName());
8560 build(odsBuilder&: builder, odsState&: __state__, dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8561 auto __res__ = builder.create(state: __state__);
8562 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8563 return ::llvm::cast<vector_insert>(Val: __res__);
8564}
8565
8566vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8567 return create(builder, location: builder.getLoc(), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8568}
8569
8570void vector_insert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8571 auto &odsProperties = odsState.getOrAddProperties<Properties>();
8572 odsState.addOperands(newOperands: dstvec);
8573 odsState.addOperands(newOperands: srcvec);
8574 odsProperties.pos = odsBuilder.getIntegerAttr(type: odsBuilder.getIntegerType(width: 64), value: pos);
8575 assert(resultTypes.size() == 1u && "mismatched number of results");
8576 odsState.addTypes(newTypes&: resultTypes);
8577}
8578
8579vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8580 ::mlir::OperationState __state__(location, getOperationName());
8581 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8582 auto __res__ = builder.create(state: __state__);
8583 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8584 return ::llvm::cast<vector_insert>(Val: __res__);
8585}
8586
8587vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos) {
8588 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), dstvec: std::forward<decltype(dstvec)>(t&: dstvec), srcvec: std::forward<decltype(srcvec)>(t&: srcvec), pos: std::forward<decltype(pos)>(t&: pos));
8589}
8590
8591void vector_insert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8592 assert(operands.size() == 2u && "mismatched number of parameters");
8593 odsState.addOperands(newOperands: operands);
8594 buildPropertiesAndDiscardableAttributes(odsState, attributes);
8595 assert(resultTypes.size() == 1u && "mismatched number of return types");
8596 odsState.addTypes(newTypes&: resultTypes);
8597}
8598
8599vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8600LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8601
8602 ::mlir::OperationState __state__(location, getOperationName());
8603 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));
8604 auto __res__ = builder.create(state: __state__);
8605 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8606 return ::llvm::cast<vector_insert>(Val: __res__);
8607LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8608}
8609
8610vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8611LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8612
8613 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));
8614LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8615}
8616
8617void vector_insert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8618 assert(operands.size() == 2u && "mismatched number of parameters");
8619 odsState.addOperands(newOperands: operands);
8620 buildPropertiesAndDiscardableAttributes(odsState, attributes);
8621
8622 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8623 if (::mlir::succeeded(Result: vector_insert::inferReturnTypes(context: odsBuilder.getContext(),
8624 location: odsState.location, operands,
8625 attributes: odsState.attributes.getDictionary(context: odsState.getContext()),
8626 properties: odsState.getRawProperties(),
8627 regions: odsState.regions, inferredReturnTypes))) {
8628 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8629 odsState.addTypes(newTypes: inferredReturnTypes);
8630 } else {
8631 ::llvm::report_fatal_error(reason: "Failed to infer result type(s).");
8632 }
8633}
8634
8635vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8636LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8637
8638 ::mlir::OperationState __state__(location, getOperationName());
8639 build(odsBuilder&: builder, odsState&: __state__, operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
8640 auto __res__ = builder.create(state: __state__);
8641 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8642 return ::llvm::cast<vector_insert>(Val: __res__);
8643LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8644}
8645
8646vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8647LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
8648
8649 return create(builder, location: builder.getLoc(), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
8650LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
8651}
8652
8653void vector_insert::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8654 assert(operands.size() == 2u && "mismatched number of parameters");
8655 odsState.addOperands(newOperands: operands);
8656 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
8657 odsState.addAttributes(newAttributes: discardableAttributes);
8658 assert(resultTypes.size() == 1u && "mismatched number of return types");
8659 odsState.addTypes(newTypes&: resultTypes);
8660}
8661
8662vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8663 ::mlir::OperationState __state__(location, getOperationName());
8664 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));
8665 auto __res__ = builder.create(state: __state__);
8666 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8667 return ::llvm::cast<vector_insert>(Val: __res__);
8668}
8669
8670vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8671 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));
8672}
8673
8674void vector_insert::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8675 assert(operands.size() == 2u && "mismatched number of parameters");
8676 odsState.addOperands(newOperands: operands);
8677 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
8678 odsState.addAttributes(newAttributes: discardableAttributes);
8679
8680 ::llvm::SmallVector<::mlir::Type, 2> inferredReturnTypes;
8681 if (::mlir::succeeded(Result: vector_insert::inferReturnTypes(context: odsBuilder.getContext(),
8682 location: odsState.location, operands,
8683 attributes: odsState.attributes.getDictionary(context: odsState.getContext()),
8684 properties: odsState.getRawProperties(),
8685 regions: odsState.regions, inferredReturnTypes))) {
8686 assert(inferredReturnTypes.size() == 1u && "mismatched number of return types");
8687 odsState.addTypes(newTypes: inferredReturnTypes);
8688 } else {
8689 ::llvm::report_fatal_error(reason: "Failed to infer result type(s).");
8690 }
8691}
8692
8693vector_insert vector_insert::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8694 ::mlir::OperationState __state__(location, getOperationName());
8695 build(odsBuilder&: builder, odsState&: __state__, operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
8696 auto __res__ = builder.create(state: __state__);
8697 assert((::llvm::isa<vector_insert>(__res__)) && "builder didn't return the right type");
8698 return ::llvm::cast<vector_insert>(Val: __res__);
8699}
8700
8701vector_insert vector_insert::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8702 return create(builder, location: builder.getLoc(), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
8703}
8704
8705::llvm::LogicalResult vector_insert::verifyInvariantsImpl() {
8706 auto tblgen_pos = getProperties().pos; (void)tblgen_pos;
8707 if (!tblgen_pos) return emitOpError(message: "requires attribute 'pos'");
8708
8709 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps1(op: *this, attr: tblgen_pos, attrName: "pos")))
8710 return ::mlir::failure();
8711 {
8712 unsigned index = 0; (void)index;
8713 auto valueGroup0 = getODSOperands(index: 0);
8714
8715 for (auto v : valueGroup0) {
8716 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8717 return ::mlir::failure();
8718 }
8719 auto valueGroup1 = getODSOperands(index: 1);
8720
8721 for (auto v : valueGroup1) {
8722 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
8723 return ::mlir::failure();
8724 }
8725 }
8726 {
8727 unsigned index = 0; (void)index;
8728 auto valueGroup0 = getODSResults(index: 0);
8729
8730 for (auto v : valueGroup0) {
8731 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
8732 return ::mlir::failure();
8733 }
8734 }
8735 if (!((((*this->getODSOperands(index: 0).begin()).getType()) == ((*this->getODSResults(index: 0).begin()).getType()) && ((*this->getODSResults(index: 0).begin()).getType()) == ((*this->getODSOperands(index: 0).begin()).getType()))))
8736 return emitOpError(message: "failed to verify that all of {dstvec, res} have same type");
8737 if (!(((getSrcVectorBitWidth() <= 131072)) && ((getDstVectorBitWidth() <= 131072))))
8738 return emitOpError(message: "failed to verify that vectors are not bigger than 2^17 bits.");
8739 if (!((!isScalableVectorType(vectorType: (*this->getODSOperands(index: 1).begin()).getType()) || isScalableVectorType(vectorType: (*this->getODSOperands(index: 0).begin()).getType()))))
8740 return emitOpError(message: "failed to verify that it is not inserting scalable into fixed-length vectors.");
8741 return ::mlir::success();
8742}
8743
8744::llvm::LogicalResult vector_insert::verifyInvariants() {
8745 return verifyInvariantsImpl();
8746}
8747
8748::llvm::LogicalResult vector_insert::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
8749 inferredReturnTypes.resize(N: 1);
8750 ::mlir::Builder odsBuilder(context);
8751 if (operands.size() <= 0)
8752 return ::mlir::failure();
8753 ::mlir::Type odsInferredType0 = operands[0].getType();
8754 inferredReturnTypes[0] = odsInferredType0;
8755 return ::mlir::success();
8756}
8757
8758::mlir::ParseResult vector_insert::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
8759 ::mlir::OpAsmParser::UnresolvedOperand srcvecRawOperand{};
8760 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> srcvecOperands(&srcvecRawOperand, 1); ::llvm::SMLoc srcvecOperandsLoc;
8761 (void)srcvecOperandsLoc;
8762 ::mlir::OpAsmParser::UnresolvedOperand dstvecRawOperand{};
8763 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> dstvecOperands(&dstvecRawOperand, 1); ::llvm::SMLoc dstvecOperandsLoc;
8764 (void)dstvecOperandsLoc;
8765 ::mlir::IntegerAttr posAttr;
8766 ::mlir::Type srcvecRawType{};
8767 ::llvm::ArrayRef<::mlir::Type> srcvecTypes(&srcvecRawType, 1);
8768 ::mlir::Type resRawType{};
8769 ::llvm::ArrayRef<::mlir::Type> resTypes(&resRawType, 1);
8770
8771 srcvecOperandsLoc = parser.getCurrentLocation();
8772 if (parser.parseOperand(result&: srcvecRawOperand))
8773 return ::mlir::failure();
8774 if (parser.parseComma())
8775 return ::mlir::failure();
8776
8777 dstvecOperandsLoc = parser.getCurrentLocation();
8778 if (parser.parseOperand(result&: dstvecRawOperand))
8779 return ::mlir::failure();
8780 if (parser.parseLSquare())
8781 return ::mlir::failure();
8782
8783 if (parser.parseCustomAttributeWithFallback(result&: posAttr, type: parser.getBuilder().getIntegerType(width: 64))) {
8784 return ::mlir::failure();
8785 }
8786 if (posAttr) result.getOrAddProperties<vector_insert::Properties>().pos = posAttr;
8787 if (parser.parseRSquare())
8788 return ::mlir::failure();
8789 {
8790 auto loc = parser.getCurrentLocation();(void)loc;
8791 if (parser.parseOptionalAttrDict(result&: result.attributes))
8792 return ::mlir::failure();
8793 if (result.attributes.get(name: "pos"))
8794 return parser.emitError(loc, message: "inherent attribute 'pos' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
8795 }
8796 if (parser.parseColon())
8797 return ::mlir::failure();
8798
8799 {
8800 ::mlir::VectorType type;
8801 if (parser.parseCustomTypeWithFallback(result&: type))
8802 return ::mlir::failure();
8803 srcvecRawType = type;
8804 }
8805 if (parser.parseKeyword(keyword: "into"))
8806 return ::mlir::failure();
8807
8808 {
8809 ::mlir::VectorType type;
8810 if (parser.parseCustomTypeWithFallback(result&: type))
8811 return ::mlir::failure();
8812 resRawType = type;
8813 }
8814 result.addTypes(newTypes: resTypes);
8815 // coverity[ARRAY_VS_SINGLETON]
8816 if (parser.resolveOperands(operands&: dstvecOperands, type: resTypes[0], loc: dstvecOperandsLoc, result&: result.operands))
8817 return ::mlir::failure();
8818 // coverity[ARRAY_VS_SINGLETON]
8819 if (parser.resolveOperands(operands&: srcvecOperands, types&: srcvecTypes, loc: srcvecOperandsLoc, result&: result.operands))
8820 return ::mlir::failure();
8821 return ::mlir::success();
8822}
8823
8824LLVM_ATTRIBUTE_MINSIZE void vector_insert::print(::mlir::OpAsmPrinter &_odsPrinter) {
8825 _odsPrinter << ' ';
8826 _odsPrinter << getSrcvec();
8827 _odsPrinter << ",";
8828 _odsPrinter << ' ';
8829 _odsPrinter << getDstvec();
8830 _odsPrinter << "[";
8831 _odsPrinter.printAttributeWithoutType(attr: getPosAttr());
8832 _odsPrinter << "]";
8833 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
8834 _odsPrinter << " :";
8835 _odsPrinter << ' ';
8836 {
8837 auto type = getSrcvec().getType();
8838 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
8839 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
8840 else
8841 _odsPrinter << type;
8842 }
8843 _odsPrinter << " into";
8844 _odsPrinter << ' ';
8845 {
8846 auto type = getRes().getType();
8847 if (auto validType = ::llvm::dyn_cast<::mlir::VectorType>(Val&: type))
8848 _odsPrinter.printStrippedAttrOrType(attrOrType: validType);
8849 else
8850 _odsPrinter << type;
8851 }
8852}
8853
8854void vector_insert::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
8855}
8856
8857void vector_insert::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8858 Properties &properties = odsState.getOrAddProperties<Properties>();
8859 populateDefaultProperties(opName: odsState.name, properties);
8860 const ::llvm::StringRef inherentNames[] = {"pos"};
8861 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
8862 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
8863 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
8864 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
8865 });
8866}
8867
8868
8869} // namespace mlir::LLVM
8870MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_insert)
8871MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_insertGenericAdaptorBase::Properties)
8872
8873namespace mlir::LLVM {
8874
8875
8876//===----------------------------------------------------------------------===//
8877// ::mlir::LLVM::vector_interleave2 definitions
8878//===----------------------------------------------------------------------===//
8879
8880namespace detail {
8881
8882vector_interleave2GenericAdaptorBase::vector_interleave2GenericAdaptorBase(vector_interleave2 op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
8883
8884
8885} // namespace detail
8886vector_interleave2Adaptor::vector_interleave2Adaptor(vector_interleave2 op) : vector_interleave2GenericAdaptor(op->getOperands(), op) {}
8887
8888::llvm::LogicalResult vector_interleave2Adaptor::verify(::mlir::Location loc) {
8889 return ::mlir::success();
8890}
8891
8892::llvm::LogicalResult vector_interleave2::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8893 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
8894 if (!dict) {
8895 emitError() << "expected DictionaryAttr to set properties";
8896 return ::mlir::failure();
8897 }
8898 return ::mlir::success();
8899}
8900
8901::mlir::Attribute vector_interleave2::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
8902 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
8903 ::mlir::Builder odsBuilder{ctx};
8904
8905 if (!attrs.empty())
8906 return odsBuilder.getDictionaryAttr(value: attrs);
8907 return {};
8908}
8909
8910llvm::hash_code vector_interleave2::computePropertiesHash(const Properties &prop) {
8911 using llvm::hash_value;
8912 return llvm::hash_combine();
8913}
8914
8915std::optional<mlir::Attribute> vector_interleave2::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
8916 return std::nullopt;
8917}
8918
8919void vector_interleave2::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
8920}
8921
8922void vector_interleave2::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
8923}
8924
8925::llvm::LogicalResult vector_interleave2::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
8926 return ::mlir::success();
8927}
8928
8929void vector_interleave2::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value vec1, ::mlir::Value vec2) {
8930 odsState.addOperands(newOperands: vec1);
8931 odsState.addOperands(newOperands: vec2);
8932 odsState.addTypes(newTypes: res);
8933}
8934
8935vector_interleave2 vector_interleave2::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vec1, ::mlir::Value vec2) {
8936 ::mlir::OperationState __state__(location, getOperationName());
8937 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), vec1: std::forward<decltype(vec1)>(t&: vec1), vec2: std::forward<decltype(vec2)>(t&: vec2));
8938 auto __res__ = builder.create(state: __state__);
8939 assert((::llvm::isa<vector_interleave2>(__res__)) && "builder didn't return the right type");
8940 return ::llvm::cast<vector_interleave2>(Val: __res__);
8941}
8942
8943vector_interleave2 vector_interleave2::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vec1, ::mlir::Value vec2) {
8944 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), vec1: std::forward<decltype(vec1)>(t&: vec1), vec2: std::forward<decltype(vec2)>(t&: vec2));
8945}
8946
8947void vector_interleave2::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vec1, ::mlir::Value vec2) {
8948 odsState.addOperands(newOperands: vec1);
8949 odsState.addOperands(newOperands: vec2);
8950 assert(resultTypes.size() == 1u && "mismatched number of results");
8951 odsState.addTypes(newTypes&: resultTypes);
8952}
8953
8954vector_interleave2 vector_interleave2::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vec1, ::mlir::Value vec2) {
8955 ::mlir::OperationState __state__(location, getOperationName());
8956 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vec1: std::forward<decltype(vec1)>(t&: vec1), vec2: std::forward<decltype(vec2)>(t&: vec2));
8957 auto __res__ = builder.create(state: __state__);
8958 assert((::llvm::isa<vector_interleave2>(__res__)) && "builder didn't return the right type");
8959 return ::llvm::cast<vector_interleave2>(Val: __res__);
8960}
8961
8962vector_interleave2 vector_interleave2::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vec1, ::mlir::Value vec2) {
8963 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vec1: std::forward<decltype(vec1)>(t&: vec1), vec2: std::forward<decltype(vec2)>(t&: vec2));
8964}
8965
8966void vector_interleave2::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8967 assert(operands.size() == 2u && "mismatched number of parameters");
8968 odsState.addOperands(newOperands: operands);
8969 odsState.addAttributes(newAttributes: attributes);
8970 assert(resultTypes.size() == 1u && "mismatched number of return types");
8971 odsState.addTypes(newTypes&: resultTypes);
8972}
8973
8974vector_interleave2 vector_interleave2::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8975 ::mlir::OperationState __state__(location, getOperationName());
8976 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));
8977 auto __res__ = builder.create(state: __state__);
8978 assert((::llvm::isa<vector_interleave2>(__res__)) && "builder didn't return the right type");
8979 return ::llvm::cast<vector_interleave2>(Val: __res__);
8980}
8981
8982vector_interleave2 vector_interleave2::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
8983 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));
8984}
8985
8986void vector_interleave2::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8987 assert(operands.size() == 2u && "mismatched number of parameters");
8988 odsState.addOperands(newOperands: operands);
8989 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
8990 odsState.addAttributes(newAttributes: discardableAttributes);
8991 assert(resultTypes.size() == 1u && "mismatched number of return types");
8992 odsState.addTypes(newTypes&: resultTypes);
8993}
8994
8995vector_interleave2 vector_interleave2::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
8996 ::mlir::OperationState __state__(location, getOperationName());
8997 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));
8998 auto __res__ = builder.create(state: __state__);
8999 assert((::llvm::isa<vector_interleave2>(__res__)) && "builder didn't return the right type");
9000 return ::llvm::cast<vector_interleave2>(Val: __res__);
9001}
9002
9003vector_interleave2 vector_interleave2::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9004 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));
9005}
9006
9007::llvm::LogicalResult vector_interleave2::verifyInvariantsImpl() {
9008 {
9009 unsigned index = 0; (void)index;
9010 auto valueGroup0 = getODSOperands(index: 0);
9011
9012 for (auto v : valueGroup0) {
9013 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9014 return ::mlir::failure();
9015 }
9016 auto valueGroup1 = getODSOperands(index: 1);
9017
9018 for (auto v : valueGroup1) {
9019 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9020 return ::mlir::failure();
9021 }
9022 }
9023 {
9024 unsigned index = 0; (void)index;
9025 auto valueGroup0 = getODSResults(index: 0);
9026
9027 for (auto v : valueGroup0) {
9028 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
9029 return ::mlir::failure();
9030 }
9031 }
9032 if (!((((*this->getODSOperands(index: 0).begin()).getType()) == ((*this->getODSOperands(index: 1).begin()).getType()) && ((*this->getODSOperands(index: 1).begin()).getType()) == ((*this->getODSOperands(index: 0).begin()).getType()))))
9033 return emitOpError(message: "failed to verify that all of {vec1, vec2} have same type");
9034 if (!(((getVectorNumElements(type: (*this->getODSResults(index: 0).begin()).getType()) == getVectorNumElements(type: (*this->getODSOperands(index: 0).begin()).getType()) * 2)) && ((::llvm::cast<VectorType>(Val: (*this->getODSOperands(index: 0).begin()).getType()).getElementType() == ::llvm::cast<VectorType>(Val: (*this->getODSResults(index: 0).begin()).getType()).getElementType()))))
9035 return emitOpError(message: "failed to verify that result has twice as many elements as 'vec1'");
9036 return ::mlir::success();
9037}
9038
9039::llvm::LogicalResult vector_interleave2::verifyInvariants() {
9040 return verifyInvariantsImpl();
9041}
9042
9043::llvm::LogicalResult vector_interleave2::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9044 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9045 if (!dict) {
9046 emitError() << "expected DictionaryAttr to set properties";
9047 return ::mlir::failure();
9048 }
9049 // keep track of used keys in the input dictionary to be able to error out
9050 // if there are some unknown ones.
9051 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
9052 ::mlir::MLIRContext *ctx = dict.getContext();
9053 (void)ctx;
9054
9055 for (::mlir::NamedAttribute attr : dict) {
9056 if (!usedKeys.contains(V: attr.getName()))
9057 return emitError() << "unknown key '" << attr.getName() <<
9058 "' when parsing properties dictionary";
9059 }
9060 return ::mlir::success();
9061}
9062
9063void vector_interleave2::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9064}
9065
9066
9067} // namespace mlir::LLVM
9068MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_interleave2)
9069
9070namespace mlir::LLVM {
9071
9072
9073//===----------------------------------------------------------------------===//
9074// ::mlir::LLVM::vector_reduce_add definitions
9075//===----------------------------------------------------------------------===//
9076
9077namespace detail {
9078
9079vector_reduce_addGenericAdaptorBase::vector_reduce_addGenericAdaptorBase(vector_reduce_add op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9080
9081
9082} // namespace detail
9083vector_reduce_addAdaptor::vector_reduce_addAdaptor(vector_reduce_add op) : vector_reduce_addGenericAdaptor(op->getOperands(), op) {}
9084
9085::llvm::LogicalResult vector_reduce_addAdaptor::verify(::mlir::Location loc) {
9086 return ::mlir::success();
9087}
9088
9089::llvm::LogicalResult vector_reduce_add::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9090 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9091 if (!dict) {
9092 emitError() << "expected DictionaryAttr to set properties";
9093 return ::mlir::failure();
9094 }
9095 return ::mlir::success();
9096}
9097
9098::mlir::Attribute vector_reduce_add::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9099 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9100 ::mlir::Builder odsBuilder{ctx};
9101
9102 if (!attrs.empty())
9103 return odsBuilder.getDictionaryAttr(value: attrs);
9104 return {};
9105}
9106
9107llvm::hash_code vector_reduce_add::computePropertiesHash(const Properties &prop) {
9108 using llvm::hash_value;
9109 return llvm::hash_combine();
9110}
9111
9112std::optional<mlir::Attribute> vector_reduce_add::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9113 return std::nullopt;
9114}
9115
9116void vector_reduce_add::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9117}
9118
9119void vector_reduce_add::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
9120}
9121
9122::llvm::LogicalResult vector_reduce_add::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9123 return ::mlir::success();
9124}
9125
9126void vector_reduce_add::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
9127 odsState.addOperands(newOperands: in);
9128 odsState.addTypes(newTypes: res);
9129}
9130
9131vector_reduce_add vector_reduce_add::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
9132 ::mlir::OperationState __state__(location, getOperationName());
9133 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
9134 auto __res__ = builder.create(state: __state__);
9135 assert((::llvm::isa<vector_reduce_add>(__res__)) && "builder didn't return the right type");
9136 return ::llvm::cast<vector_reduce_add>(Val: __res__);
9137}
9138
9139vector_reduce_add vector_reduce_add::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
9140 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
9141}
9142
9143void vector_reduce_add::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
9144 odsState.addOperands(newOperands: in);
9145 assert(resultTypes.size() == 1u && "mismatched number of results");
9146 odsState.addTypes(newTypes&: resultTypes);
9147}
9148
9149vector_reduce_add vector_reduce_add::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
9150 ::mlir::OperationState __state__(location, getOperationName());
9151 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
9152 auto __res__ = builder.create(state: __state__);
9153 assert((::llvm::isa<vector_reduce_add>(__res__)) && "builder didn't return the right type");
9154 return ::llvm::cast<vector_reduce_add>(Val: __res__);
9155}
9156
9157vector_reduce_add vector_reduce_add::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
9158 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
9159}
9160
9161void vector_reduce_add::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9162 assert(operands.size() == 1u && "mismatched number of parameters");
9163 odsState.addOperands(newOperands: operands);
9164 odsState.addAttributes(newAttributes: attributes);
9165 assert(resultTypes.size() == 1u && "mismatched number of return types");
9166 odsState.addTypes(newTypes&: resultTypes);
9167}
9168
9169vector_reduce_add vector_reduce_add::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9170 ::mlir::OperationState __state__(location, getOperationName());
9171 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));
9172 auto __res__ = builder.create(state: __state__);
9173 assert((::llvm::isa<vector_reduce_add>(__res__)) && "builder didn't return the right type");
9174 return ::llvm::cast<vector_reduce_add>(Val: __res__);
9175}
9176
9177vector_reduce_add vector_reduce_add::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9178 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));
9179}
9180
9181void vector_reduce_add::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9182 assert(operands.size() == 1u && "mismatched number of parameters");
9183 odsState.addOperands(newOperands: operands);
9184 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
9185 odsState.addAttributes(newAttributes: discardableAttributes);
9186 assert(resultTypes.size() == 1u && "mismatched number of return types");
9187 odsState.addTypes(newTypes&: resultTypes);
9188}
9189
9190vector_reduce_add vector_reduce_add::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9191 ::mlir::OperationState __state__(location, getOperationName());
9192 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));
9193 auto __res__ = builder.create(state: __state__);
9194 assert((::llvm::isa<vector_reduce_add>(__res__)) && "builder didn't return the right type");
9195 return ::llvm::cast<vector_reduce_add>(Val: __res__);
9196}
9197
9198vector_reduce_add vector_reduce_add::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9199 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));
9200}
9201
9202::llvm::LogicalResult vector_reduce_add::verifyInvariantsImpl() {
9203 {
9204 unsigned index = 0; (void)index;
9205 auto valueGroup0 = getODSOperands(index: 0);
9206
9207 for (auto v : valueGroup0) {
9208 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9209 return ::mlir::failure();
9210 }
9211 }
9212 {
9213 unsigned index = 0; (void)index;
9214 auto valueGroup0 = getODSResults(index: 0);
9215
9216 for (auto v : valueGroup0) {
9217 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
9218 return ::mlir::failure();
9219 }
9220 }
9221 return ::mlir::success();
9222}
9223
9224::llvm::LogicalResult vector_reduce_add::verifyInvariants() {
9225 return verifyInvariantsImpl();
9226}
9227
9228::llvm::LogicalResult vector_reduce_add::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9229 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9230 if (!dict) {
9231 emitError() << "expected DictionaryAttr to set properties";
9232 return ::mlir::failure();
9233 }
9234 // keep track of used keys in the input dictionary to be able to error out
9235 // if there are some unknown ones.
9236 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
9237 ::mlir::MLIRContext *ctx = dict.getContext();
9238 (void)ctx;
9239
9240 for (::mlir::NamedAttribute attr : dict) {
9241 if (!usedKeys.contains(V: attr.getName()))
9242 return emitError() << "unknown key '" << attr.getName() <<
9243 "' when parsing properties dictionary";
9244 }
9245 return ::mlir::success();
9246}
9247
9248void vector_reduce_add::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9249}
9250
9251
9252} // namespace mlir::LLVM
9253MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_add)
9254
9255namespace mlir::LLVM {
9256
9257
9258//===----------------------------------------------------------------------===//
9259// ::mlir::LLVM::vector_reduce_and definitions
9260//===----------------------------------------------------------------------===//
9261
9262namespace detail {
9263
9264vector_reduce_andGenericAdaptorBase::vector_reduce_andGenericAdaptorBase(vector_reduce_and op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9265
9266
9267} // namespace detail
9268vector_reduce_andAdaptor::vector_reduce_andAdaptor(vector_reduce_and op) : vector_reduce_andGenericAdaptor(op->getOperands(), op) {}
9269
9270::llvm::LogicalResult vector_reduce_andAdaptor::verify(::mlir::Location loc) {
9271 return ::mlir::success();
9272}
9273
9274::llvm::LogicalResult vector_reduce_and::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9275 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9276 if (!dict) {
9277 emitError() << "expected DictionaryAttr to set properties";
9278 return ::mlir::failure();
9279 }
9280 return ::mlir::success();
9281}
9282
9283::mlir::Attribute vector_reduce_and::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9284 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9285 ::mlir::Builder odsBuilder{ctx};
9286
9287 if (!attrs.empty())
9288 return odsBuilder.getDictionaryAttr(value: attrs);
9289 return {};
9290}
9291
9292llvm::hash_code vector_reduce_and::computePropertiesHash(const Properties &prop) {
9293 using llvm::hash_value;
9294 return llvm::hash_combine();
9295}
9296
9297std::optional<mlir::Attribute> vector_reduce_and::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9298 return std::nullopt;
9299}
9300
9301void vector_reduce_and::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9302}
9303
9304void vector_reduce_and::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
9305}
9306
9307::llvm::LogicalResult vector_reduce_and::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9308 return ::mlir::success();
9309}
9310
9311void vector_reduce_and::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
9312 odsState.addOperands(newOperands: in);
9313 odsState.addTypes(newTypes: res);
9314}
9315
9316vector_reduce_and vector_reduce_and::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
9317 ::mlir::OperationState __state__(location, getOperationName());
9318 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
9319 auto __res__ = builder.create(state: __state__);
9320 assert((::llvm::isa<vector_reduce_and>(__res__)) && "builder didn't return the right type");
9321 return ::llvm::cast<vector_reduce_and>(Val: __res__);
9322}
9323
9324vector_reduce_and vector_reduce_and::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
9325 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
9326}
9327
9328void vector_reduce_and::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
9329 odsState.addOperands(newOperands: in);
9330 assert(resultTypes.size() == 1u && "mismatched number of results");
9331 odsState.addTypes(newTypes&: resultTypes);
9332}
9333
9334vector_reduce_and vector_reduce_and::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
9335 ::mlir::OperationState __state__(location, getOperationName());
9336 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
9337 auto __res__ = builder.create(state: __state__);
9338 assert((::llvm::isa<vector_reduce_and>(__res__)) && "builder didn't return the right type");
9339 return ::llvm::cast<vector_reduce_and>(Val: __res__);
9340}
9341
9342vector_reduce_and vector_reduce_and::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
9343 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
9344}
9345
9346void vector_reduce_and::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9347 assert(operands.size() == 1u && "mismatched number of parameters");
9348 odsState.addOperands(newOperands: operands);
9349 odsState.addAttributes(newAttributes: attributes);
9350 assert(resultTypes.size() == 1u && "mismatched number of return types");
9351 odsState.addTypes(newTypes&: resultTypes);
9352}
9353
9354vector_reduce_and vector_reduce_and::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9355 ::mlir::OperationState __state__(location, getOperationName());
9356 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));
9357 auto __res__ = builder.create(state: __state__);
9358 assert((::llvm::isa<vector_reduce_and>(__res__)) && "builder didn't return the right type");
9359 return ::llvm::cast<vector_reduce_and>(Val: __res__);
9360}
9361
9362vector_reduce_and vector_reduce_and::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9363 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));
9364}
9365
9366void vector_reduce_and::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9367 assert(operands.size() == 1u && "mismatched number of parameters");
9368 odsState.addOperands(newOperands: operands);
9369 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
9370 odsState.addAttributes(newAttributes: discardableAttributes);
9371 assert(resultTypes.size() == 1u && "mismatched number of return types");
9372 odsState.addTypes(newTypes&: resultTypes);
9373}
9374
9375vector_reduce_and vector_reduce_and::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9376 ::mlir::OperationState __state__(location, getOperationName());
9377 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));
9378 auto __res__ = builder.create(state: __state__);
9379 assert((::llvm::isa<vector_reduce_and>(__res__)) && "builder didn't return the right type");
9380 return ::llvm::cast<vector_reduce_and>(Val: __res__);
9381}
9382
9383vector_reduce_and vector_reduce_and::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9384 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));
9385}
9386
9387::llvm::LogicalResult vector_reduce_and::verifyInvariantsImpl() {
9388 {
9389 unsigned index = 0; (void)index;
9390 auto valueGroup0 = getODSOperands(index: 0);
9391
9392 for (auto v : valueGroup0) {
9393 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9394 return ::mlir::failure();
9395 }
9396 }
9397 {
9398 unsigned index = 0; (void)index;
9399 auto valueGroup0 = getODSResults(index: 0);
9400
9401 for (auto v : valueGroup0) {
9402 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
9403 return ::mlir::failure();
9404 }
9405 }
9406 return ::mlir::success();
9407}
9408
9409::llvm::LogicalResult vector_reduce_and::verifyInvariants() {
9410 return verifyInvariantsImpl();
9411}
9412
9413::llvm::LogicalResult vector_reduce_and::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9414 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9415 if (!dict) {
9416 emitError() << "expected DictionaryAttr to set properties";
9417 return ::mlir::failure();
9418 }
9419 // keep track of used keys in the input dictionary to be able to error out
9420 // if there are some unknown ones.
9421 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
9422 ::mlir::MLIRContext *ctx = dict.getContext();
9423 (void)ctx;
9424
9425 for (::mlir::NamedAttribute attr : dict) {
9426 if (!usedKeys.contains(V: attr.getName()))
9427 return emitError() << "unknown key '" << attr.getName() <<
9428 "' when parsing properties dictionary";
9429 }
9430 return ::mlir::success();
9431}
9432
9433void vector_reduce_and::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9434}
9435
9436
9437} // namespace mlir::LLVM
9438MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_and)
9439
9440namespace mlir::LLVM {
9441
9442
9443//===----------------------------------------------------------------------===//
9444// ::mlir::LLVM::vector_reduce_fadd definitions
9445//===----------------------------------------------------------------------===//
9446
9447namespace detail {
9448
9449vector_reduce_faddGenericAdaptorBase::vector_reduce_faddGenericAdaptorBase(vector_reduce_fadd op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9450
9451::mlir::LLVM::FastmathFlagsAttr vector_reduce_faddGenericAdaptorBase::getFastmathFlagsAttr() {
9452 auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(Val: getProperties().fastmathFlags);
9453 return attr;
9454}
9455
9456::mlir::LLVM::FastmathFlags vector_reduce_faddGenericAdaptorBase::getFastmathFlags() {
9457 auto attr = getFastmathFlagsAttr();
9458 return attr.getValue();
9459}
9460
9461
9462} // namespace detail
9463vector_reduce_faddAdaptor::vector_reduce_faddAdaptor(vector_reduce_fadd op) : vector_reduce_faddGenericAdaptor(op->getOperands(), op) {}
9464
9465::llvm::LogicalResult vector_reduce_faddAdaptor::verify(::mlir::Location loc) {
9466 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
9467
9468 if (tblgen_fastmathFlags && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: tblgen_fastmathFlags))))
9469 return emitError(loc, message: "'llvm.intr.vector.reduce.fadd' op attribute 'fastmathFlags' failed to satisfy constraint: LLVM fastmath flags");
9470 return ::mlir::success();
9471}
9472
9473::llvm::LogicalResult vector_reduce_fadd::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9474 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9475 if (!dict) {
9476 emitError() << "expected DictionaryAttr to set properties";
9477 return ::mlir::failure();
9478 }
9479
9480 {
9481 auto attr = dict.get(name: "fastmathFlags");
9482 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
9483 storage&: prop.fastmathFlags, attr, name: "fastmathFlags", emitError)))
9484 return ::mlir::failure();
9485 }
9486 return ::mlir::success();
9487}
9488
9489::mlir::Attribute vector_reduce_fadd::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9490 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9491 ::mlir::Builder odsBuilder{ctx};
9492 ::mlir::detail::appendAttributeProperty(attrs, name: "fastmathFlags", attr: prop.fastmathFlags);
9493
9494 if (!attrs.empty())
9495 return odsBuilder.getDictionaryAttr(value: attrs);
9496 return {};
9497}
9498
9499llvm::hash_code vector_reduce_fadd::computePropertiesHash(const Properties &prop) {
9500 using llvm::hash_value;
9501 return llvm::hash_combine(
9502 args: llvm::hash_value(ptr: prop.fastmathFlags.getAsOpaquePointer()));
9503}
9504
9505std::optional<mlir::Attribute> vector_reduce_fadd::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9506 if (name == "fastmathFlags")
9507 return prop.fastmathFlags;
9508 return std::nullopt;
9509}
9510
9511void vector_reduce_fadd::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9512 if (name == "fastmathFlags") {
9513 prop.fastmathFlags = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fastmathFlags)>>(Val&: value);
9514 return;
9515 }
9516}
9517
9518void vector_reduce_fadd::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
9519 if (prop.fastmathFlags) {
9520 ::mlir::Attribute value = prop.fastmathFlags;
9521 ::mlir::Attribute originalValue = value;
9522 visitor("fastmathFlags", value);
9523 if (value != originalValue)
9524 setInherentAttr(prop, name: "fastmathFlags", value);
9525 }
9526}
9527
9528::llvm::LogicalResult vector_reduce_fadd::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9529 {
9530 ::mlir::Attribute attr = attrs.get(name: getFastmathFlagsAttrName(name: opName));
9531 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName: "fastmathFlags", emitError)))
9532 return ::mlir::failure();
9533 }
9534 return ::mlir::success();
9535}
9536
9537::llvm::LogicalResult vector_reduce_fadd::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9538 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9539 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.fastmathFlags)))
9540 return ::mlir::failure();
9541 return ::mlir::success();
9542}
9543
9544void vector_reduce_fadd::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9545 auto &prop = getProperties(); (void)prop;
9546
9547 writer.writeOptionalAttribute(attr: prop.fastmathFlags);
9548}
9549
9550::mlir::LLVM::FastmathFlags vector_reduce_fadd::getFastmathFlags() {
9551 auto attr = getFastmathFlagsAttr();
9552 return attr.getValue();
9553}
9554
9555void vector_reduce_fadd::setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue) {
9556 getProperties().fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::Builder((*this)->getContext()).getContext(), value: attrValue);
9557}
9558
9559void vector_reduce_fadd::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9560 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9561 odsState.addOperands(newOperands: start_value);
9562 odsState.addOperands(newOperands: input);
9563 if (fastmathFlags) {
9564 odsProperties.fastmathFlags = fastmathFlags;
9565 }
9566 odsState.addTypes(newTypes: res);
9567}
9568
9569vector_reduce_fadd vector_reduce_fadd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9570 ::mlir::OperationState __state__(location, getOperationName());
9571 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9572 auto __res__ = builder.create(state: __state__);
9573 assert((::llvm::isa<vector_reduce_fadd>(__res__)) && "builder didn't return the right type");
9574 return ::llvm::cast<vector_reduce_fadd>(Val: __res__);
9575}
9576
9577vector_reduce_fadd vector_reduce_fadd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9578 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9579}
9580
9581void vector_reduce_fadd::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9582 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9583 odsState.addOperands(newOperands: start_value);
9584 odsState.addOperands(newOperands: input);
9585 if (fastmathFlags) {
9586 odsProperties.fastmathFlags = fastmathFlags;
9587 }
9588 assert(resultTypes.size() == 1u && "mismatched number of results");
9589 odsState.addTypes(newTypes&: resultTypes);
9590}
9591
9592vector_reduce_fadd vector_reduce_fadd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9593 ::mlir::OperationState __state__(location, getOperationName());
9594 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9595 auto __res__ = builder.create(state: __state__);
9596 assert((::llvm::isa<vector_reduce_fadd>(__res__)) && "builder didn't return the right type");
9597 return ::llvm::cast<vector_reduce_fadd>(Val: __res__);
9598}
9599
9600vector_reduce_fadd vector_reduce_fadd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9601 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9602}
9603
9604void vector_reduce_fadd::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9605 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9606 odsState.addOperands(newOperands: start_value);
9607 odsState.addOperands(newOperands: input);
9608 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
9609 odsState.addTypes(newTypes: res);
9610}
9611
9612vector_reduce_fadd vector_reduce_fadd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9613 ::mlir::OperationState __state__(location, getOperationName());
9614 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9615 auto __res__ = builder.create(state: __state__);
9616 assert((::llvm::isa<vector_reduce_fadd>(__res__)) && "builder didn't return the right type");
9617 return ::llvm::cast<vector_reduce_fadd>(Val: __res__);
9618}
9619
9620vector_reduce_fadd vector_reduce_fadd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9621 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9622}
9623
9624void vector_reduce_fadd::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9625 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9626 odsState.addOperands(newOperands: start_value);
9627 odsState.addOperands(newOperands: input);
9628 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
9629 assert(resultTypes.size() == 1u && "mismatched number of results");
9630 odsState.addTypes(newTypes&: resultTypes);
9631}
9632
9633vector_reduce_fadd vector_reduce_fadd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9634 ::mlir::OperationState __state__(location, getOperationName());
9635 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9636 auto __res__ = builder.create(state: __state__);
9637 assert((::llvm::isa<vector_reduce_fadd>(__res__)) && "builder didn't return the right type");
9638 return ::llvm::cast<vector_reduce_fadd>(Val: __res__);
9639}
9640
9641vector_reduce_fadd vector_reduce_fadd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9642 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9643}
9644
9645void vector_reduce_fadd::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9646 assert(operands.size() == 2u && "mismatched number of parameters");
9647 odsState.addOperands(newOperands: operands);
9648 buildPropertiesAndDiscardableAttributes(odsState, attributes);
9649 assert(resultTypes.size() == 1u && "mismatched number of return types");
9650 odsState.addTypes(newTypes&: resultTypes);
9651}
9652
9653vector_reduce_fadd vector_reduce_fadd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9654LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
9655
9656 ::mlir::OperationState __state__(location, getOperationName());
9657 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));
9658 auto __res__ = builder.create(state: __state__);
9659 assert((::llvm::isa<vector_reduce_fadd>(__res__)) && "builder didn't return the right type");
9660 return ::llvm::cast<vector_reduce_fadd>(Val: __res__);
9661LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
9662}
9663
9664vector_reduce_fadd vector_reduce_fadd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9665LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
9666
9667 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));
9668LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
9669}
9670
9671void vector_reduce_fadd::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9672 assert(operands.size() == 2u && "mismatched number of parameters");
9673 odsState.addOperands(newOperands: operands);
9674 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
9675 odsState.addAttributes(newAttributes: discardableAttributes);
9676 assert(resultTypes.size() == 1u && "mismatched number of return types");
9677 odsState.addTypes(newTypes&: resultTypes);
9678}
9679
9680vector_reduce_fadd vector_reduce_fadd::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9681 ::mlir::OperationState __state__(location, getOperationName());
9682 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));
9683 auto __res__ = builder.create(state: __state__);
9684 assert((::llvm::isa<vector_reduce_fadd>(__res__)) && "builder didn't return the right type");
9685 return ::llvm::cast<vector_reduce_fadd>(Val: __res__);
9686}
9687
9688vector_reduce_fadd vector_reduce_fadd::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
9689 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));
9690}
9691
9692void vector_reduce_fadd::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
9693 ::mlir::Builder odsBuilder(opName.getContext());
9694 if (!properties.fastmathFlags)
9695 properties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: {});
9696}
9697
9698::llvm::LogicalResult vector_reduce_fadd::verifyInvariantsImpl() {
9699 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
9700
9701 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, attr: tblgen_fastmathFlags, attrName: "fastmathFlags")))
9702 return ::mlir::failure();
9703 {
9704 unsigned index = 0; (void)index;
9705 auto valueGroup0 = getODSOperands(index: 0);
9706
9707 for (auto v : valueGroup0) {
9708 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9709 return ::mlir::failure();
9710 }
9711 auto valueGroup1 = getODSOperands(index: 1);
9712
9713 for (auto v : valueGroup1) {
9714 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
9715 return ::mlir::failure();
9716 }
9717 }
9718 {
9719 unsigned index = 0; (void)index;
9720 auto valueGroup0 = getODSResults(index: 0);
9721
9722 for (auto v : valueGroup0) {
9723 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
9724 return ::mlir::failure();
9725 }
9726 }
9727 return ::mlir::success();
9728}
9729
9730::llvm::LogicalResult vector_reduce_fadd::verifyInvariants() {
9731 return verifyInvariantsImpl();
9732}
9733
9734::mlir::ParseResult vector_reduce_fadd::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
9735 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
9736 ::mlir::LLVM::FastmathFlagsAttr fastmathFlagsAttr;
9737 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
9738 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
9739 if (parser.parseLParen())
9740 return ::mlir::failure();
9741 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
9742 if (parser.parseOperandList(result&: allOperands))
9743 return ::mlir::failure();
9744 if (parser.parseRParen())
9745 return ::mlir::failure();
9746 if (::mlir::succeeded(Result: parser.parseOptionalKeyword(keyword: "fastmath"))) {
9747
9748 if (parser.parseCustomAttributeWithFallback(result&: fastmathFlagsAttr, type: ::mlir::Type{})) {
9749 return ::mlir::failure();
9750 }
9751 if (fastmathFlagsAttr) result.getOrAddProperties<vector_reduce_fadd::Properties>().fastmathFlags = fastmathFlagsAttr;
9752 }
9753 {
9754 auto loc = parser.getCurrentLocation();(void)loc;
9755 if (parser.parseOptionalAttrDict(result&: result.attributes))
9756 return ::mlir::failure();
9757 if (result.attributes.get(name: "fastmathFlags"))
9758 return parser.emitError(loc, message: "inherent attribute 'fastmathFlags' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
9759 }
9760 if (parser.parseColon())
9761 return ::mlir::failure();
9762
9763 ::mlir::FunctionType allOperand__allResult_functionType;
9764 if (parser.parseType(result&: allOperand__allResult_functionType))
9765 return ::mlir::failure();
9766 allOperandTypes = allOperand__allResult_functionType.getInputs();
9767 allResultTypes = allOperand__allResult_functionType.getResults();
9768 result.addTypes(newTypes: allResultTypes);
9769 // coverity[ARRAY_VS_SINGLETON]
9770 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
9771 return ::mlir::failure();
9772 return ::mlir::success();
9773}
9774
9775LLVM_ATTRIBUTE_MINSIZE void vector_reduce_fadd::print(::mlir::OpAsmPrinter &_odsPrinter) {
9776 _odsPrinter << "(";
9777 _odsPrinter << getOperation()->getOperands();
9778 _odsPrinter << ")";
9779 if (getFastmathFlagsAttr() != ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::OpBuilder((*this)->getContext()).getContext(), value: {})) {
9780 _odsPrinter << " fastmath";
9781 _odsPrinter.printStrippedAttrOrType(attrOrType: getFastmathFlagsAttr());
9782 }
9783 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
9784 _odsPrinter << " :";
9785 _odsPrinter << ' ';
9786 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
9787}
9788
9789void vector_reduce_fadd::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
9790}
9791
9792void vector_reduce_fadd::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
9793 Properties &properties = odsState.getOrAddProperties<Properties>();
9794 populateDefaultProperties(opName: odsState.name, properties);
9795 const ::llvm::StringRef inherentNames[] = {"fastmathFlags"};
9796 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
9797 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
9798 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
9799 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
9800 });
9801}
9802
9803
9804} // namespace mlir::LLVM
9805MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fadd)
9806MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_faddGenericAdaptorBase::Properties)
9807
9808namespace mlir::LLVM {
9809
9810
9811//===----------------------------------------------------------------------===//
9812// ::mlir::LLVM::vector_reduce_fmax definitions
9813//===----------------------------------------------------------------------===//
9814
9815namespace detail {
9816
9817vector_reduce_fmaxGenericAdaptorBase::vector_reduce_fmaxGenericAdaptorBase(vector_reduce_fmax op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
9818
9819::mlir::LLVM::FastmathFlagsAttr vector_reduce_fmaxGenericAdaptorBase::getFastmathFlagsAttr() {
9820 auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(Val: getProperties().fastmathFlags);
9821 return attr;
9822}
9823
9824::mlir::LLVM::FastmathFlags vector_reduce_fmaxGenericAdaptorBase::getFastmathFlags() {
9825 auto attr = getFastmathFlagsAttr();
9826 return attr.getValue();
9827}
9828
9829
9830} // namespace detail
9831vector_reduce_fmaxAdaptor::vector_reduce_fmaxAdaptor(vector_reduce_fmax op) : vector_reduce_fmaxGenericAdaptor(op->getOperands(), op) {}
9832
9833::llvm::LogicalResult vector_reduce_fmaxAdaptor::verify(::mlir::Location loc) {
9834 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
9835
9836 if (tblgen_fastmathFlags && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: tblgen_fastmathFlags))))
9837 return emitError(loc, message: "'llvm.intr.vector.reduce.fmax' op attribute 'fastmathFlags' failed to satisfy constraint: LLVM fastmath flags");
9838 return ::mlir::success();
9839}
9840
9841::llvm::LogicalResult vector_reduce_fmax::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9842 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
9843 if (!dict) {
9844 emitError() << "expected DictionaryAttr to set properties";
9845 return ::mlir::failure();
9846 }
9847
9848 {
9849 auto attr = dict.get(name: "fastmathFlags");
9850 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
9851 storage&: prop.fastmathFlags, attr, name: "fastmathFlags", emitError)))
9852 return ::mlir::failure();
9853 }
9854 return ::mlir::success();
9855}
9856
9857::mlir::Attribute vector_reduce_fmax::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
9858 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
9859 ::mlir::Builder odsBuilder{ctx};
9860 ::mlir::detail::appendAttributeProperty(attrs, name: "fastmathFlags", attr: prop.fastmathFlags);
9861
9862 if (!attrs.empty())
9863 return odsBuilder.getDictionaryAttr(value: attrs);
9864 return {};
9865}
9866
9867llvm::hash_code vector_reduce_fmax::computePropertiesHash(const Properties &prop) {
9868 using llvm::hash_value;
9869 return llvm::hash_combine(
9870 args: llvm::hash_value(ptr: prop.fastmathFlags.getAsOpaquePointer()));
9871}
9872
9873std::optional<mlir::Attribute> vector_reduce_fmax::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
9874 if (name == "fastmathFlags")
9875 return prop.fastmathFlags;
9876 return std::nullopt;
9877}
9878
9879void vector_reduce_fmax::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
9880 if (name == "fastmathFlags") {
9881 prop.fastmathFlags = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fastmathFlags)>>(Val&: value);
9882 return;
9883 }
9884}
9885
9886void vector_reduce_fmax::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
9887 if (prop.fastmathFlags) {
9888 ::mlir::Attribute value = prop.fastmathFlags;
9889 ::mlir::Attribute originalValue = value;
9890 visitor("fastmathFlags", value);
9891 if (value != originalValue)
9892 setInherentAttr(prop, name: "fastmathFlags", value);
9893 }
9894}
9895
9896::llvm::LogicalResult vector_reduce_fmax::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
9897 {
9898 ::mlir::Attribute attr = attrs.get(name: getFastmathFlagsAttrName(name: opName));
9899 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName: "fastmathFlags", emitError)))
9900 return ::mlir::failure();
9901 }
9902 return ::mlir::success();
9903}
9904
9905::llvm::LogicalResult vector_reduce_fmax::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
9906 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
9907 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.fastmathFlags)))
9908 return ::mlir::failure();
9909 return ::mlir::success();
9910}
9911
9912void vector_reduce_fmax::writeProperties(::mlir::DialectBytecodeWriter &writer) {
9913 auto &prop = getProperties(); (void)prop;
9914
9915 writer.writeOptionalAttribute(attr: prop.fastmathFlags);
9916}
9917
9918::mlir::LLVM::FastmathFlags vector_reduce_fmax::getFastmathFlags() {
9919 auto attr = getFastmathFlagsAttr();
9920 return attr.getValue();
9921}
9922
9923void vector_reduce_fmax::setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue) {
9924 getProperties().fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::Builder((*this)->getContext()).getContext(), value: attrValue);
9925}
9926
9927void vector_reduce_fmax::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9928 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9929 odsState.addOperands(newOperands: in);
9930 if (fastmathFlags) {
9931 odsProperties.fastmathFlags = fastmathFlags;
9932 }
9933 odsState.addTypes(newTypes: res);
9934}
9935
9936vector_reduce_fmax vector_reduce_fmax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9937 ::mlir::OperationState __state__(location, getOperationName());
9938 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9939 auto __res__ = builder.create(state: __state__);
9940 assert((::llvm::isa<vector_reduce_fmax>(__res__)) && "builder didn't return the right type");
9941 return ::llvm::cast<vector_reduce_fmax>(Val: __res__);
9942}
9943
9944vector_reduce_fmax vector_reduce_fmax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9945 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9946}
9947
9948void vector_reduce_fmax::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9949 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9950 odsState.addOperands(newOperands: in);
9951 if (fastmathFlags) {
9952 odsProperties.fastmathFlags = fastmathFlags;
9953 }
9954 assert(resultTypes.size() == 1u && "mismatched number of results");
9955 odsState.addTypes(newTypes&: resultTypes);
9956}
9957
9958vector_reduce_fmax vector_reduce_fmax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9959 ::mlir::OperationState __state__(location, getOperationName());
9960 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9961 auto __res__ = builder.create(state: __state__);
9962 assert((::llvm::isa<vector_reduce_fmax>(__res__)) && "builder didn't return the right type");
9963 return ::llvm::cast<vector_reduce_fmax>(Val: __res__);
9964}
9965
9966vector_reduce_fmax vector_reduce_fmax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
9967 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9968}
9969
9970void vector_reduce_fmax::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9971 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9972 odsState.addOperands(newOperands: in);
9973 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
9974 odsState.addTypes(newTypes: res);
9975}
9976
9977vector_reduce_fmax vector_reduce_fmax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9978 ::mlir::OperationState __state__(location, getOperationName());
9979 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9980 auto __res__ = builder.create(state: __state__);
9981 assert((::llvm::isa<vector_reduce_fmax>(__res__)) && "builder didn't return the right type");
9982 return ::llvm::cast<vector_reduce_fmax>(Val: __res__);
9983}
9984
9985vector_reduce_fmax vector_reduce_fmax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9986 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
9987}
9988
9989void vector_reduce_fmax::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9990 auto &odsProperties = odsState.getOrAddProperties<Properties>();
9991 odsState.addOperands(newOperands: in);
9992 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
9993 assert(resultTypes.size() == 1u && "mismatched number of results");
9994 odsState.addTypes(newTypes&: resultTypes);
9995}
9996
9997vector_reduce_fmax vector_reduce_fmax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
9998 ::mlir::OperationState __state__(location, getOperationName());
9999 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10000 auto __res__ = builder.create(state: __state__);
10001 assert((::llvm::isa<vector_reduce_fmax>(__res__)) && "builder didn't return the right type");
10002 return ::llvm::cast<vector_reduce_fmax>(Val: __res__);
10003}
10004
10005vector_reduce_fmax vector_reduce_fmax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10006 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10007}
10008
10009void vector_reduce_fmax::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10010 assert(operands.size() == 1u && "mismatched number of parameters");
10011 odsState.addOperands(newOperands: operands);
10012 buildPropertiesAndDiscardableAttributes(odsState, attributes);
10013 assert(resultTypes.size() == 1u && "mismatched number of return types");
10014 odsState.addTypes(newTypes&: resultTypes);
10015}
10016
10017vector_reduce_fmax vector_reduce_fmax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10018LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10019
10020 ::mlir::OperationState __state__(location, getOperationName());
10021 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));
10022 auto __res__ = builder.create(state: __state__);
10023 assert((::llvm::isa<vector_reduce_fmax>(__res__)) && "builder didn't return the right type");
10024 return ::llvm::cast<vector_reduce_fmax>(Val: __res__);
10025LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10026}
10027
10028vector_reduce_fmax vector_reduce_fmax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10029LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10030
10031 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));
10032LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10033}
10034
10035void vector_reduce_fmax::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10036 assert(operands.size() == 1u && "mismatched number of parameters");
10037 odsState.addOperands(newOperands: operands);
10038 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
10039 odsState.addAttributes(newAttributes: discardableAttributes);
10040 assert(resultTypes.size() == 1u && "mismatched number of return types");
10041 odsState.addTypes(newTypes&: resultTypes);
10042}
10043
10044vector_reduce_fmax vector_reduce_fmax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10045 ::mlir::OperationState __state__(location, getOperationName());
10046 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));
10047 auto __res__ = builder.create(state: __state__);
10048 assert((::llvm::isa<vector_reduce_fmax>(__res__)) && "builder didn't return the right type");
10049 return ::llvm::cast<vector_reduce_fmax>(Val: __res__);
10050}
10051
10052vector_reduce_fmax vector_reduce_fmax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10053 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));
10054}
10055
10056void vector_reduce_fmax::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
10057 ::mlir::Builder odsBuilder(opName.getContext());
10058 if (!properties.fastmathFlags)
10059 properties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: {});
10060}
10061
10062::llvm::LogicalResult vector_reduce_fmax::verifyInvariantsImpl() {
10063 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
10064
10065 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, attr: tblgen_fastmathFlags, attrName: "fastmathFlags")))
10066 return ::mlir::failure();
10067 {
10068 unsigned index = 0; (void)index;
10069 auto valueGroup0 = getODSOperands(index: 0);
10070
10071 for (auto v : valueGroup0) {
10072 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10073 return ::mlir::failure();
10074 }
10075 }
10076 {
10077 unsigned index = 0; (void)index;
10078 auto valueGroup0 = getODSResults(index: 0);
10079
10080 for (auto v : valueGroup0) {
10081 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
10082 return ::mlir::failure();
10083 }
10084 }
10085 return ::mlir::success();
10086}
10087
10088::llvm::LogicalResult vector_reduce_fmax::verifyInvariants() {
10089 return verifyInvariantsImpl();
10090}
10091
10092::mlir::ParseResult vector_reduce_fmax::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10093 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
10094 ::mlir::LLVM::FastmathFlagsAttr fastmathFlagsAttr;
10095 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
10096 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
10097 if (parser.parseLParen())
10098 return ::mlir::failure();
10099 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
10100 if (parser.parseOperandList(result&: allOperands))
10101 return ::mlir::failure();
10102 if (parser.parseRParen())
10103 return ::mlir::failure();
10104 if (::mlir::succeeded(Result: parser.parseOptionalKeyword(keyword: "fastmath"))) {
10105
10106 if (parser.parseCustomAttributeWithFallback(result&: fastmathFlagsAttr, type: ::mlir::Type{})) {
10107 return ::mlir::failure();
10108 }
10109 if (fastmathFlagsAttr) result.getOrAddProperties<vector_reduce_fmax::Properties>().fastmathFlags = fastmathFlagsAttr;
10110 }
10111 {
10112 auto loc = parser.getCurrentLocation();(void)loc;
10113 if (parser.parseOptionalAttrDict(result&: result.attributes))
10114 return ::mlir::failure();
10115 if (result.attributes.get(name: "fastmathFlags"))
10116 return parser.emitError(loc, message: "inherent attribute 'fastmathFlags' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
10117 }
10118 if (parser.parseColon())
10119 return ::mlir::failure();
10120
10121 ::mlir::FunctionType allOperand__allResult_functionType;
10122 if (parser.parseType(result&: allOperand__allResult_functionType))
10123 return ::mlir::failure();
10124 allOperandTypes = allOperand__allResult_functionType.getInputs();
10125 allResultTypes = allOperand__allResult_functionType.getResults();
10126 result.addTypes(newTypes: allResultTypes);
10127 // coverity[ARRAY_VS_SINGLETON]
10128 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
10129 return ::mlir::failure();
10130 return ::mlir::success();
10131}
10132
10133LLVM_ATTRIBUTE_MINSIZE void vector_reduce_fmax::print(::mlir::OpAsmPrinter &_odsPrinter) {
10134 _odsPrinter << "(";
10135 _odsPrinter << getOperation()->getOperands();
10136 _odsPrinter << ")";
10137 if (getFastmathFlagsAttr() != ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::OpBuilder((*this)->getContext()).getContext(), value: {})) {
10138 _odsPrinter << " fastmath";
10139 _odsPrinter.printStrippedAttrOrType(attrOrType: getFastmathFlagsAttr());
10140 }
10141 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
10142 _odsPrinter << " :";
10143 _odsPrinter << ' ';
10144 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
10145}
10146
10147void vector_reduce_fmax::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10148}
10149
10150void vector_reduce_fmax::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10151 Properties &properties = odsState.getOrAddProperties<Properties>();
10152 populateDefaultProperties(opName: odsState.name, properties);
10153 const ::llvm::StringRef inherentNames[] = {"fastmathFlags"};
10154 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
10155 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
10156 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
10157 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
10158 });
10159}
10160
10161
10162} // namespace mlir::LLVM
10163MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmax)
10164MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fmaxGenericAdaptorBase::Properties)
10165
10166namespace mlir::LLVM {
10167
10168
10169//===----------------------------------------------------------------------===//
10170// ::mlir::LLVM::vector_reduce_fmaximum definitions
10171//===----------------------------------------------------------------------===//
10172
10173namespace detail {
10174
10175vector_reduce_fmaximumGenericAdaptorBase::vector_reduce_fmaximumGenericAdaptorBase(vector_reduce_fmaximum op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10176
10177::mlir::LLVM::FastmathFlagsAttr vector_reduce_fmaximumGenericAdaptorBase::getFastmathFlagsAttr() {
10178 auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(Val: getProperties().fastmathFlags);
10179 return attr;
10180}
10181
10182::mlir::LLVM::FastmathFlags vector_reduce_fmaximumGenericAdaptorBase::getFastmathFlags() {
10183 auto attr = getFastmathFlagsAttr();
10184 return attr.getValue();
10185}
10186
10187
10188} // namespace detail
10189vector_reduce_fmaximumAdaptor::vector_reduce_fmaximumAdaptor(vector_reduce_fmaximum op) : vector_reduce_fmaximumGenericAdaptor(op->getOperands(), op) {}
10190
10191::llvm::LogicalResult vector_reduce_fmaximumAdaptor::verify(::mlir::Location loc) {
10192 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
10193
10194 if (tblgen_fastmathFlags && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: tblgen_fastmathFlags))))
10195 return emitError(loc, message: "'llvm.intr.vector.reduce.fmaximum' op attribute 'fastmathFlags' failed to satisfy constraint: LLVM fastmath flags");
10196 return ::mlir::success();
10197}
10198
10199::llvm::LogicalResult vector_reduce_fmaximum::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10200 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10201 if (!dict) {
10202 emitError() << "expected DictionaryAttr to set properties";
10203 return ::mlir::failure();
10204 }
10205
10206 {
10207 auto attr = dict.get(name: "fastmathFlags");
10208 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
10209 storage&: prop.fastmathFlags, attr, name: "fastmathFlags", emitError)))
10210 return ::mlir::failure();
10211 }
10212 return ::mlir::success();
10213}
10214
10215::mlir::Attribute vector_reduce_fmaximum::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10216 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10217 ::mlir::Builder odsBuilder{ctx};
10218 ::mlir::detail::appendAttributeProperty(attrs, name: "fastmathFlags", attr: prop.fastmathFlags);
10219
10220 if (!attrs.empty())
10221 return odsBuilder.getDictionaryAttr(value: attrs);
10222 return {};
10223}
10224
10225llvm::hash_code vector_reduce_fmaximum::computePropertiesHash(const Properties &prop) {
10226 using llvm::hash_value;
10227 return llvm::hash_combine(
10228 args: llvm::hash_value(ptr: prop.fastmathFlags.getAsOpaquePointer()));
10229}
10230
10231std::optional<mlir::Attribute> vector_reduce_fmaximum::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10232 if (name == "fastmathFlags")
10233 return prop.fastmathFlags;
10234 return std::nullopt;
10235}
10236
10237void vector_reduce_fmaximum::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10238 if (name == "fastmathFlags") {
10239 prop.fastmathFlags = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fastmathFlags)>>(Val&: value);
10240 return;
10241 }
10242}
10243
10244void vector_reduce_fmaximum::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
10245 if (prop.fastmathFlags) {
10246 ::mlir::Attribute value = prop.fastmathFlags;
10247 ::mlir::Attribute originalValue = value;
10248 visitor("fastmathFlags", value);
10249 if (value != originalValue)
10250 setInherentAttr(prop, name: "fastmathFlags", value);
10251 }
10252}
10253
10254::llvm::LogicalResult vector_reduce_fmaximum::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10255 {
10256 ::mlir::Attribute attr = attrs.get(name: getFastmathFlagsAttrName(name: opName));
10257 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName: "fastmathFlags", emitError)))
10258 return ::mlir::failure();
10259 }
10260 return ::mlir::success();
10261}
10262
10263::llvm::LogicalResult vector_reduce_fmaximum::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
10264 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
10265 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.fastmathFlags)))
10266 return ::mlir::failure();
10267 return ::mlir::success();
10268}
10269
10270void vector_reduce_fmaximum::writeProperties(::mlir::DialectBytecodeWriter &writer) {
10271 auto &prop = getProperties(); (void)prop;
10272
10273 writer.writeOptionalAttribute(attr: prop.fastmathFlags);
10274}
10275
10276::mlir::LLVM::FastmathFlags vector_reduce_fmaximum::getFastmathFlags() {
10277 auto attr = getFastmathFlagsAttr();
10278 return attr.getValue();
10279}
10280
10281void vector_reduce_fmaximum::setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue) {
10282 getProperties().fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::Builder((*this)->getContext()).getContext(), value: attrValue);
10283}
10284
10285void vector_reduce_fmaximum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10286 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10287 odsState.addOperands(newOperands: in);
10288 if (fastmathFlags) {
10289 odsProperties.fastmathFlags = fastmathFlags;
10290 }
10291 odsState.addTypes(newTypes: res);
10292}
10293
10294vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10295 ::mlir::OperationState __state__(location, getOperationName());
10296 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10297 auto __res__ = builder.create(state: __state__);
10298 assert((::llvm::isa<vector_reduce_fmaximum>(__res__)) && "builder didn't return the right type");
10299 return ::llvm::cast<vector_reduce_fmaximum>(Val: __res__);
10300}
10301
10302vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10303 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10304}
10305
10306void vector_reduce_fmaximum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10307 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10308 odsState.addOperands(newOperands: in);
10309 if (fastmathFlags) {
10310 odsProperties.fastmathFlags = fastmathFlags;
10311 }
10312 assert(resultTypes.size() == 1u && "mismatched number of results");
10313 odsState.addTypes(newTypes&: resultTypes);
10314}
10315
10316vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10317 ::mlir::OperationState __state__(location, getOperationName());
10318 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10319 auto __res__ = builder.create(state: __state__);
10320 assert((::llvm::isa<vector_reduce_fmaximum>(__res__)) && "builder didn't return the right type");
10321 return ::llvm::cast<vector_reduce_fmaximum>(Val: __res__);
10322}
10323
10324vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10325 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10326}
10327
10328void vector_reduce_fmaximum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10329 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10330 odsState.addOperands(newOperands: in);
10331 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
10332 odsState.addTypes(newTypes: res);
10333}
10334
10335vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10336 ::mlir::OperationState __state__(location, getOperationName());
10337 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10338 auto __res__ = builder.create(state: __state__);
10339 assert((::llvm::isa<vector_reduce_fmaximum>(__res__)) && "builder didn't return the right type");
10340 return ::llvm::cast<vector_reduce_fmaximum>(Val: __res__);
10341}
10342
10343vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10344 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10345}
10346
10347void vector_reduce_fmaximum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10348 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10349 odsState.addOperands(newOperands: in);
10350 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
10351 assert(resultTypes.size() == 1u && "mismatched number of results");
10352 odsState.addTypes(newTypes&: resultTypes);
10353}
10354
10355vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10356 ::mlir::OperationState __state__(location, getOperationName());
10357 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10358 auto __res__ = builder.create(state: __state__);
10359 assert((::llvm::isa<vector_reduce_fmaximum>(__res__)) && "builder didn't return the right type");
10360 return ::llvm::cast<vector_reduce_fmaximum>(Val: __res__);
10361}
10362
10363vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10364 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10365}
10366
10367void vector_reduce_fmaximum::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10368 assert(operands.size() == 1u && "mismatched number of parameters");
10369 odsState.addOperands(newOperands: operands);
10370 buildPropertiesAndDiscardableAttributes(odsState, attributes);
10371 assert(resultTypes.size() == 1u && "mismatched number of return types");
10372 odsState.addTypes(newTypes&: resultTypes);
10373}
10374
10375vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10376LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10377
10378 ::mlir::OperationState __state__(location, getOperationName());
10379 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));
10380 auto __res__ = builder.create(state: __state__);
10381 assert((::llvm::isa<vector_reduce_fmaximum>(__res__)) && "builder didn't return the right type");
10382 return ::llvm::cast<vector_reduce_fmaximum>(Val: __res__);
10383LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10384}
10385
10386vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10387LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10388
10389 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));
10390LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10391}
10392
10393void vector_reduce_fmaximum::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10394 assert(operands.size() == 1u && "mismatched number of parameters");
10395 odsState.addOperands(newOperands: operands);
10396 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
10397 odsState.addAttributes(newAttributes: discardableAttributes);
10398 assert(resultTypes.size() == 1u && "mismatched number of return types");
10399 odsState.addTypes(newTypes&: resultTypes);
10400}
10401
10402vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10403 ::mlir::OperationState __state__(location, getOperationName());
10404 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));
10405 auto __res__ = builder.create(state: __state__);
10406 assert((::llvm::isa<vector_reduce_fmaximum>(__res__)) && "builder didn't return the right type");
10407 return ::llvm::cast<vector_reduce_fmaximum>(Val: __res__);
10408}
10409
10410vector_reduce_fmaximum vector_reduce_fmaximum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10411 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));
10412}
10413
10414void vector_reduce_fmaximum::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
10415 ::mlir::Builder odsBuilder(opName.getContext());
10416 if (!properties.fastmathFlags)
10417 properties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: {});
10418}
10419
10420::llvm::LogicalResult vector_reduce_fmaximum::verifyInvariantsImpl() {
10421 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
10422
10423 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, attr: tblgen_fastmathFlags, attrName: "fastmathFlags")))
10424 return ::mlir::failure();
10425 {
10426 unsigned index = 0; (void)index;
10427 auto valueGroup0 = getODSOperands(index: 0);
10428
10429 for (auto v : valueGroup0) {
10430 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10431 return ::mlir::failure();
10432 }
10433 }
10434 {
10435 unsigned index = 0; (void)index;
10436 auto valueGroup0 = getODSResults(index: 0);
10437
10438 for (auto v : valueGroup0) {
10439 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
10440 return ::mlir::failure();
10441 }
10442 }
10443 return ::mlir::success();
10444}
10445
10446::llvm::LogicalResult vector_reduce_fmaximum::verifyInvariants() {
10447 return verifyInvariantsImpl();
10448}
10449
10450::mlir::ParseResult vector_reduce_fmaximum::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10451 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
10452 ::mlir::LLVM::FastmathFlagsAttr fastmathFlagsAttr;
10453 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
10454 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
10455 if (parser.parseLParen())
10456 return ::mlir::failure();
10457 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
10458 if (parser.parseOperandList(result&: allOperands))
10459 return ::mlir::failure();
10460 if (parser.parseRParen())
10461 return ::mlir::failure();
10462 if (::mlir::succeeded(Result: parser.parseOptionalKeyword(keyword: "fastmath"))) {
10463
10464 if (parser.parseCustomAttributeWithFallback(result&: fastmathFlagsAttr, type: ::mlir::Type{})) {
10465 return ::mlir::failure();
10466 }
10467 if (fastmathFlagsAttr) result.getOrAddProperties<vector_reduce_fmaximum::Properties>().fastmathFlags = fastmathFlagsAttr;
10468 }
10469 {
10470 auto loc = parser.getCurrentLocation();(void)loc;
10471 if (parser.parseOptionalAttrDict(result&: result.attributes))
10472 return ::mlir::failure();
10473 if (result.attributes.get(name: "fastmathFlags"))
10474 return parser.emitError(loc, message: "inherent attribute 'fastmathFlags' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
10475 }
10476 if (parser.parseColon())
10477 return ::mlir::failure();
10478
10479 ::mlir::FunctionType allOperand__allResult_functionType;
10480 if (parser.parseType(result&: allOperand__allResult_functionType))
10481 return ::mlir::failure();
10482 allOperandTypes = allOperand__allResult_functionType.getInputs();
10483 allResultTypes = allOperand__allResult_functionType.getResults();
10484 result.addTypes(newTypes: allResultTypes);
10485 // coverity[ARRAY_VS_SINGLETON]
10486 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
10487 return ::mlir::failure();
10488 return ::mlir::success();
10489}
10490
10491LLVM_ATTRIBUTE_MINSIZE void vector_reduce_fmaximum::print(::mlir::OpAsmPrinter &_odsPrinter) {
10492 _odsPrinter << "(";
10493 _odsPrinter << getOperation()->getOperands();
10494 _odsPrinter << ")";
10495 if (getFastmathFlagsAttr() != ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::OpBuilder((*this)->getContext()).getContext(), value: {})) {
10496 _odsPrinter << " fastmath";
10497 _odsPrinter.printStrippedAttrOrType(attrOrType: getFastmathFlagsAttr());
10498 }
10499 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
10500 _odsPrinter << " :";
10501 _odsPrinter << ' ';
10502 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
10503}
10504
10505void vector_reduce_fmaximum::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10506}
10507
10508void vector_reduce_fmaximum::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10509 Properties &properties = odsState.getOrAddProperties<Properties>();
10510 populateDefaultProperties(opName: odsState.name, properties);
10511 const ::llvm::StringRef inherentNames[] = {"fastmathFlags"};
10512 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
10513 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
10514 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
10515 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
10516 });
10517}
10518
10519
10520} // namespace mlir::LLVM
10521MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmaximum)
10522MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fmaximumGenericAdaptorBase::Properties)
10523
10524namespace mlir::LLVM {
10525
10526
10527//===----------------------------------------------------------------------===//
10528// ::mlir::LLVM::vector_reduce_fmaximumnum definitions
10529//===----------------------------------------------------------------------===//
10530
10531namespace detail {
10532
10533vector_reduce_fmaximumnumGenericAdaptorBase::vector_reduce_fmaximumnumGenericAdaptorBase(vector_reduce_fmaximumnum op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10534
10535::mlir::LLVM::FastmathFlagsAttr vector_reduce_fmaximumnumGenericAdaptorBase::getFastmathFlagsAttr() {
10536 auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(Val: getProperties().fastmathFlags);
10537 return attr;
10538}
10539
10540::mlir::LLVM::FastmathFlags vector_reduce_fmaximumnumGenericAdaptorBase::getFastmathFlags() {
10541 auto attr = getFastmathFlagsAttr();
10542 return attr.getValue();
10543}
10544
10545
10546} // namespace detail
10547vector_reduce_fmaximumnumAdaptor::vector_reduce_fmaximumnumAdaptor(vector_reduce_fmaximumnum op) : vector_reduce_fmaximumnumGenericAdaptor(op->getOperands(), op) {}
10548
10549::llvm::LogicalResult vector_reduce_fmaximumnumAdaptor::verify(::mlir::Location loc) {
10550 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
10551
10552 if (tblgen_fastmathFlags && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: tblgen_fastmathFlags))))
10553 return emitError(loc, message: "'llvm.intr.vector.reduce.fmaximumnum' op attribute 'fastmathFlags' failed to satisfy constraint: LLVM fastmath flags");
10554 return ::mlir::success();
10555}
10556
10557::llvm::LogicalResult vector_reduce_fmaximumnum::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10558 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10559 if (!dict) {
10560 emitError() << "expected DictionaryAttr to set properties";
10561 return ::mlir::failure();
10562 }
10563
10564 {
10565 auto attr = dict.get(name: "fastmathFlags");
10566 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
10567 storage&: prop.fastmathFlags, attr, name: "fastmathFlags", emitError)))
10568 return ::mlir::failure();
10569 }
10570 return ::mlir::success();
10571}
10572
10573::mlir::Attribute vector_reduce_fmaximumnum::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10574 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10575 ::mlir::Builder odsBuilder{ctx};
10576 ::mlir::detail::appendAttributeProperty(attrs, name: "fastmathFlags", attr: prop.fastmathFlags);
10577
10578 if (!attrs.empty())
10579 return odsBuilder.getDictionaryAttr(value: attrs);
10580 return {};
10581}
10582
10583llvm::hash_code vector_reduce_fmaximumnum::computePropertiesHash(const Properties &prop) {
10584 using llvm::hash_value;
10585 return llvm::hash_combine(
10586 args: llvm::hash_value(ptr: prop.fastmathFlags.getAsOpaquePointer()));
10587}
10588
10589std::optional<mlir::Attribute> vector_reduce_fmaximumnum::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10590 if (name == "fastmathFlags")
10591 return prop.fastmathFlags;
10592 return std::nullopt;
10593}
10594
10595void vector_reduce_fmaximumnum::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10596 if (name == "fastmathFlags") {
10597 prop.fastmathFlags = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fastmathFlags)>>(Val&: value);
10598 return;
10599 }
10600}
10601
10602void vector_reduce_fmaximumnum::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
10603 if (prop.fastmathFlags) {
10604 ::mlir::Attribute value = prop.fastmathFlags;
10605 ::mlir::Attribute originalValue = value;
10606 visitor("fastmathFlags", value);
10607 if (value != originalValue)
10608 setInherentAttr(prop, name: "fastmathFlags", value);
10609 }
10610}
10611
10612::llvm::LogicalResult vector_reduce_fmaximumnum::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10613 {
10614 ::mlir::Attribute attr = attrs.get(name: getFastmathFlagsAttrName(name: opName));
10615 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName: "fastmathFlags", emitError)))
10616 return ::mlir::failure();
10617 }
10618 return ::mlir::success();
10619}
10620
10621::llvm::LogicalResult vector_reduce_fmaximumnum::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
10622 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
10623 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.fastmathFlags)))
10624 return ::mlir::failure();
10625 return ::mlir::success();
10626}
10627
10628void vector_reduce_fmaximumnum::writeProperties(::mlir::DialectBytecodeWriter &writer) {
10629 auto &prop = getProperties(); (void)prop;
10630
10631 writer.writeOptionalAttribute(attr: prop.fastmathFlags);
10632}
10633
10634::mlir::LLVM::FastmathFlags vector_reduce_fmaximumnum::getFastmathFlags() {
10635 auto attr = getFastmathFlagsAttr();
10636 return attr.getValue();
10637}
10638
10639void vector_reduce_fmaximumnum::setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue) {
10640 getProperties().fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::Builder((*this)->getContext()).getContext(), value: attrValue);
10641}
10642
10643void vector_reduce_fmaximumnum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10644 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10645 odsState.addOperands(newOperands: in);
10646 if (fastmathFlags) {
10647 odsProperties.fastmathFlags = fastmathFlags;
10648 }
10649 odsState.addTypes(newTypes: res);
10650}
10651
10652vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10653 ::mlir::OperationState __state__(location, getOperationName());
10654 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10655 auto __res__ = builder.create(state: __state__);
10656 assert((::llvm::isa<vector_reduce_fmaximumnum>(__res__)) && "builder didn't return the right type");
10657 return ::llvm::cast<vector_reduce_fmaximumnum>(Val: __res__);
10658}
10659
10660vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10661 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10662}
10663
10664void vector_reduce_fmaximumnum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10665 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10666 odsState.addOperands(newOperands: in);
10667 if (fastmathFlags) {
10668 odsProperties.fastmathFlags = fastmathFlags;
10669 }
10670 assert(resultTypes.size() == 1u && "mismatched number of results");
10671 odsState.addTypes(newTypes&: resultTypes);
10672}
10673
10674vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10675 ::mlir::OperationState __state__(location, getOperationName());
10676 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10677 auto __res__ = builder.create(state: __state__);
10678 assert((::llvm::isa<vector_reduce_fmaximumnum>(__res__)) && "builder didn't return the right type");
10679 return ::llvm::cast<vector_reduce_fmaximumnum>(Val: __res__);
10680}
10681
10682vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
10683 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10684}
10685
10686void vector_reduce_fmaximumnum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10687 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10688 odsState.addOperands(newOperands: in);
10689 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
10690 odsState.addTypes(newTypes: res);
10691}
10692
10693vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10694 ::mlir::OperationState __state__(location, getOperationName());
10695 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10696 auto __res__ = builder.create(state: __state__);
10697 assert((::llvm::isa<vector_reduce_fmaximumnum>(__res__)) && "builder didn't return the right type");
10698 return ::llvm::cast<vector_reduce_fmaximumnum>(Val: __res__);
10699}
10700
10701vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10702 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10703}
10704
10705void vector_reduce_fmaximumnum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10706 auto &odsProperties = odsState.getOrAddProperties<Properties>();
10707 odsState.addOperands(newOperands: in);
10708 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
10709 assert(resultTypes.size() == 1u && "mismatched number of results");
10710 odsState.addTypes(newTypes&: resultTypes);
10711}
10712
10713vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10714 ::mlir::OperationState __state__(location, getOperationName());
10715 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10716 auto __res__ = builder.create(state: __state__);
10717 assert((::llvm::isa<vector_reduce_fmaximumnum>(__res__)) && "builder didn't return the right type");
10718 return ::llvm::cast<vector_reduce_fmaximumnum>(Val: __res__);
10719}
10720
10721vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
10722 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
10723}
10724
10725void vector_reduce_fmaximumnum::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10726 assert(operands.size() == 1u && "mismatched number of parameters");
10727 odsState.addOperands(newOperands: operands);
10728 buildPropertiesAndDiscardableAttributes(odsState, attributes);
10729 assert(resultTypes.size() == 1u && "mismatched number of return types");
10730 odsState.addTypes(newTypes&: resultTypes);
10731}
10732
10733vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10734LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10735
10736 ::mlir::OperationState __state__(location, getOperationName());
10737 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));
10738 auto __res__ = builder.create(state: __state__);
10739 assert((::llvm::isa<vector_reduce_fmaximumnum>(__res__)) && "builder didn't return the right type");
10740 return ::llvm::cast<vector_reduce_fmaximumnum>(Val: __res__);
10741LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10742}
10743
10744vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10745LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
10746
10747 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));
10748LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
10749}
10750
10751void vector_reduce_fmaximumnum::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10752 assert(operands.size() == 1u && "mismatched number of parameters");
10753 odsState.addOperands(newOperands: operands);
10754 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
10755 odsState.addAttributes(newAttributes: discardableAttributes);
10756 assert(resultTypes.size() == 1u && "mismatched number of return types");
10757 odsState.addTypes(newTypes&: resultTypes);
10758}
10759
10760vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10761 ::mlir::OperationState __state__(location, getOperationName());
10762 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));
10763 auto __res__ = builder.create(state: __state__);
10764 assert((::llvm::isa<vector_reduce_fmaximumnum>(__res__)) && "builder didn't return the right type");
10765 return ::llvm::cast<vector_reduce_fmaximumnum>(Val: __res__);
10766}
10767
10768vector_reduce_fmaximumnum vector_reduce_fmaximumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
10769 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));
10770}
10771
10772void vector_reduce_fmaximumnum::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
10773 ::mlir::Builder odsBuilder(opName.getContext());
10774 if (!properties.fastmathFlags)
10775 properties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: {});
10776}
10777
10778::llvm::LogicalResult vector_reduce_fmaximumnum::verifyInvariantsImpl() {
10779 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
10780
10781 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, attr: tblgen_fastmathFlags, attrName: "fastmathFlags")))
10782 return ::mlir::failure();
10783 {
10784 unsigned index = 0; (void)index;
10785 auto valueGroup0 = getODSOperands(index: 0);
10786
10787 for (auto v : valueGroup0) {
10788 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
10789 return ::mlir::failure();
10790 }
10791 }
10792 {
10793 unsigned index = 0; (void)index;
10794 auto valueGroup0 = getODSResults(index: 0);
10795
10796 for (auto v : valueGroup0) {
10797 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
10798 return ::mlir::failure();
10799 }
10800 }
10801 return ::mlir::success();
10802}
10803
10804::llvm::LogicalResult vector_reduce_fmaximumnum::verifyInvariants() {
10805 return verifyInvariantsImpl();
10806}
10807
10808::mlir::ParseResult vector_reduce_fmaximumnum::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
10809 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
10810 ::mlir::LLVM::FastmathFlagsAttr fastmathFlagsAttr;
10811 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
10812 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
10813 if (parser.parseLParen())
10814 return ::mlir::failure();
10815 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
10816 if (parser.parseOperandList(result&: allOperands))
10817 return ::mlir::failure();
10818 if (parser.parseRParen())
10819 return ::mlir::failure();
10820 if (::mlir::succeeded(Result: parser.parseOptionalKeyword(keyword: "fastmath"))) {
10821
10822 if (parser.parseCustomAttributeWithFallback(result&: fastmathFlagsAttr, type: ::mlir::Type{})) {
10823 return ::mlir::failure();
10824 }
10825 if (fastmathFlagsAttr) result.getOrAddProperties<vector_reduce_fmaximumnum::Properties>().fastmathFlags = fastmathFlagsAttr;
10826 }
10827 {
10828 auto loc = parser.getCurrentLocation();(void)loc;
10829 if (parser.parseOptionalAttrDict(result&: result.attributes))
10830 return ::mlir::failure();
10831 if (result.attributes.get(name: "fastmathFlags"))
10832 return parser.emitError(loc, message: "inherent attribute 'fastmathFlags' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
10833 }
10834 if (parser.parseColon())
10835 return ::mlir::failure();
10836
10837 ::mlir::FunctionType allOperand__allResult_functionType;
10838 if (parser.parseType(result&: allOperand__allResult_functionType))
10839 return ::mlir::failure();
10840 allOperandTypes = allOperand__allResult_functionType.getInputs();
10841 allResultTypes = allOperand__allResult_functionType.getResults();
10842 result.addTypes(newTypes: allResultTypes);
10843 // coverity[ARRAY_VS_SINGLETON]
10844 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
10845 return ::mlir::failure();
10846 return ::mlir::success();
10847}
10848
10849LLVM_ATTRIBUTE_MINSIZE void vector_reduce_fmaximumnum::print(::mlir::OpAsmPrinter &_odsPrinter) {
10850 _odsPrinter << "(";
10851 _odsPrinter << getOperation()->getOperands();
10852 _odsPrinter << ")";
10853 if (getFastmathFlagsAttr() != ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::OpBuilder((*this)->getContext()).getContext(), value: {})) {
10854 _odsPrinter << " fastmath";
10855 _odsPrinter.printStrippedAttrOrType(attrOrType: getFastmathFlagsAttr());
10856 }
10857 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
10858 _odsPrinter << " :";
10859 _odsPrinter << ' ';
10860 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
10861}
10862
10863void vector_reduce_fmaximumnum::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
10864}
10865
10866void vector_reduce_fmaximumnum::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
10867 Properties &properties = odsState.getOrAddProperties<Properties>();
10868 populateDefaultProperties(opName: odsState.name, properties);
10869 const ::llvm::StringRef inherentNames[] = {"fastmathFlags"};
10870 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
10871 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
10872 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
10873 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
10874 });
10875}
10876
10877
10878} // namespace mlir::LLVM
10879MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmaximumnum)
10880MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fmaximumnumGenericAdaptorBase::Properties)
10881
10882namespace mlir::LLVM {
10883
10884
10885//===----------------------------------------------------------------------===//
10886// ::mlir::LLVM::vector_reduce_fmin definitions
10887//===----------------------------------------------------------------------===//
10888
10889namespace detail {
10890
10891vector_reduce_fminGenericAdaptorBase::vector_reduce_fminGenericAdaptorBase(vector_reduce_fmin op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
10892
10893::mlir::LLVM::FastmathFlagsAttr vector_reduce_fminGenericAdaptorBase::getFastmathFlagsAttr() {
10894 auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(Val: getProperties().fastmathFlags);
10895 return attr;
10896}
10897
10898::mlir::LLVM::FastmathFlags vector_reduce_fminGenericAdaptorBase::getFastmathFlags() {
10899 auto attr = getFastmathFlagsAttr();
10900 return attr.getValue();
10901}
10902
10903
10904} // namespace detail
10905vector_reduce_fminAdaptor::vector_reduce_fminAdaptor(vector_reduce_fmin op) : vector_reduce_fminGenericAdaptor(op->getOperands(), op) {}
10906
10907::llvm::LogicalResult vector_reduce_fminAdaptor::verify(::mlir::Location loc) {
10908 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
10909
10910 if (tblgen_fastmathFlags && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: tblgen_fastmathFlags))))
10911 return emitError(loc, message: "'llvm.intr.vector.reduce.fmin' op attribute 'fastmathFlags' failed to satisfy constraint: LLVM fastmath flags");
10912 return ::mlir::success();
10913}
10914
10915::llvm::LogicalResult vector_reduce_fmin::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10916 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
10917 if (!dict) {
10918 emitError() << "expected DictionaryAttr to set properties";
10919 return ::mlir::failure();
10920 }
10921
10922 {
10923 auto attr = dict.get(name: "fastmathFlags");
10924 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
10925 storage&: prop.fastmathFlags, attr, name: "fastmathFlags", emitError)))
10926 return ::mlir::failure();
10927 }
10928 return ::mlir::success();
10929}
10930
10931::mlir::Attribute vector_reduce_fmin::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
10932 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
10933 ::mlir::Builder odsBuilder{ctx};
10934 ::mlir::detail::appendAttributeProperty(attrs, name: "fastmathFlags", attr: prop.fastmathFlags);
10935
10936 if (!attrs.empty())
10937 return odsBuilder.getDictionaryAttr(value: attrs);
10938 return {};
10939}
10940
10941llvm::hash_code vector_reduce_fmin::computePropertiesHash(const Properties &prop) {
10942 using llvm::hash_value;
10943 return llvm::hash_combine(
10944 args: llvm::hash_value(ptr: prop.fastmathFlags.getAsOpaquePointer()));
10945}
10946
10947std::optional<mlir::Attribute> vector_reduce_fmin::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
10948 if (name == "fastmathFlags")
10949 return prop.fastmathFlags;
10950 return std::nullopt;
10951}
10952
10953void vector_reduce_fmin::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
10954 if (name == "fastmathFlags") {
10955 prop.fastmathFlags = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fastmathFlags)>>(Val&: value);
10956 return;
10957 }
10958}
10959
10960void vector_reduce_fmin::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
10961 if (prop.fastmathFlags) {
10962 ::mlir::Attribute value = prop.fastmathFlags;
10963 ::mlir::Attribute originalValue = value;
10964 visitor("fastmathFlags", value);
10965 if (value != originalValue)
10966 setInherentAttr(prop, name: "fastmathFlags", value);
10967 }
10968}
10969
10970::llvm::LogicalResult vector_reduce_fmin::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
10971 {
10972 ::mlir::Attribute attr = attrs.get(name: getFastmathFlagsAttrName(name: opName));
10973 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName: "fastmathFlags", emitError)))
10974 return ::mlir::failure();
10975 }
10976 return ::mlir::success();
10977}
10978
10979::llvm::LogicalResult vector_reduce_fmin::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
10980 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
10981 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.fastmathFlags)))
10982 return ::mlir::failure();
10983 return ::mlir::success();
10984}
10985
10986void vector_reduce_fmin::writeProperties(::mlir::DialectBytecodeWriter &writer) {
10987 auto &prop = getProperties(); (void)prop;
10988
10989 writer.writeOptionalAttribute(attr: prop.fastmathFlags);
10990}
10991
10992::mlir::LLVM::FastmathFlags vector_reduce_fmin::getFastmathFlags() {
10993 auto attr = getFastmathFlagsAttr();
10994 return attr.getValue();
10995}
10996
10997void vector_reduce_fmin::setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue) {
10998 getProperties().fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::Builder((*this)->getContext()).getContext(), value: attrValue);
10999}
11000
11001void vector_reduce_fmin::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11002 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11003 odsState.addOperands(newOperands: in);
11004 if (fastmathFlags) {
11005 odsProperties.fastmathFlags = fastmathFlags;
11006 }
11007 odsState.addTypes(newTypes: res);
11008}
11009
11010vector_reduce_fmin vector_reduce_fmin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11011 ::mlir::OperationState __state__(location, getOperationName());
11012 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11013 auto __res__ = builder.create(state: __state__);
11014 assert((::llvm::isa<vector_reduce_fmin>(__res__)) && "builder didn't return the right type");
11015 return ::llvm::cast<vector_reduce_fmin>(Val: __res__);
11016}
11017
11018vector_reduce_fmin vector_reduce_fmin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11019 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11020}
11021
11022void vector_reduce_fmin::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11023 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11024 odsState.addOperands(newOperands: in);
11025 if (fastmathFlags) {
11026 odsProperties.fastmathFlags = fastmathFlags;
11027 }
11028 assert(resultTypes.size() == 1u && "mismatched number of results");
11029 odsState.addTypes(newTypes&: resultTypes);
11030}
11031
11032vector_reduce_fmin vector_reduce_fmin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11033 ::mlir::OperationState __state__(location, getOperationName());
11034 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11035 auto __res__ = builder.create(state: __state__);
11036 assert((::llvm::isa<vector_reduce_fmin>(__res__)) && "builder didn't return the right type");
11037 return ::llvm::cast<vector_reduce_fmin>(Val: __res__);
11038}
11039
11040vector_reduce_fmin vector_reduce_fmin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11041 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11042}
11043
11044void vector_reduce_fmin::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11045 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11046 odsState.addOperands(newOperands: in);
11047 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
11048 odsState.addTypes(newTypes: res);
11049}
11050
11051vector_reduce_fmin vector_reduce_fmin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11052 ::mlir::OperationState __state__(location, getOperationName());
11053 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11054 auto __res__ = builder.create(state: __state__);
11055 assert((::llvm::isa<vector_reduce_fmin>(__res__)) && "builder didn't return the right type");
11056 return ::llvm::cast<vector_reduce_fmin>(Val: __res__);
11057}
11058
11059vector_reduce_fmin vector_reduce_fmin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11060 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11061}
11062
11063void vector_reduce_fmin::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11064 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11065 odsState.addOperands(newOperands: in);
11066 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
11067 assert(resultTypes.size() == 1u && "mismatched number of results");
11068 odsState.addTypes(newTypes&: resultTypes);
11069}
11070
11071vector_reduce_fmin vector_reduce_fmin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11072 ::mlir::OperationState __state__(location, getOperationName());
11073 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11074 auto __res__ = builder.create(state: __state__);
11075 assert((::llvm::isa<vector_reduce_fmin>(__res__)) && "builder didn't return the right type");
11076 return ::llvm::cast<vector_reduce_fmin>(Val: __res__);
11077}
11078
11079vector_reduce_fmin vector_reduce_fmin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11080 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11081}
11082
11083void vector_reduce_fmin::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11084 assert(operands.size() == 1u && "mismatched number of parameters");
11085 odsState.addOperands(newOperands: operands);
11086 buildPropertiesAndDiscardableAttributes(odsState, attributes);
11087 assert(resultTypes.size() == 1u && "mismatched number of return types");
11088 odsState.addTypes(newTypes&: resultTypes);
11089}
11090
11091vector_reduce_fmin vector_reduce_fmin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11092LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11093
11094 ::mlir::OperationState __state__(location, getOperationName());
11095 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));
11096 auto __res__ = builder.create(state: __state__);
11097 assert((::llvm::isa<vector_reduce_fmin>(__res__)) && "builder didn't return the right type");
11098 return ::llvm::cast<vector_reduce_fmin>(Val: __res__);
11099LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11100}
11101
11102vector_reduce_fmin vector_reduce_fmin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11103LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11104
11105 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));
11106LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11107}
11108
11109void vector_reduce_fmin::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11110 assert(operands.size() == 1u && "mismatched number of parameters");
11111 odsState.addOperands(newOperands: operands);
11112 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
11113 odsState.addAttributes(newAttributes: discardableAttributes);
11114 assert(resultTypes.size() == 1u && "mismatched number of return types");
11115 odsState.addTypes(newTypes&: resultTypes);
11116}
11117
11118vector_reduce_fmin vector_reduce_fmin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11119 ::mlir::OperationState __state__(location, getOperationName());
11120 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));
11121 auto __res__ = builder.create(state: __state__);
11122 assert((::llvm::isa<vector_reduce_fmin>(__res__)) && "builder didn't return the right type");
11123 return ::llvm::cast<vector_reduce_fmin>(Val: __res__);
11124}
11125
11126vector_reduce_fmin vector_reduce_fmin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11127 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));
11128}
11129
11130void vector_reduce_fmin::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
11131 ::mlir::Builder odsBuilder(opName.getContext());
11132 if (!properties.fastmathFlags)
11133 properties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: {});
11134}
11135
11136::llvm::LogicalResult vector_reduce_fmin::verifyInvariantsImpl() {
11137 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
11138
11139 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, attr: tblgen_fastmathFlags, attrName: "fastmathFlags")))
11140 return ::mlir::failure();
11141 {
11142 unsigned index = 0; (void)index;
11143 auto valueGroup0 = getODSOperands(index: 0);
11144
11145 for (auto v : valueGroup0) {
11146 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11147 return ::mlir::failure();
11148 }
11149 }
11150 {
11151 unsigned index = 0; (void)index;
11152 auto valueGroup0 = getODSResults(index: 0);
11153
11154 for (auto v : valueGroup0) {
11155 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
11156 return ::mlir::failure();
11157 }
11158 }
11159 return ::mlir::success();
11160}
11161
11162::llvm::LogicalResult vector_reduce_fmin::verifyInvariants() {
11163 return verifyInvariantsImpl();
11164}
11165
11166::mlir::ParseResult vector_reduce_fmin::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
11167 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
11168 ::mlir::LLVM::FastmathFlagsAttr fastmathFlagsAttr;
11169 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
11170 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
11171 if (parser.parseLParen())
11172 return ::mlir::failure();
11173 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
11174 if (parser.parseOperandList(result&: allOperands))
11175 return ::mlir::failure();
11176 if (parser.parseRParen())
11177 return ::mlir::failure();
11178 if (::mlir::succeeded(Result: parser.parseOptionalKeyword(keyword: "fastmath"))) {
11179
11180 if (parser.parseCustomAttributeWithFallback(result&: fastmathFlagsAttr, type: ::mlir::Type{})) {
11181 return ::mlir::failure();
11182 }
11183 if (fastmathFlagsAttr) result.getOrAddProperties<vector_reduce_fmin::Properties>().fastmathFlags = fastmathFlagsAttr;
11184 }
11185 {
11186 auto loc = parser.getCurrentLocation();(void)loc;
11187 if (parser.parseOptionalAttrDict(result&: result.attributes))
11188 return ::mlir::failure();
11189 if (result.attributes.get(name: "fastmathFlags"))
11190 return parser.emitError(loc, message: "inherent attribute 'fastmathFlags' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
11191 }
11192 if (parser.parseColon())
11193 return ::mlir::failure();
11194
11195 ::mlir::FunctionType allOperand__allResult_functionType;
11196 if (parser.parseType(result&: allOperand__allResult_functionType))
11197 return ::mlir::failure();
11198 allOperandTypes = allOperand__allResult_functionType.getInputs();
11199 allResultTypes = allOperand__allResult_functionType.getResults();
11200 result.addTypes(newTypes: allResultTypes);
11201 // coverity[ARRAY_VS_SINGLETON]
11202 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
11203 return ::mlir::failure();
11204 return ::mlir::success();
11205}
11206
11207LLVM_ATTRIBUTE_MINSIZE void vector_reduce_fmin::print(::mlir::OpAsmPrinter &_odsPrinter) {
11208 _odsPrinter << "(";
11209 _odsPrinter << getOperation()->getOperands();
11210 _odsPrinter << ")";
11211 if (getFastmathFlagsAttr() != ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::OpBuilder((*this)->getContext()).getContext(), value: {})) {
11212 _odsPrinter << " fastmath";
11213 _odsPrinter.printStrippedAttrOrType(attrOrType: getFastmathFlagsAttr());
11214 }
11215 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
11216 _odsPrinter << " :";
11217 _odsPrinter << ' ';
11218 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
11219}
11220
11221void vector_reduce_fmin::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
11222}
11223
11224void vector_reduce_fmin::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11225 Properties &properties = odsState.getOrAddProperties<Properties>();
11226 populateDefaultProperties(opName: odsState.name, properties);
11227 const ::llvm::StringRef inherentNames[] = {"fastmathFlags"};
11228 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
11229 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
11230 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
11231 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
11232 });
11233}
11234
11235
11236} // namespace mlir::LLVM
11237MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmin)
11238MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fminGenericAdaptorBase::Properties)
11239
11240namespace mlir::LLVM {
11241
11242
11243//===----------------------------------------------------------------------===//
11244// ::mlir::LLVM::vector_reduce_fminimum definitions
11245//===----------------------------------------------------------------------===//
11246
11247namespace detail {
11248
11249vector_reduce_fminimumGenericAdaptorBase::vector_reduce_fminimumGenericAdaptorBase(vector_reduce_fminimum op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
11250
11251::mlir::LLVM::FastmathFlagsAttr vector_reduce_fminimumGenericAdaptorBase::getFastmathFlagsAttr() {
11252 auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(Val: getProperties().fastmathFlags);
11253 return attr;
11254}
11255
11256::mlir::LLVM::FastmathFlags vector_reduce_fminimumGenericAdaptorBase::getFastmathFlags() {
11257 auto attr = getFastmathFlagsAttr();
11258 return attr.getValue();
11259}
11260
11261
11262} // namespace detail
11263vector_reduce_fminimumAdaptor::vector_reduce_fminimumAdaptor(vector_reduce_fminimum op) : vector_reduce_fminimumGenericAdaptor(op->getOperands(), op) {}
11264
11265::llvm::LogicalResult vector_reduce_fminimumAdaptor::verify(::mlir::Location loc) {
11266 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
11267
11268 if (tblgen_fastmathFlags && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: tblgen_fastmathFlags))))
11269 return emitError(loc, message: "'llvm.intr.vector.reduce.fminimum' op attribute 'fastmathFlags' failed to satisfy constraint: LLVM fastmath flags");
11270 return ::mlir::success();
11271}
11272
11273::llvm::LogicalResult vector_reduce_fminimum::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11274 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11275 if (!dict) {
11276 emitError() << "expected DictionaryAttr to set properties";
11277 return ::mlir::failure();
11278 }
11279
11280 {
11281 auto attr = dict.get(name: "fastmathFlags");
11282 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
11283 storage&: prop.fastmathFlags, attr, name: "fastmathFlags", emitError)))
11284 return ::mlir::failure();
11285 }
11286 return ::mlir::success();
11287}
11288
11289::mlir::Attribute vector_reduce_fminimum::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
11290 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
11291 ::mlir::Builder odsBuilder{ctx};
11292 ::mlir::detail::appendAttributeProperty(attrs, name: "fastmathFlags", attr: prop.fastmathFlags);
11293
11294 if (!attrs.empty())
11295 return odsBuilder.getDictionaryAttr(value: attrs);
11296 return {};
11297}
11298
11299llvm::hash_code vector_reduce_fminimum::computePropertiesHash(const Properties &prop) {
11300 using llvm::hash_value;
11301 return llvm::hash_combine(
11302 args: llvm::hash_value(ptr: prop.fastmathFlags.getAsOpaquePointer()));
11303}
11304
11305std::optional<mlir::Attribute> vector_reduce_fminimum::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
11306 if (name == "fastmathFlags")
11307 return prop.fastmathFlags;
11308 return std::nullopt;
11309}
11310
11311void vector_reduce_fminimum::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
11312 if (name == "fastmathFlags") {
11313 prop.fastmathFlags = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fastmathFlags)>>(Val&: value);
11314 return;
11315 }
11316}
11317
11318void vector_reduce_fminimum::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
11319 if (prop.fastmathFlags) {
11320 ::mlir::Attribute value = prop.fastmathFlags;
11321 ::mlir::Attribute originalValue = value;
11322 visitor("fastmathFlags", value);
11323 if (value != originalValue)
11324 setInherentAttr(prop, name: "fastmathFlags", value);
11325 }
11326}
11327
11328::llvm::LogicalResult vector_reduce_fminimum::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11329 {
11330 ::mlir::Attribute attr = attrs.get(name: getFastmathFlagsAttrName(name: opName));
11331 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName: "fastmathFlags", emitError)))
11332 return ::mlir::failure();
11333 }
11334 return ::mlir::success();
11335}
11336
11337::llvm::LogicalResult vector_reduce_fminimum::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
11338 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
11339 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.fastmathFlags)))
11340 return ::mlir::failure();
11341 return ::mlir::success();
11342}
11343
11344void vector_reduce_fminimum::writeProperties(::mlir::DialectBytecodeWriter &writer) {
11345 auto &prop = getProperties(); (void)prop;
11346
11347 writer.writeOptionalAttribute(attr: prop.fastmathFlags);
11348}
11349
11350::mlir::LLVM::FastmathFlags vector_reduce_fminimum::getFastmathFlags() {
11351 auto attr = getFastmathFlagsAttr();
11352 return attr.getValue();
11353}
11354
11355void vector_reduce_fminimum::setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue) {
11356 getProperties().fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::Builder((*this)->getContext()).getContext(), value: attrValue);
11357}
11358
11359void vector_reduce_fminimum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11360 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11361 odsState.addOperands(newOperands: in);
11362 if (fastmathFlags) {
11363 odsProperties.fastmathFlags = fastmathFlags;
11364 }
11365 odsState.addTypes(newTypes: res);
11366}
11367
11368vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11369 ::mlir::OperationState __state__(location, getOperationName());
11370 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11371 auto __res__ = builder.create(state: __state__);
11372 assert((::llvm::isa<vector_reduce_fminimum>(__res__)) && "builder didn't return the right type");
11373 return ::llvm::cast<vector_reduce_fminimum>(Val: __res__);
11374}
11375
11376vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11377 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11378}
11379
11380void vector_reduce_fminimum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11381 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11382 odsState.addOperands(newOperands: in);
11383 if (fastmathFlags) {
11384 odsProperties.fastmathFlags = fastmathFlags;
11385 }
11386 assert(resultTypes.size() == 1u && "mismatched number of results");
11387 odsState.addTypes(newTypes&: resultTypes);
11388}
11389
11390vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11391 ::mlir::OperationState __state__(location, getOperationName());
11392 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11393 auto __res__ = builder.create(state: __state__);
11394 assert((::llvm::isa<vector_reduce_fminimum>(__res__)) && "builder didn't return the right type");
11395 return ::llvm::cast<vector_reduce_fminimum>(Val: __res__);
11396}
11397
11398vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11399 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11400}
11401
11402void vector_reduce_fminimum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11403 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11404 odsState.addOperands(newOperands: in);
11405 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
11406 odsState.addTypes(newTypes: res);
11407}
11408
11409vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11410 ::mlir::OperationState __state__(location, getOperationName());
11411 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11412 auto __res__ = builder.create(state: __state__);
11413 assert((::llvm::isa<vector_reduce_fminimum>(__res__)) && "builder didn't return the right type");
11414 return ::llvm::cast<vector_reduce_fminimum>(Val: __res__);
11415}
11416
11417vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11418 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11419}
11420
11421void vector_reduce_fminimum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11422 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11423 odsState.addOperands(newOperands: in);
11424 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
11425 assert(resultTypes.size() == 1u && "mismatched number of results");
11426 odsState.addTypes(newTypes&: resultTypes);
11427}
11428
11429vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11430 ::mlir::OperationState __state__(location, getOperationName());
11431 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11432 auto __res__ = builder.create(state: __state__);
11433 assert((::llvm::isa<vector_reduce_fminimum>(__res__)) && "builder didn't return the right type");
11434 return ::llvm::cast<vector_reduce_fminimum>(Val: __res__);
11435}
11436
11437vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11438 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11439}
11440
11441void vector_reduce_fminimum::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11442 assert(operands.size() == 1u && "mismatched number of parameters");
11443 odsState.addOperands(newOperands: operands);
11444 buildPropertiesAndDiscardableAttributes(odsState, attributes);
11445 assert(resultTypes.size() == 1u && "mismatched number of return types");
11446 odsState.addTypes(newTypes&: resultTypes);
11447}
11448
11449vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11450LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11451
11452 ::mlir::OperationState __state__(location, getOperationName());
11453 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));
11454 auto __res__ = builder.create(state: __state__);
11455 assert((::llvm::isa<vector_reduce_fminimum>(__res__)) && "builder didn't return the right type");
11456 return ::llvm::cast<vector_reduce_fminimum>(Val: __res__);
11457LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11458}
11459
11460vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11461LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11462
11463 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));
11464LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11465}
11466
11467void vector_reduce_fminimum::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11468 assert(operands.size() == 1u && "mismatched number of parameters");
11469 odsState.addOperands(newOperands: operands);
11470 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
11471 odsState.addAttributes(newAttributes: discardableAttributes);
11472 assert(resultTypes.size() == 1u && "mismatched number of return types");
11473 odsState.addTypes(newTypes&: resultTypes);
11474}
11475
11476vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11477 ::mlir::OperationState __state__(location, getOperationName());
11478 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));
11479 auto __res__ = builder.create(state: __state__);
11480 assert((::llvm::isa<vector_reduce_fminimum>(__res__)) && "builder didn't return the right type");
11481 return ::llvm::cast<vector_reduce_fminimum>(Val: __res__);
11482}
11483
11484vector_reduce_fminimum vector_reduce_fminimum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11485 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));
11486}
11487
11488void vector_reduce_fminimum::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
11489 ::mlir::Builder odsBuilder(opName.getContext());
11490 if (!properties.fastmathFlags)
11491 properties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: {});
11492}
11493
11494::llvm::LogicalResult vector_reduce_fminimum::verifyInvariantsImpl() {
11495 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
11496
11497 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, attr: tblgen_fastmathFlags, attrName: "fastmathFlags")))
11498 return ::mlir::failure();
11499 {
11500 unsigned index = 0; (void)index;
11501 auto valueGroup0 = getODSOperands(index: 0);
11502
11503 for (auto v : valueGroup0) {
11504 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11505 return ::mlir::failure();
11506 }
11507 }
11508 {
11509 unsigned index = 0; (void)index;
11510 auto valueGroup0 = getODSResults(index: 0);
11511
11512 for (auto v : valueGroup0) {
11513 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
11514 return ::mlir::failure();
11515 }
11516 }
11517 return ::mlir::success();
11518}
11519
11520::llvm::LogicalResult vector_reduce_fminimum::verifyInvariants() {
11521 return verifyInvariantsImpl();
11522}
11523
11524::mlir::ParseResult vector_reduce_fminimum::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
11525 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
11526 ::mlir::LLVM::FastmathFlagsAttr fastmathFlagsAttr;
11527 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
11528 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
11529 if (parser.parseLParen())
11530 return ::mlir::failure();
11531 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
11532 if (parser.parseOperandList(result&: allOperands))
11533 return ::mlir::failure();
11534 if (parser.parseRParen())
11535 return ::mlir::failure();
11536 if (::mlir::succeeded(Result: parser.parseOptionalKeyword(keyword: "fastmath"))) {
11537
11538 if (parser.parseCustomAttributeWithFallback(result&: fastmathFlagsAttr, type: ::mlir::Type{})) {
11539 return ::mlir::failure();
11540 }
11541 if (fastmathFlagsAttr) result.getOrAddProperties<vector_reduce_fminimum::Properties>().fastmathFlags = fastmathFlagsAttr;
11542 }
11543 {
11544 auto loc = parser.getCurrentLocation();(void)loc;
11545 if (parser.parseOptionalAttrDict(result&: result.attributes))
11546 return ::mlir::failure();
11547 if (result.attributes.get(name: "fastmathFlags"))
11548 return parser.emitError(loc, message: "inherent attribute 'fastmathFlags' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
11549 }
11550 if (parser.parseColon())
11551 return ::mlir::failure();
11552
11553 ::mlir::FunctionType allOperand__allResult_functionType;
11554 if (parser.parseType(result&: allOperand__allResult_functionType))
11555 return ::mlir::failure();
11556 allOperandTypes = allOperand__allResult_functionType.getInputs();
11557 allResultTypes = allOperand__allResult_functionType.getResults();
11558 result.addTypes(newTypes: allResultTypes);
11559 // coverity[ARRAY_VS_SINGLETON]
11560 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
11561 return ::mlir::failure();
11562 return ::mlir::success();
11563}
11564
11565LLVM_ATTRIBUTE_MINSIZE void vector_reduce_fminimum::print(::mlir::OpAsmPrinter &_odsPrinter) {
11566 _odsPrinter << "(";
11567 _odsPrinter << getOperation()->getOperands();
11568 _odsPrinter << ")";
11569 if (getFastmathFlagsAttr() != ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::OpBuilder((*this)->getContext()).getContext(), value: {})) {
11570 _odsPrinter << " fastmath";
11571 _odsPrinter.printStrippedAttrOrType(attrOrType: getFastmathFlagsAttr());
11572 }
11573 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
11574 _odsPrinter << " :";
11575 _odsPrinter << ' ';
11576 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
11577}
11578
11579void vector_reduce_fminimum::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
11580}
11581
11582void vector_reduce_fminimum::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11583 Properties &properties = odsState.getOrAddProperties<Properties>();
11584 populateDefaultProperties(opName: odsState.name, properties);
11585 const ::llvm::StringRef inherentNames[] = {"fastmathFlags"};
11586 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
11587 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
11588 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
11589 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
11590 });
11591}
11592
11593
11594} // namespace mlir::LLVM
11595MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fminimum)
11596MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fminimumGenericAdaptorBase::Properties)
11597
11598namespace mlir::LLVM {
11599
11600
11601//===----------------------------------------------------------------------===//
11602// ::mlir::LLVM::vector_reduce_fminimumnum definitions
11603//===----------------------------------------------------------------------===//
11604
11605namespace detail {
11606
11607vector_reduce_fminimumnumGenericAdaptorBase::vector_reduce_fminimumnumGenericAdaptorBase(vector_reduce_fminimumnum op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
11608
11609::mlir::LLVM::FastmathFlagsAttr vector_reduce_fminimumnumGenericAdaptorBase::getFastmathFlagsAttr() {
11610 auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(Val: getProperties().fastmathFlags);
11611 return attr;
11612}
11613
11614::mlir::LLVM::FastmathFlags vector_reduce_fminimumnumGenericAdaptorBase::getFastmathFlags() {
11615 auto attr = getFastmathFlagsAttr();
11616 return attr.getValue();
11617}
11618
11619
11620} // namespace detail
11621vector_reduce_fminimumnumAdaptor::vector_reduce_fminimumnumAdaptor(vector_reduce_fminimumnum op) : vector_reduce_fminimumnumGenericAdaptor(op->getOperands(), op) {}
11622
11623::llvm::LogicalResult vector_reduce_fminimumnumAdaptor::verify(::mlir::Location loc) {
11624 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
11625
11626 if (tblgen_fastmathFlags && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: tblgen_fastmathFlags))))
11627 return emitError(loc, message: "'llvm.intr.vector.reduce.fminimumnum' op attribute 'fastmathFlags' failed to satisfy constraint: LLVM fastmath flags");
11628 return ::mlir::success();
11629}
11630
11631::llvm::LogicalResult vector_reduce_fminimumnum::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11632 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11633 if (!dict) {
11634 emitError() << "expected DictionaryAttr to set properties";
11635 return ::mlir::failure();
11636 }
11637
11638 {
11639 auto attr = dict.get(name: "fastmathFlags");
11640 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
11641 storage&: prop.fastmathFlags, attr, name: "fastmathFlags", emitError)))
11642 return ::mlir::failure();
11643 }
11644 return ::mlir::success();
11645}
11646
11647::mlir::Attribute vector_reduce_fminimumnum::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
11648 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
11649 ::mlir::Builder odsBuilder{ctx};
11650 ::mlir::detail::appendAttributeProperty(attrs, name: "fastmathFlags", attr: prop.fastmathFlags);
11651
11652 if (!attrs.empty())
11653 return odsBuilder.getDictionaryAttr(value: attrs);
11654 return {};
11655}
11656
11657llvm::hash_code vector_reduce_fminimumnum::computePropertiesHash(const Properties &prop) {
11658 using llvm::hash_value;
11659 return llvm::hash_combine(
11660 args: llvm::hash_value(ptr: prop.fastmathFlags.getAsOpaquePointer()));
11661}
11662
11663std::optional<mlir::Attribute> vector_reduce_fminimumnum::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
11664 if (name == "fastmathFlags")
11665 return prop.fastmathFlags;
11666 return std::nullopt;
11667}
11668
11669void vector_reduce_fminimumnum::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
11670 if (name == "fastmathFlags") {
11671 prop.fastmathFlags = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fastmathFlags)>>(Val&: value);
11672 return;
11673 }
11674}
11675
11676void vector_reduce_fminimumnum::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
11677 if (prop.fastmathFlags) {
11678 ::mlir::Attribute value = prop.fastmathFlags;
11679 ::mlir::Attribute originalValue = value;
11680 visitor("fastmathFlags", value);
11681 if (value != originalValue)
11682 setInherentAttr(prop, name: "fastmathFlags", value);
11683 }
11684}
11685
11686::llvm::LogicalResult vector_reduce_fminimumnum::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11687 {
11688 ::mlir::Attribute attr = attrs.get(name: getFastmathFlagsAttrName(name: opName));
11689 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName: "fastmathFlags", emitError)))
11690 return ::mlir::failure();
11691 }
11692 return ::mlir::success();
11693}
11694
11695::llvm::LogicalResult vector_reduce_fminimumnum::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
11696 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
11697 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.fastmathFlags)))
11698 return ::mlir::failure();
11699 return ::mlir::success();
11700}
11701
11702void vector_reduce_fminimumnum::writeProperties(::mlir::DialectBytecodeWriter &writer) {
11703 auto &prop = getProperties(); (void)prop;
11704
11705 writer.writeOptionalAttribute(attr: prop.fastmathFlags);
11706}
11707
11708::mlir::LLVM::FastmathFlags vector_reduce_fminimumnum::getFastmathFlags() {
11709 auto attr = getFastmathFlagsAttr();
11710 return attr.getValue();
11711}
11712
11713void vector_reduce_fminimumnum::setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue) {
11714 getProperties().fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::Builder((*this)->getContext()).getContext(), value: attrValue);
11715}
11716
11717void vector_reduce_fminimumnum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11718 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11719 odsState.addOperands(newOperands: in);
11720 if (fastmathFlags) {
11721 odsProperties.fastmathFlags = fastmathFlags;
11722 }
11723 odsState.addTypes(newTypes: res);
11724}
11725
11726vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11727 ::mlir::OperationState __state__(location, getOperationName());
11728 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11729 auto __res__ = builder.create(state: __state__);
11730 assert((::llvm::isa<vector_reduce_fminimumnum>(__res__)) && "builder didn't return the right type");
11731 return ::llvm::cast<vector_reduce_fminimumnum>(Val: __res__);
11732}
11733
11734vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11735 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11736}
11737
11738void vector_reduce_fminimumnum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11739 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11740 odsState.addOperands(newOperands: in);
11741 if (fastmathFlags) {
11742 odsProperties.fastmathFlags = fastmathFlags;
11743 }
11744 assert(resultTypes.size() == 1u && "mismatched number of results");
11745 odsState.addTypes(newTypes&: resultTypes);
11746}
11747
11748vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11749 ::mlir::OperationState __state__(location, getOperationName());
11750 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11751 auto __res__ = builder.create(state: __state__);
11752 assert((::llvm::isa<vector_reduce_fminimumnum>(__res__)) && "builder didn't return the right type");
11753 return ::llvm::cast<vector_reduce_fminimumnum>(Val: __res__);
11754}
11755
11756vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
11757 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11758}
11759
11760void vector_reduce_fminimumnum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11761 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11762 odsState.addOperands(newOperands: in);
11763 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
11764 odsState.addTypes(newTypes: res);
11765}
11766
11767vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11768 ::mlir::OperationState __state__(location, getOperationName());
11769 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11770 auto __res__ = builder.create(state: __state__);
11771 assert((::llvm::isa<vector_reduce_fminimumnum>(__res__)) && "builder didn't return the right type");
11772 return ::llvm::cast<vector_reduce_fminimumnum>(Val: __res__);
11773}
11774
11775vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11776 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11777}
11778
11779void vector_reduce_fminimumnum::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11780 auto &odsProperties = odsState.getOrAddProperties<Properties>();
11781 odsState.addOperands(newOperands: in);
11782 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
11783 assert(resultTypes.size() == 1u && "mismatched number of results");
11784 odsState.addTypes(newTypes&: resultTypes);
11785}
11786
11787vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11788 ::mlir::OperationState __state__(location, getOperationName());
11789 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11790 auto __res__ = builder.create(state: __state__);
11791 assert((::llvm::isa<vector_reduce_fminimumnum>(__res__)) && "builder didn't return the right type");
11792 return ::llvm::cast<vector_reduce_fminimumnum>(Val: __res__);
11793}
11794
11795vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags) {
11796 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
11797}
11798
11799void vector_reduce_fminimumnum::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11800 assert(operands.size() == 1u && "mismatched number of parameters");
11801 odsState.addOperands(newOperands: operands);
11802 buildPropertiesAndDiscardableAttributes(odsState, attributes);
11803 assert(resultTypes.size() == 1u && "mismatched number of return types");
11804 odsState.addTypes(newTypes&: resultTypes);
11805}
11806
11807vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11808LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11809
11810 ::mlir::OperationState __state__(location, getOperationName());
11811 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));
11812 auto __res__ = builder.create(state: __state__);
11813 assert((::llvm::isa<vector_reduce_fminimumnum>(__res__)) && "builder didn't return the right type");
11814 return ::llvm::cast<vector_reduce_fminimumnum>(Val: __res__);
11815LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11816}
11817
11818vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11819LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
11820
11821 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));
11822LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
11823}
11824
11825void vector_reduce_fminimumnum::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11826 assert(operands.size() == 1u && "mismatched number of parameters");
11827 odsState.addOperands(newOperands: operands);
11828 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
11829 odsState.addAttributes(newAttributes: discardableAttributes);
11830 assert(resultTypes.size() == 1u && "mismatched number of return types");
11831 odsState.addTypes(newTypes&: resultTypes);
11832}
11833
11834vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11835 ::mlir::OperationState __state__(location, getOperationName());
11836 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));
11837 auto __res__ = builder.create(state: __state__);
11838 assert((::llvm::isa<vector_reduce_fminimumnum>(__res__)) && "builder didn't return the right type");
11839 return ::llvm::cast<vector_reduce_fminimumnum>(Val: __res__);
11840}
11841
11842vector_reduce_fminimumnum vector_reduce_fminimumnum::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
11843 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));
11844}
11845
11846void vector_reduce_fminimumnum::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
11847 ::mlir::Builder odsBuilder(opName.getContext());
11848 if (!properties.fastmathFlags)
11849 properties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: {});
11850}
11851
11852::llvm::LogicalResult vector_reduce_fminimumnum::verifyInvariantsImpl() {
11853 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
11854
11855 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, attr: tblgen_fastmathFlags, attrName: "fastmathFlags")))
11856 return ::mlir::failure();
11857 {
11858 unsigned index = 0; (void)index;
11859 auto valueGroup0 = getODSOperands(index: 0);
11860
11861 for (auto v : valueGroup0) {
11862 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
11863 return ::mlir::failure();
11864 }
11865 }
11866 {
11867 unsigned index = 0; (void)index;
11868 auto valueGroup0 = getODSResults(index: 0);
11869
11870 for (auto v : valueGroup0) {
11871 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
11872 return ::mlir::failure();
11873 }
11874 }
11875 return ::mlir::success();
11876}
11877
11878::llvm::LogicalResult vector_reduce_fminimumnum::verifyInvariants() {
11879 return verifyInvariantsImpl();
11880}
11881
11882::mlir::ParseResult vector_reduce_fminimumnum::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
11883 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
11884 ::mlir::LLVM::FastmathFlagsAttr fastmathFlagsAttr;
11885 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
11886 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
11887 if (parser.parseLParen())
11888 return ::mlir::failure();
11889 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
11890 if (parser.parseOperandList(result&: allOperands))
11891 return ::mlir::failure();
11892 if (parser.parseRParen())
11893 return ::mlir::failure();
11894 if (::mlir::succeeded(Result: parser.parseOptionalKeyword(keyword: "fastmath"))) {
11895
11896 if (parser.parseCustomAttributeWithFallback(result&: fastmathFlagsAttr, type: ::mlir::Type{})) {
11897 return ::mlir::failure();
11898 }
11899 if (fastmathFlagsAttr) result.getOrAddProperties<vector_reduce_fminimumnum::Properties>().fastmathFlags = fastmathFlagsAttr;
11900 }
11901 {
11902 auto loc = parser.getCurrentLocation();(void)loc;
11903 if (parser.parseOptionalAttrDict(result&: result.attributes))
11904 return ::mlir::failure();
11905 if (result.attributes.get(name: "fastmathFlags"))
11906 return parser.emitError(loc, message: "inherent attribute 'fastmathFlags' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
11907 }
11908 if (parser.parseColon())
11909 return ::mlir::failure();
11910
11911 ::mlir::FunctionType allOperand__allResult_functionType;
11912 if (parser.parseType(result&: allOperand__allResult_functionType))
11913 return ::mlir::failure();
11914 allOperandTypes = allOperand__allResult_functionType.getInputs();
11915 allResultTypes = allOperand__allResult_functionType.getResults();
11916 result.addTypes(newTypes: allResultTypes);
11917 // coverity[ARRAY_VS_SINGLETON]
11918 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
11919 return ::mlir::failure();
11920 return ::mlir::success();
11921}
11922
11923LLVM_ATTRIBUTE_MINSIZE void vector_reduce_fminimumnum::print(::mlir::OpAsmPrinter &_odsPrinter) {
11924 _odsPrinter << "(";
11925 _odsPrinter << getOperation()->getOperands();
11926 _odsPrinter << ")";
11927 if (getFastmathFlagsAttr() != ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::OpBuilder((*this)->getContext()).getContext(), value: {})) {
11928 _odsPrinter << " fastmath";
11929 _odsPrinter.printStrippedAttrOrType(attrOrType: getFastmathFlagsAttr());
11930 }
11931 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
11932 _odsPrinter << " :";
11933 _odsPrinter << ' ';
11934 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
11935}
11936
11937void vector_reduce_fminimumnum::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
11938}
11939
11940void vector_reduce_fminimumnum::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
11941 Properties &properties = odsState.getOrAddProperties<Properties>();
11942 populateDefaultProperties(opName: odsState.name, properties);
11943 const ::llvm::StringRef inherentNames[] = {"fastmathFlags"};
11944 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
11945 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
11946 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
11947 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
11948 });
11949}
11950
11951
11952} // namespace mlir::LLVM
11953MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fminimumnum)
11954MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fminimumnumGenericAdaptorBase::Properties)
11955
11956namespace mlir::LLVM {
11957
11958
11959//===----------------------------------------------------------------------===//
11960// ::mlir::LLVM::vector_reduce_fmul definitions
11961//===----------------------------------------------------------------------===//
11962
11963namespace detail {
11964
11965vector_reduce_fmulGenericAdaptorBase::vector_reduce_fmulGenericAdaptorBase(vector_reduce_fmul op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
11966
11967::mlir::LLVM::FastmathFlagsAttr vector_reduce_fmulGenericAdaptorBase::getFastmathFlagsAttr() {
11968 auto attr = ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(Val: getProperties().fastmathFlags);
11969 return attr;
11970}
11971
11972::mlir::LLVM::FastmathFlags vector_reduce_fmulGenericAdaptorBase::getFastmathFlags() {
11973 auto attr = getFastmathFlagsAttr();
11974 return attr.getValue();
11975}
11976
11977
11978} // namespace detail
11979vector_reduce_fmulAdaptor::vector_reduce_fmulAdaptor(vector_reduce_fmul op) : vector_reduce_fmulGenericAdaptor(op->getOperands(), op) {}
11980
11981::llvm::LogicalResult vector_reduce_fmulAdaptor::verify(::mlir::Location loc) {
11982 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
11983
11984 if (tblgen_fastmathFlags && !((::llvm::isa<::mlir::LLVM::FastmathFlagsAttr>(Val: tblgen_fastmathFlags))))
11985 return emitError(loc, message: "'llvm.intr.vector.reduce.fmul' op attribute 'fastmathFlags' failed to satisfy constraint: LLVM fastmath flags");
11986 return ::mlir::success();
11987}
11988
11989::llvm::LogicalResult vector_reduce_fmul::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
11990 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
11991 if (!dict) {
11992 emitError() << "expected DictionaryAttr to set properties";
11993 return ::mlir::failure();
11994 }
11995
11996 {
11997 auto attr = dict.get(name: "fastmathFlags");
11998 if (::mlir::failed(Result: ::mlir::detail::setAttributeProperty(
11999 storage&: prop.fastmathFlags, attr, name: "fastmathFlags", emitError)))
12000 return ::mlir::failure();
12001 }
12002 return ::mlir::success();
12003}
12004
12005::mlir::Attribute vector_reduce_fmul::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
12006 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
12007 ::mlir::Builder odsBuilder{ctx};
12008 ::mlir::detail::appendAttributeProperty(attrs, name: "fastmathFlags", attr: prop.fastmathFlags);
12009
12010 if (!attrs.empty())
12011 return odsBuilder.getDictionaryAttr(value: attrs);
12012 return {};
12013}
12014
12015llvm::hash_code vector_reduce_fmul::computePropertiesHash(const Properties &prop) {
12016 using llvm::hash_value;
12017 return llvm::hash_combine(
12018 args: llvm::hash_value(ptr: prop.fastmathFlags.getAsOpaquePointer()));
12019}
12020
12021std::optional<mlir::Attribute> vector_reduce_fmul::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
12022 if (name == "fastmathFlags")
12023 return prop.fastmathFlags;
12024 return std::nullopt;
12025}
12026
12027void vector_reduce_fmul::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
12028 if (name == "fastmathFlags") {
12029 prop.fastmathFlags = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.fastmathFlags)>>(Val&: value);
12030 return;
12031 }
12032}
12033
12034void vector_reduce_fmul::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
12035 if (prop.fastmathFlags) {
12036 ::mlir::Attribute value = prop.fastmathFlags;
12037 ::mlir::Attribute originalValue = value;
12038 visitor("fastmathFlags", value);
12039 if (value != originalValue)
12040 setInherentAttr(prop, name: "fastmathFlags", value);
12041 }
12042}
12043
12044::llvm::LogicalResult vector_reduce_fmul::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12045 {
12046 ::mlir::Attribute attr = attrs.get(name: getFastmathFlagsAttrName(name: opName));
12047 if (attr && ::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(attr, attrName: "fastmathFlags", emitError)))
12048 return ::mlir::failure();
12049 }
12050 return ::mlir::success();
12051}
12052
12053::llvm::LogicalResult vector_reduce_fmul::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
12054 auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
12055 if (::mlir::failed(Result: reader.readOptionalAttribute(result&: prop.fastmathFlags)))
12056 return ::mlir::failure();
12057 return ::mlir::success();
12058}
12059
12060void vector_reduce_fmul::writeProperties(::mlir::DialectBytecodeWriter &writer) {
12061 auto &prop = getProperties(); (void)prop;
12062
12063 writer.writeOptionalAttribute(attr: prop.fastmathFlags);
12064}
12065
12066::mlir::LLVM::FastmathFlags vector_reduce_fmul::getFastmathFlags() {
12067 auto attr = getFastmathFlagsAttr();
12068 return attr.getValue();
12069}
12070
12071void vector_reduce_fmul::setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue) {
12072 getProperties().fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::Builder((*this)->getContext()).getContext(), value: attrValue);
12073}
12074
12075void vector_reduce_fmul::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
12076 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12077 odsState.addOperands(newOperands: start_value);
12078 odsState.addOperands(newOperands: input);
12079 if (fastmathFlags) {
12080 odsProperties.fastmathFlags = fastmathFlags;
12081 }
12082 odsState.addTypes(newTypes: res);
12083}
12084
12085vector_reduce_fmul vector_reduce_fmul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
12086 ::mlir::OperationState __state__(location, getOperationName());
12087 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
12088 auto __res__ = builder.create(state: __state__);
12089 assert((::llvm::isa<vector_reduce_fmul>(__res__)) && "builder didn't return the right type");
12090 return ::llvm::cast<vector_reduce_fmul>(Val: __res__);
12091}
12092
12093vector_reduce_fmul vector_reduce_fmul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
12094 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
12095}
12096
12097void vector_reduce_fmul::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
12098 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12099 odsState.addOperands(newOperands: start_value);
12100 odsState.addOperands(newOperands: input);
12101 if (fastmathFlags) {
12102 odsProperties.fastmathFlags = fastmathFlags;
12103 }
12104 assert(resultTypes.size() == 1u && "mismatched number of results");
12105 odsState.addTypes(newTypes&: resultTypes);
12106}
12107
12108vector_reduce_fmul vector_reduce_fmul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
12109 ::mlir::OperationState __state__(location, getOperationName());
12110 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
12111 auto __res__ = builder.create(state: __state__);
12112 assert((::llvm::isa<vector_reduce_fmul>(__res__)) && "builder didn't return the right type");
12113 return ::llvm::cast<vector_reduce_fmul>(Val: __res__);
12114}
12115
12116vector_reduce_fmul vector_reduce_fmul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags) {
12117 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
12118}
12119
12120void vector_reduce_fmul::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
12121 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12122 odsState.addOperands(newOperands: start_value);
12123 odsState.addOperands(newOperands: input);
12124 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
12125 odsState.addTypes(newTypes: res);
12126}
12127
12128vector_reduce_fmul vector_reduce_fmul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
12129 ::mlir::OperationState __state__(location, getOperationName());
12130 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
12131 auto __res__ = builder.create(state: __state__);
12132 assert((::llvm::isa<vector_reduce_fmul>(__res__)) && "builder didn't return the right type");
12133 return ::llvm::cast<vector_reduce_fmul>(Val: __res__);
12134}
12135
12136vector_reduce_fmul vector_reduce_fmul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
12137 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
12138}
12139
12140void vector_reduce_fmul::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
12141 auto &odsProperties = odsState.getOrAddProperties<Properties>();
12142 odsState.addOperands(newOperands: start_value);
12143 odsState.addOperands(newOperands: input);
12144 odsProperties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: fastmathFlags);
12145 assert(resultTypes.size() == 1u && "mismatched number of results");
12146 odsState.addTypes(newTypes&: resultTypes);
12147}
12148
12149vector_reduce_fmul vector_reduce_fmul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
12150 ::mlir::OperationState __state__(location, getOperationName());
12151 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
12152 auto __res__ = builder.create(state: __state__);
12153 assert((::llvm::isa<vector_reduce_fmul>(__res__)) && "builder didn't return the right type");
12154 return ::llvm::cast<vector_reduce_fmul>(Val: __res__);
12155}
12156
12157vector_reduce_fmul vector_reduce_fmul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags) {
12158 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), start_value: std::forward<decltype(start_value)>(t&: start_value), input: std::forward<decltype(input)>(t&: input), fastmathFlags: std::forward<decltype(fastmathFlags)>(t&: fastmathFlags));
12159}
12160
12161void vector_reduce_fmul::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12162 assert(operands.size() == 2u && "mismatched number of parameters");
12163 odsState.addOperands(newOperands: operands);
12164 buildPropertiesAndDiscardableAttributes(odsState, attributes);
12165 assert(resultTypes.size() == 1u && "mismatched number of return types");
12166 odsState.addTypes(newTypes&: resultTypes);
12167}
12168
12169vector_reduce_fmul vector_reduce_fmul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12170LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
12171
12172 ::mlir::OperationState __state__(location, getOperationName());
12173 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));
12174 auto __res__ = builder.create(state: __state__);
12175 assert((::llvm::isa<vector_reduce_fmul>(__res__)) && "builder didn't return the right type");
12176 return ::llvm::cast<vector_reduce_fmul>(Val: __res__);
12177LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
12178}
12179
12180vector_reduce_fmul vector_reduce_fmul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12181LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_PUSH
12182
12183 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));
12184LLVM_SUPPRESS_DEPRECATED_DECLARATIONS_POP
12185}
12186
12187void vector_reduce_fmul::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12188 assert(operands.size() == 2u && "mismatched number of parameters");
12189 odsState.addOperands(newOperands: operands);
12190 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
12191 odsState.addAttributes(newAttributes: discardableAttributes);
12192 assert(resultTypes.size() == 1u && "mismatched number of return types");
12193 odsState.addTypes(newTypes&: resultTypes);
12194}
12195
12196vector_reduce_fmul vector_reduce_fmul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12197 ::mlir::OperationState __state__(location, getOperationName());
12198 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));
12199 auto __res__ = builder.create(state: __state__);
12200 assert((::llvm::isa<vector_reduce_fmul>(__res__)) && "builder didn't return the right type");
12201 return ::llvm::cast<vector_reduce_fmul>(Val: __res__);
12202}
12203
12204vector_reduce_fmul vector_reduce_fmul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12205 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));
12206}
12207
12208void vector_reduce_fmul::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
12209 ::mlir::Builder odsBuilder(opName.getContext());
12210 if (!properties.fastmathFlags)
12211 properties.fastmathFlags = ::mlir::LLVM::FastmathFlagsAttr::get(context: odsBuilder.getContext(), value: {});
12212}
12213
12214::llvm::LogicalResult vector_reduce_fmul::verifyInvariantsImpl() {
12215 auto tblgen_fastmathFlags = getProperties().fastmathFlags; (void)tblgen_fastmathFlags;
12216
12217 if (::mlir::failed(Result: __mlir_ods_local_attr_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, attr: tblgen_fastmathFlags, attrName: "fastmathFlags")))
12218 return ::mlir::failure();
12219 {
12220 unsigned index = 0; (void)index;
12221 auto valueGroup0 = getODSOperands(index: 0);
12222
12223 for (auto v : valueGroup0) {
12224 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps9(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12225 return ::mlir::failure();
12226 }
12227 auto valueGroup1 = getODSOperands(index: 1);
12228
12229 for (auto v : valueGroup1) {
12230 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps10(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12231 return ::mlir::failure();
12232 }
12233 }
12234 {
12235 unsigned index = 0; (void)index;
12236 auto valueGroup0 = getODSResults(index: 0);
12237
12238 for (auto v : valueGroup0) {
12239 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
12240 return ::mlir::failure();
12241 }
12242 }
12243 return ::mlir::success();
12244}
12245
12246::llvm::LogicalResult vector_reduce_fmul::verifyInvariants() {
12247 return verifyInvariantsImpl();
12248}
12249
12250::mlir::ParseResult vector_reduce_fmul::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
12251 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
12252 ::mlir::LLVM::FastmathFlagsAttr fastmathFlagsAttr;
12253 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
12254 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
12255 if (parser.parseLParen())
12256 return ::mlir::failure();
12257 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
12258 if (parser.parseOperandList(result&: allOperands))
12259 return ::mlir::failure();
12260 if (parser.parseRParen())
12261 return ::mlir::failure();
12262 if (::mlir::succeeded(Result: parser.parseOptionalKeyword(keyword: "fastmath"))) {
12263
12264 if (parser.parseCustomAttributeWithFallback(result&: fastmathFlagsAttr, type: ::mlir::Type{})) {
12265 return ::mlir::failure();
12266 }
12267 if (fastmathFlagsAttr) result.getOrAddProperties<vector_reduce_fmul::Properties>().fastmathFlags = fastmathFlagsAttr;
12268 }
12269 {
12270 auto loc = parser.getCurrentLocation();(void)loc;
12271 if (parser.parseOptionalAttrDict(result&: result.attributes))
12272 return ::mlir::failure();
12273 if (result.attributes.get(name: "fastmathFlags"))
12274 return parser.emitError(loc, message: "inherent attribute 'fastmathFlags' cannot be parsed from attr-dict when strict properties in assembly format is enabled");
12275 }
12276 if (parser.parseColon())
12277 return ::mlir::failure();
12278
12279 ::mlir::FunctionType allOperand__allResult_functionType;
12280 if (parser.parseType(result&: allOperand__allResult_functionType))
12281 return ::mlir::failure();
12282 allOperandTypes = allOperand__allResult_functionType.getInputs();
12283 allResultTypes = allOperand__allResult_functionType.getResults();
12284 result.addTypes(newTypes: allResultTypes);
12285 // coverity[ARRAY_VS_SINGLETON]
12286 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
12287 return ::mlir::failure();
12288 return ::mlir::success();
12289}
12290
12291LLVM_ATTRIBUTE_MINSIZE void vector_reduce_fmul::print(::mlir::OpAsmPrinter &_odsPrinter) {
12292 _odsPrinter << "(";
12293 _odsPrinter << getOperation()->getOperands();
12294 _odsPrinter << ")";
12295 if (getFastmathFlagsAttr() != ::mlir::LLVM::FastmathFlagsAttr::get(context: ::mlir::OpBuilder((*this)->getContext()).getContext(), value: {})) {
12296 _odsPrinter << " fastmath";
12297 _odsPrinter.printStrippedAttrOrType(attrOrType: getFastmathFlagsAttr());
12298 }
12299 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
12300 _odsPrinter << " :";
12301 _odsPrinter << ' ';
12302 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
12303}
12304
12305void vector_reduce_fmul::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
12306}
12307
12308void vector_reduce_fmul::buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12309 Properties &properties = odsState.getOrAddProperties<Properties>();
12310 populateDefaultProperties(opName: odsState.name, properties);
12311 const ::llvm::StringRef inherentNames[] = {"fastmathFlags"};
12312 ::mlir::detail::splitPropertiesAndDiscardableAttributes(
12313 state&: odsState, attributes, inherentNames, setProperties: [&](::mlir::DictionaryAttr inherentAttrs) {
12314 return setPropertiesFromAttr(prop&: properties, attr: inherentAttrs,
12315 emitError: [&]() { return ::mlir::emitError(loc: odsState.location); });
12316 });
12317}
12318
12319
12320} // namespace mlir::LLVM
12321MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmul)
12322MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fmulGenericAdaptorBase::Properties)
12323
12324namespace mlir::LLVM {
12325
12326
12327//===----------------------------------------------------------------------===//
12328// ::mlir::LLVM::vector_reduce_mul definitions
12329//===----------------------------------------------------------------------===//
12330
12331namespace detail {
12332
12333vector_reduce_mulGenericAdaptorBase::vector_reduce_mulGenericAdaptorBase(vector_reduce_mul op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
12334
12335
12336} // namespace detail
12337vector_reduce_mulAdaptor::vector_reduce_mulAdaptor(vector_reduce_mul op) : vector_reduce_mulGenericAdaptor(op->getOperands(), op) {}
12338
12339::llvm::LogicalResult vector_reduce_mulAdaptor::verify(::mlir::Location loc) {
12340 return ::mlir::success();
12341}
12342
12343::llvm::LogicalResult vector_reduce_mul::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12344 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12345 if (!dict) {
12346 emitError() << "expected DictionaryAttr to set properties";
12347 return ::mlir::failure();
12348 }
12349 return ::mlir::success();
12350}
12351
12352::mlir::Attribute vector_reduce_mul::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
12353 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
12354 ::mlir::Builder odsBuilder{ctx};
12355
12356 if (!attrs.empty())
12357 return odsBuilder.getDictionaryAttr(value: attrs);
12358 return {};
12359}
12360
12361llvm::hash_code vector_reduce_mul::computePropertiesHash(const Properties &prop) {
12362 using llvm::hash_value;
12363 return llvm::hash_combine();
12364}
12365
12366std::optional<mlir::Attribute> vector_reduce_mul::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
12367 return std::nullopt;
12368}
12369
12370void vector_reduce_mul::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
12371}
12372
12373void vector_reduce_mul::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
12374}
12375
12376::llvm::LogicalResult vector_reduce_mul::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12377 return ::mlir::success();
12378}
12379
12380void vector_reduce_mul::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
12381 odsState.addOperands(newOperands: in);
12382 odsState.addTypes(newTypes: res);
12383}
12384
12385vector_reduce_mul vector_reduce_mul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
12386 ::mlir::OperationState __state__(location, getOperationName());
12387 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
12388 auto __res__ = builder.create(state: __state__);
12389 assert((::llvm::isa<vector_reduce_mul>(__res__)) && "builder didn't return the right type");
12390 return ::llvm::cast<vector_reduce_mul>(Val: __res__);
12391}
12392
12393vector_reduce_mul vector_reduce_mul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
12394 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
12395}
12396
12397void vector_reduce_mul::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12398 odsState.addOperands(newOperands: in);
12399 assert(resultTypes.size() == 1u && "mismatched number of results");
12400 odsState.addTypes(newTypes&: resultTypes);
12401}
12402
12403vector_reduce_mul vector_reduce_mul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12404 ::mlir::OperationState __state__(location, getOperationName());
12405 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
12406 auto __res__ = builder.create(state: __state__);
12407 assert((::llvm::isa<vector_reduce_mul>(__res__)) && "builder didn't return the right type");
12408 return ::llvm::cast<vector_reduce_mul>(Val: __res__);
12409}
12410
12411vector_reduce_mul vector_reduce_mul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12412 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
12413}
12414
12415void vector_reduce_mul::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12416 assert(operands.size() == 1u && "mismatched number of parameters");
12417 odsState.addOperands(newOperands: operands);
12418 odsState.addAttributes(newAttributes: attributes);
12419 assert(resultTypes.size() == 1u && "mismatched number of return types");
12420 odsState.addTypes(newTypes&: resultTypes);
12421}
12422
12423vector_reduce_mul vector_reduce_mul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12424 ::mlir::OperationState __state__(location, getOperationName());
12425 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));
12426 auto __res__ = builder.create(state: __state__);
12427 assert((::llvm::isa<vector_reduce_mul>(__res__)) && "builder didn't return the right type");
12428 return ::llvm::cast<vector_reduce_mul>(Val: __res__);
12429}
12430
12431vector_reduce_mul vector_reduce_mul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12432 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));
12433}
12434
12435void vector_reduce_mul::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12436 assert(operands.size() == 1u && "mismatched number of parameters");
12437 odsState.addOperands(newOperands: operands);
12438 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
12439 odsState.addAttributes(newAttributes: discardableAttributes);
12440 assert(resultTypes.size() == 1u && "mismatched number of return types");
12441 odsState.addTypes(newTypes&: resultTypes);
12442}
12443
12444vector_reduce_mul vector_reduce_mul::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12445 ::mlir::OperationState __state__(location, getOperationName());
12446 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));
12447 auto __res__ = builder.create(state: __state__);
12448 assert((::llvm::isa<vector_reduce_mul>(__res__)) && "builder didn't return the right type");
12449 return ::llvm::cast<vector_reduce_mul>(Val: __res__);
12450}
12451
12452vector_reduce_mul vector_reduce_mul::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12453 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));
12454}
12455
12456::llvm::LogicalResult vector_reduce_mul::verifyInvariantsImpl() {
12457 {
12458 unsigned index = 0; (void)index;
12459 auto valueGroup0 = getODSOperands(index: 0);
12460
12461 for (auto v : valueGroup0) {
12462 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12463 return ::mlir::failure();
12464 }
12465 }
12466 {
12467 unsigned index = 0; (void)index;
12468 auto valueGroup0 = getODSResults(index: 0);
12469
12470 for (auto v : valueGroup0) {
12471 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
12472 return ::mlir::failure();
12473 }
12474 }
12475 return ::mlir::success();
12476}
12477
12478::llvm::LogicalResult vector_reduce_mul::verifyInvariants() {
12479 return verifyInvariantsImpl();
12480}
12481
12482::llvm::LogicalResult vector_reduce_mul::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12483 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12484 if (!dict) {
12485 emitError() << "expected DictionaryAttr to set properties";
12486 return ::mlir::failure();
12487 }
12488 // keep track of used keys in the input dictionary to be able to error out
12489 // if there are some unknown ones.
12490 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
12491 ::mlir::MLIRContext *ctx = dict.getContext();
12492 (void)ctx;
12493
12494 for (::mlir::NamedAttribute attr : dict) {
12495 if (!usedKeys.contains(V: attr.getName()))
12496 return emitError() << "unknown key '" << attr.getName() <<
12497 "' when parsing properties dictionary";
12498 }
12499 return ::mlir::success();
12500}
12501
12502void vector_reduce_mul::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
12503}
12504
12505
12506} // namespace mlir::LLVM
12507MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_mul)
12508
12509namespace mlir::LLVM {
12510
12511
12512//===----------------------------------------------------------------------===//
12513// ::mlir::LLVM::vector_reduce_or definitions
12514//===----------------------------------------------------------------------===//
12515
12516namespace detail {
12517
12518vector_reduce_orGenericAdaptorBase::vector_reduce_orGenericAdaptorBase(vector_reduce_or op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
12519
12520
12521} // namespace detail
12522vector_reduce_orAdaptor::vector_reduce_orAdaptor(vector_reduce_or op) : vector_reduce_orGenericAdaptor(op->getOperands(), op) {}
12523
12524::llvm::LogicalResult vector_reduce_orAdaptor::verify(::mlir::Location loc) {
12525 return ::mlir::success();
12526}
12527
12528::llvm::LogicalResult vector_reduce_or::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12529 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12530 if (!dict) {
12531 emitError() << "expected DictionaryAttr to set properties";
12532 return ::mlir::failure();
12533 }
12534 return ::mlir::success();
12535}
12536
12537::mlir::Attribute vector_reduce_or::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
12538 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
12539 ::mlir::Builder odsBuilder{ctx};
12540
12541 if (!attrs.empty())
12542 return odsBuilder.getDictionaryAttr(value: attrs);
12543 return {};
12544}
12545
12546llvm::hash_code vector_reduce_or::computePropertiesHash(const Properties &prop) {
12547 using llvm::hash_value;
12548 return llvm::hash_combine();
12549}
12550
12551std::optional<mlir::Attribute> vector_reduce_or::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
12552 return std::nullopt;
12553}
12554
12555void vector_reduce_or::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
12556}
12557
12558void vector_reduce_or::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
12559}
12560
12561::llvm::LogicalResult vector_reduce_or::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12562 return ::mlir::success();
12563}
12564
12565void vector_reduce_or::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
12566 odsState.addOperands(newOperands: in);
12567 odsState.addTypes(newTypes: res);
12568}
12569
12570vector_reduce_or vector_reduce_or::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
12571 ::mlir::OperationState __state__(location, getOperationName());
12572 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
12573 auto __res__ = builder.create(state: __state__);
12574 assert((::llvm::isa<vector_reduce_or>(__res__)) && "builder didn't return the right type");
12575 return ::llvm::cast<vector_reduce_or>(Val: __res__);
12576}
12577
12578vector_reduce_or vector_reduce_or::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
12579 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
12580}
12581
12582void vector_reduce_or::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12583 odsState.addOperands(newOperands: in);
12584 assert(resultTypes.size() == 1u && "mismatched number of results");
12585 odsState.addTypes(newTypes&: resultTypes);
12586}
12587
12588vector_reduce_or vector_reduce_or::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12589 ::mlir::OperationState __state__(location, getOperationName());
12590 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
12591 auto __res__ = builder.create(state: __state__);
12592 assert((::llvm::isa<vector_reduce_or>(__res__)) && "builder didn't return the right type");
12593 return ::llvm::cast<vector_reduce_or>(Val: __res__);
12594}
12595
12596vector_reduce_or vector_reduce_or::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12597 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
12598}
12599
12600void vector_reduce_or::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12601 assert(operands.size() == 1u && "mismatched number of parameters");
12602 odsState.addOperands(newOperands: operands);
12603 odsState.addAttributes(newAttributes: attributes);
12604 assert(resultTypes.size() == 1u && "mismatched number of return types");
12605 odsState.addTypes(newTypes&: resultTypes);
12606}
12607
12608vector_reduce_or vector_reduce_or::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12609 ::mlir::OperationState __state__(location, getOperationName());
12610 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));
12611 auto __res__ = builder.create(state: __state__);
12612 assert((::llvm::isa<vector_reduce_or>(__res__)) && "builder didn't return the right type");
12613 return ::llvm::cast<vector_reduce_or>(Val: __res__);
12614}
12615
12616vector_reduce_or vector_reduce_or::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12617 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));
12618}
12619
12620void vector_reduce_or::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12621 assert(operands.size() == 1u && "mismatched number of parameters");
12622 odsState.addOperands(newOperands: operands);
12623 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
12624 odsState.addAttributes(newAttributes: discardableAttributes);
12625 assert(resultTypes.size() == 1u && "mismatched number of return types");
12626 odsState.addTypes(newTypes&: resultTypes);
12627}
12628
12629vector_reduce_or vector_reduce_or::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12630 ::mlir::OperationState __state__(location, getOperationName());
12631 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));
12632 auto __res__ = builder.create(state: __state__);
12633 assert((::llvm::isa<vector_reduce_or>(__res__)) && "builder didn't return the right type");
12634 return ::llvm::cast<vector_reduce_or>(Val: __res__);
12635}
12636
12637vector_reduce_or vector_reduce_or::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12638 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));
12639}
12640
12641::llvm::LogicalResult vector_reduce_or::verifyInvariantsImpl() {
12642 {
12643 unsigned index = 0; (void)index;
12644 auto valueGroup0 = getODSOperands(index: 0);
12645
12646 for (auto v : valueGroup0) {
12647 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12648 return ::mlir::failure();
12649 }
12650 }
12651 {
12652 unsigned index = 0; (void)index;
12653 auto valueGroup0 = getODSResults(index: 0);
12654
12655 for (auto v : valueGroup0) {
12656 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
12657 return ::mlir::failure();
12658 }
12659 }
12660 return ::mlir::success();
12661}
12662
12663::llvm::LogicalResult vector_reduce_or::verifyInvariants() {
12664 return verifyInvariantsImpl();
12665}
12666
12667::llvm::LogicalResult vector_reduce_or::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12668 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12669 if (!dict) {
12670 emitError() << "expected DictionaryAttr to set properties";
12671 return ::mlir::failure();
12672 }
12673 // keep track of used keys in the input dictionary to be able to error out
12674 // if there are some unknown ones.
12675 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
12676 ::mlir::MLIRContext *ctx = dict.getContext();
12677 (void)ctx;
12678
12679 for (::mlir::NamedAttribute attr : dict) {
12680 if (!usedKeys.contains(V: attr.getName()))
12681 return emitError() << "unknown key '" << attr.getName() <<
12682 "' when parsing properties dictionary";
12683 }
12684 return ::mlir::success();
12685}
12686
12687void vector_reduce_or::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
12688}
12689
12690
12691} // namespace mlir::LLVM
12692MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_or)
12693
12694namespace mlir::LLVM {
12695
12696
12697//===----------------------------------------------------------------------===//
12698// ::mlir::LLVM::vector_reduce_smax definitions
12699//===----------------------------------------------------------------------===//
12700
12701namespace detail {
12702
12703vector_reduce_smaxGenericAdaptorBase::vector_reduce_smaxGenericAdaptorBase(vector_reduce_smax op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
12704
12705
12706} // namespace detail
12707vector_reduce_smaxAdaptor::vector_reduce_smaxAdaptor(vector_reduce_smax op) : vector_reduce_smaxGenericAdaptor(op->getOperands(), op) {}
12708
12709::llvm::LogicalResult vector_reduce_smaxAdaptor::verify(::mlir::Location loc) {
12710 return ::mlir::success();
12711}
12712
12713::llvm::LogicalResult vector_reduce_smax::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12714 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12715 if (!dict) {
12716 emitError() << "expected DictionaryAttr to set properties";
12717 return ::mlir::failure();
12718 }
12719 return ::mlir::success();
12720}
12721
12722::mlir::Attribute vector_reduce_smax::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
12723 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
12724 ::mlir::Builder odsBuilder{ctx};
12725
12726 if (!attrs.empty())
12727 return odsBuilder.getDictionaryAttr(value: attrs);
12728 return {};
12729}
12730
12731llvm::hash_code vector_reduce_smax::computePropertiesHash(const Properties &prop) {
12732 using llvm::hash_value;
12733 return llvm::hash_combine();
12734}
12735
12736std::optional<mlir::Attribute> vector_reduce_smax::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
12737 return std::nullopt;
12738}
12739
12740void vector_reduce_smax::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
12741}
12742
12743void vector_reduce_smax::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
12744}
12745
12746::llvm::LogicalResult vector_reduce_smax::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12747 return ::mlir::success();
12748}
12749
12750void vector_reduce_smax::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
12751 odsState.addOperands(newOperands: in);
12752 odsState.addTypes(newTypes: res);
12753}
12754
12755vector_reduce_smax vector_reduce_smax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
12756 ::mlir::OperationState __state__(location, getOperationName());
12757 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
12758 auto __res__ = builder.create(state: __state__);
12759 assert((::llvm::isa<vector_reduce_smax>(__res__)) && "builder didn't return the right type");
12760 return ::llvm::cast<vector_reduce_smax>(Val: __res__);
12761}
12762
12763vector_reduce_smax vector_reduce_smax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
12764 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
12765}
12766
12767void vector_reduce_smax::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12768 odsState.addOperands(newOperands: in);
12769 assert(resultTypes.size() == 1u && "mismatched number of results");
12770 odsState.addTypes(newTypes&: resultTypes);
12771}
12772
12773vector_reduce_smax vector_reduce_smax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12774 ::mlir::OperationState __state__(location, getOperationName());
12775 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
12776 auto __res__ = builder.create(state: __state__);
12777 assert((::llvm::isa<vector_reduce_smax>(__res__)) && "builder didn't return the right type");
12778 return ::llvm::cast<vector_reduce_smax>(Val: __res__);
12779}
12780
12781vector_reduce_smax vector_reduce_smax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12782 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
12783}
12784
12785void vector_reduce_smax::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12786 assert(operands.size() == 1u && "mismatched number of parameters");
12787 odsState.addOperands(newOperands: operands);
12788 odsState.addAttributes(newAttributes: attributes);
12789 assert(resultTypes.size() == 1u && "mismatched number of return types");
12790 odsState.addTypes(newTypes&: resultTypes);
12791}
12792
12793vector_reduce_smax vector_reduce_smax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12794 ::mlir::OperationState __state__(location, getOperationName());
12795 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));
12796 auto __res__ = builder.create(state: __state__);
12797 assert((::llvm::isa<vector_reduce_smax>(__res__)) && "builder didn't return the right type");
12798 return ::llvm::cast<vector_reduce_smax>(Val: __res__);
12799}
12800
12801vector_reduce_smax vector_reduce_smax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12802 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));
12803}
12804
12805void vector_reduce_smax::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12806 assert(operands.size() == 1u && "mismatched number of parameters");
12807 odsState.addOperands(newOperands: operands);
12808 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
12809 odsState.addAttributes(newAttributes: discardableAttributes);
12810 assert(resultTypes.size() == 1u && "mismatched number of return types");
12811 odsState.addTypes(newTypes&: resultTypes);
12812}
12813
12814vector_reduce_smax vector_reduce_smax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12815 ::mlir::OperationState __state__(location, getOperationName());
12816 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));
12817 auto __res__ = builder.create(state: __state__);
12818 assert((::llvm::isa<vector_reduce_smax>(__res__)) && "builder didn't return the right type");
12819 return ::llvm::cast<vector_reduce_smax>(Val: __res__);
12820}
12821
12822vector_reduce_smax vector_reduce_smax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12823 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));
12824}
12825
12826::llvm::LogicalResult vector_reduce_smax::verifyInvariantsImpl() {
12827 {
12828 unsigned index = 0; (void)index;
12829 auto valueGroup0 = getODSOperands(index: 0);
12830
12831 for (auto v : valueGroup0) {
12832 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
12833 return ::mlir::failure();
12834 }
12835 }
12836 {
12837 unsigned index = 0; (void)index;
12838 auto valueGroup0 = getODSResults(index: 0);
12839
12840 for (auto v : valueGroup0) {
12841 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
12842 return ::mlir::failure();
12843 }
12844 }
12845 return ::mlir::success();
12846}
12847
12848::llvm::LogicalResult vector_reduce_smax::verifyInvariants() {
12849 return verifyInvariantsImpl();
12850}
12851
12852::llvm::LogicalResult vector_reduce_smax::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12853 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12854 if (!dict) {
12855 emitError() << "expected DictionaryAttr to set properties";
12856 return ::mlir::failure();
12857 }
12858 // keep track of used keys in the input dictionary to be able to error out
12859 // if there are some unknown ones.
12860 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
12861 ::mlir::MLIRContext *ctx = dict.getContext();
12862 (void)ctx;
12863
12864 for (::mlir::NamedAttribute attr : dict) {
12865 if (!usedKeys.contains(V: attr.getName()))
12866 return emitError() << "unknown key '" << attr.getName() <<
12867 "' when parsing properties dictionary";
12868 }
12869 return ::mlir::success();
12870}
12871
12872void vector_reduce_smax::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
12873}
12874
12875
12876} // namespace mlir::LLVM
12877MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_smax)
12878
12879namespace mlir::LLVM {
12880
12881
12882//===----------------------------------------------------------------------===//
12883// ::mlir::LLVM::vector_reduce_smin definitions
12884//===----------------------------------------------------------------------===//
12885
12886namespace detail {
12887
12888vector_reduce_sminGenericAdaptorBase::vector_reduce_sminGenericAdaptorBase(vector_reduce_smin op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
12889
12890
12891} // namespace detail
12892vector_reduce_sminAdaptor::vector_reduce_sminAdaptor(vector_reduce_smin op) : vector_reduce_sminGenericAdaptor(op->getOperands(), op) {}
12893
12894::llvm::LogicalResult vector_reduce_sminAdaptor::verify(::mlir::Location loc) {
12895 return ::mlir::success();
12896}
12897
12898::llvm::LogicalResult vector_reduce_smin::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12899 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
12900 if (!dict) {
12901 emitError() << "expected DictionaryAttr to set properties";
12902 return ::mlir::failure();
12903 }
12904 return ::mlir::success();
12905}
12906
12907::mlir::Attribute vector_reduce_smin::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
12908 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
12909 ::mlir::Builder odsBuilder{ctx};
12910
12911 if (!attrs.empty())
12912 return odsBuilder.getDictionaryAttr(value: attrs);
12913 return {};
12914}
12915
12916llvm::hash_code vector_reduce_smin::computePropertiesHash(const Properties &prop) {
12917 using llvm::hash_value;
12918 return llvm::hash_combine();
12919}
12920
12921std::optional<mlir::Attribute> vector_reduce_smin::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
12922 return std::nullopt;
12923}
12924
12925void vector_reduce_smin::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
12926}
12927
12928void vector_reduce_smin::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
12929}
12930
12931::llvm::LogicalResult vector_reduce_smin::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
12932 return ::mlir::success();
12933}
12934
12935void vector_reduce_smin::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
12936 odsState.addOperands(newOperands: in);
12937 odsState.addTypes(newTypes: res);
12938}
12939
12940vector_reduce_smin vector_reduce_smin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
12941 ::mlir::OperationState __state__(location, getOperationName());
12942 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
12943 auto __res__ = builder.create(state: __state__);
12944 assert((::llvm::isa<vector_reduce_smin>(__res__)) && "builder didn't return the right type");
12945 return ::llvm::cast<vector_reduce_smin>(Val: __res__);
12946}
12947
12948vector_reduce_smin vector_reduce_smin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
12949 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
12950}
12951
12952void vector_reduce_smin::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12953 odsState.addOperands(newOperands: in);
12954 assert(resultTypes.size() == 1u && "mismatched number of results");
12955 odsState.addTypes(newTypes&: resultTypes);
12956}
12957
12958vector_reduce_smin vector_reduce_smin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12959 ::mlir::OperationState __state__(location, getOperationName());
12960 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
12961 auto __res__ = builder.create(state: __state__);
12962 assert((::llvm::isa<vector_reduce_smin>(__res__)) && "builder didn't return the right type");
12963 return ::llvm::cast<vector_reduce_smin>(Val: __res__);
12964}
12965
12966vector_reduce_smin vector_reduce_smin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
12967 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
12968}
12969
12970void vector_reduce_smin::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12971 assert(operands.size() == 1u && "mismatched number of parameters");
12972 odsState.addOperands(newOperands: operands);
12973 odsState.addAttributes(newAttributes: attributes);
12974 assert(resultTypes.size() == 1u && "mismatched number of return types");
12975 odsState.addTypes(newTypes&: resultTypes);
12976}
12977
12978vector_reduce_smin vector_reduce_smin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12979 ::mlir::OperationState __state__(location, getOperationName());
12980 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));
12981 auto __res__ = builder.create(state: __state__);
12982 assert((::llvm::isa<vector_reduce_smin>(__res__)) && "builder didn't return the right type");
12983 return ::llvm::cast<vector_reduce_smin>(Val: __res__);
12984}
12985
12986vector_reduce_smin vector_reduce_smin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
12987 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));
12988}
12989
12990void vector_reduce_smin::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
12991 assert(operands.size() == 1u && "mismatched number of parameters");
12992 odsState.addOperands(newOperands: operands);
12993 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
12994 odsState.addAttributes(newAttributes: discardableAttributes);
12995 assert(resultTypes.size() == 1u && "mismatched number of return types");
12996 odsState.addTypes(newTypes&: resultTypes);
12997}
12998
12999vector_reduce_smin vector_reduce_smin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13000 ::mlir::OperationState __state__(location, getOperationName());
13001 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));
13002 auto __res__ = builder.create(state: __state__);
13003 assert((::llvm::isa<vector_reduce_smin>(__res__)) && "builder didn't return the right type");
13004 return ::llvm::cast<vector_reduce_smin>(Val: __res__);
13005}
13006
13007vector_reduce_smin vector_reduce_smin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13008 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));
13009}
13010
13011::llvm::LogicalResult vector_reduce_smin::verifyInvariantsImpl() {
13012 {
13013 unsigned index = 0; (void)index;
13014 auto valueGroup0 = getODSOperands(index: 0);
13015
13016 for (auto v : valueGroup0) {
13017 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13018 return ::mlir::failure();
13019 }
13020 }
13021 {
13022 unsigned index = 0; (void)index;
13023 auto valueGroup0 = getODSResults(index: 0);
13024
13025 for (auto v : valueGroup0) {
13026 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
13027 return ::mlir::failure();
13028 }
13029 }
13030 return ::mlir::success();
13031}
13032
13033::llvm::LogicalResult vector_reduce_smin::verifyInvariants() {
13034 return verifyInvariantsImpl();
13035}
13036
13037::llvm::LogicalResult vector_reduce_smin::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13038 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13039 if (!dict) {
13040 emitError() << "expected DictionaryAttr to set properties";
13041 return ::mlir::failure();
13042 }
13043 // keep track of used keys in the input dictionary to be able to error out
13044 // if there are some unknown ones.
13045 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
13046 ::mlir::MLIRContext *ctx = dict.getContext();
13047 (void)ctx;
13048
13049 for (::mlir::NamedAttribute attr : dict) {
13050 if (!usedKeys.contains(V: attr.getName()))
13051 return emitError() << "unknown key '" << attr.getName() <<
13052 "' when parsing properties dictionary";
13053 }
13054 return ::mlir::success();
13055}
13056
13057void vector_reduce_smin::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
13058}
13059
13060
13061} // namespace mlir::LLVM
13062MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_smin)
13063
13064namespace mlir::LLVM {
13065
13066
13067//===----------------------------------------------------------------------===//
13068// ::mlir::LLVM::vector_reduce_umax definitions
13069//===----------------------------------------------------------------------===//
13070
13071namespace detail {
13072
13073vector_reduce_umaxGenericAdaptorBase::vector_reduce_umaxGenericAdaptorBase(vector_reduce_umax op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
13074
13075
13076} // namespace detail
13077vector_reduce_umaxAdaptor::vector_reduce_umaxAdaptor(vector_reduce_umax op) : vector_reduce_umaxGenericAdaptor(op->getOperands(), op) {}
13078
13079::llvm::LogicalResult vector_reduce_umaxAdaptor::verify(::mlir::Location loc) {
13080 return ::mlir::success();
13081}
13082
13083::llvm::LogicalResult vector_reduce_umax::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13084 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13085 if (!dict) {
13086 emitError() << "expected DictionaryAttr to set properties";
13087 return ::mlir::failure();
13088 }
13089 return ::mlir::success();
13090}
13091
13092::mlir::Attribute vector_reduce_umax::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
13093 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
13094 ::mlir::Builder odsBuilder{ctx};
13095
13096 if (!attrs.empty())
13097 return odsBuilder.getDictionaryAttr(value: attrs);
13098 return {};
13099}
13100
13101llvm::hash_code vector_reduce_umax::computePropertiesHash(const Properties &prop) {
13102 using llvm::hash_value;
13103 return llvm::hash_combine();
13104}
13105
13106std::optional<mlir::Attribute> vector_reduce_umax::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
13107 return std::nullopt;
13108}
13109
13110void vector_reduce_umax::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
13111}
13112
13113void vector_reduce_umax::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
13114}
13115
13116::llvm::LogicalResult vector_reduce_umax::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13117 return ::mlir::success();
13118}
13119
13120void vector_reduce_umax::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
13121 odsState.addOperands(newOperands: in);
13122 odsState.addTypes(newTypes: res);
13123}
13124
13125vector_reduce_umax vector_reduce_umax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
13126 ::mlir::OperationState __state__(location, getOperationName());
13127 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
13128 auto __res__ = builder.create(state: __state__);
13129 assert((::llvm::isa<vector_reduce_umax>(__res__)) && "builder didn't return the right type");
13130 return ::llvm::cast<vector_reduce_umax>(Val: __res__);
13131}
13132
13133vector_reduce_umax vector_reduce_umax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
13134 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
13135}
13136
13137void vector_reduce_umax::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13138 odsState.addOperands(newOperands: in);
13139 assert(resultTypes.size() == 1u && "mismatched number of results");
13140 odsState.addTypes(newTypes&: resultTypes);
13141}
13142
13143vector_reduce_umax vector_reduce_umax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13144 ::mlir::OperationState __state__(location, getOperationName());
13145 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
13146 auto __res__ = builder.create(state: __state__);
13147 assert((::llvm::isa<vector_reduce_umax>(__res__)) && "builder didn't return the right type");
13148 return ::llvm::cast<vector_reduce_umax>(Val: __res__);
13149}
13150
13151vector_reduce_umax vector_reduce_umax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13152 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
13153}
13154
13155void vector_reduce_umax::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13156 assert(operands.size() == 1u && "mismatched number of parameters");
13157 odsState.addOperands(newOperands: operands);
13158 odsState.addAttributes(newAttributes: attributes);
13159 assert(resultTypes.size() == 1u && "mismatched number of return types");
13160 odsState.addTypes(newTypes&: resultTypes);
13161}
13162
13163vector_reduce_umax vector_reduce_umax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13164 ::mlir::OperationState __state__(location, getOperationName());
13165 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));
13166 auto __res__ = builder.create(state: __state__);
13167 assert((::llvm::isa<vector_reduce_umax>(__res__)) && "builder didn't return the right type");
13168 return ::llvm::cast<vector_reduce_umax>(Val: __res__);
13169}
13170
13171vector_reduce_umax vector_reduce_umax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13172 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));
13173}
13174
13175void vector_reduce_umax::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13176 assert(operands.size() == 1u && "mismatched number of parameters");
13177 odsState.addOperands(newOperands: operands);
13178 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
13179 odsState.addAttributes(newAttributes: discardableAttributes);
13180 assert(resultTypes.size() == 1u && "mismatched number of return types");
13181 odsState.addTypes(newTypes&: resultTypes);
13182}
13183
13184vector_reduce_umax vector_reduce_umax::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13185 ::mlir::OperationState __state__(location, getOperationName());
13186 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));
13187 auto __res__ = builder.create(state: __state__);
13188 assert((::llvm::isa<vector_reduce_umax>(__res__)) && "builder didn't return the right type");
13189 return ::llvm::cast<vector_reduce_umax>(Val: __res__);
13190}
13191
13192vector_reduce_umax vector_reduce_umax::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13193 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));
13194}
13195
13196::llvm::LogicalResult vector_reduce_umax::verifyInvariantsImpl() {
13197 {
13198 unsigned index = 0; (void)index;
13199 auto valueGroup0 = getODSOperands(index: 0);
13200
13201 for (auto v : valueGroup0) {
13202 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13203 return ::mlir::failure();
13204 }
13205 }
13206 {
13207 unsigned index = 0; (void)index;
13208 auto valueGroup0 = getODSResults(index: 0);
13209
13210 for (auto v : valueGroup0) {
13211 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
13212 return ::mlir::failure();
13213 }
13214 }
13215 return ::mlir::success();
13216}
13217
13218::llvm::LogicalResult vector_reduce_umax::verifyInvariants() {
13219 return verifyInvariantsImpl();
13220}
13221
13222::llvm::LogicalResult vector_reduce_umax::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13223 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13224 if (!dict) {
13225 emitError() << "expected DictionaryAttr to set properties";
13226 return ::mlir::failure();
13227 }
13228 // keep track of used keys in the input dictionary to be able to error out
13229 // if there are some unknown ones.
13230 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
13231 ::mlir::MLIRContext *ctx = dict.getContext();
13232 (void)ctx;
13233
13234 for (::mlir::NamedAttribute attr : dict) {
13235 if (!usedKeys.contains(V: attr.getName()))
13236 return emitError() << "unknown key '" << attr.getName() <<
13237 "' when parsing properties dictionary";
13238 }
13239 return ::mlir::success();
13240}
13241
13242void vector_reduce_umax::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
13243}
13244
13245
13246} // namespace mlir::LLVM
13247MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_umax)
13248
13249namespace mlir::LLVM {
13250
13251
13252//===----------------------------------------------------------------------===//
13253// ::mlir::LLVM::vector_reduce_umin definitions
13254//===----------------------------------------------------------------------===//
13255
13256namespace detail {
13257
13258vector_reduce_uminGenericAdaptorBase::vector_reduce_uminGenericAdaptorBase(vector_reduce_umin op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
13259
13260
13261} // namespace detail
13262vector_reduce_uminAdaptor::vector_reduce_uminAdaptor(vector_reduce_umin op) : vector_reduce_uminGenericAdaptor(op->getOperands(), op) {}
13263
13264::llvm::LogicalResult vector_reduce_uminAdaptor::verify(::mlir::Location loc) {
13265 return ::mlir::success();
13266}
13267
13268::llvm::LogicalResult vector_reduce_umin::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13269 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13270 if (!dict) {
13271 emitError() << "expected DictionaryAttr to set properties";
13272 return ::mlir::failure();
13273 }
13274 return ::mlir::success();
13275}
13276
13277::mlir::Attribute vector_reduce_umin::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
13278 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
13279 ::mlir::Builder odsBuilder{ctx};
13280
13281 if (!attrs.empty())
13282 return odsBuilder.getDictionaryAttr(value: attrs);
13283 return {};
13284}
13285
13286llvm::hash_code vector_reduce_umin::computePropertiesHash(const Properties &prop) {
13287 using llvm::hash_value;
13288 return llvm::hash_combine();
13289}
13290
13291std::optional<mlir::Attribute> vector_reduce_umin::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
13292 return std::nullopt;
13293}
13294
13295void vector_reduce_umin::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
13296}
13297
13298void vector_reduce_umin::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
13299}
13300
13301::llvm::LogicalResult vector_reduce_umin::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13302 return ::mlir::success();
13303}
13304
13305void vector_reduce_umin::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
13306 odsState.addOperands(newOperands: in);
13307 odsState.addTypes(newTypes: res);
13308}
13309
13310vector_reduce_umin vector_reduce_umin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
13311 ::mlir::OperationState __state__(location, getOperationName());
13312 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
13313 auto __res__ = builder.create(state: __state__);
13314 assert((::llvm::isa<vector_reduce_umin>(__res__)) && "builder didn't return the right type");
13315 return ::llvm::cast<vector_reduce_umin>(Val: __res__);
13316}
13317
13318vector_reduce_umin vector_reduce_umin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
13319 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
13320}
13321
13322void vector_reduce_umin::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13323 odsState.addOperands(newOperands: in);
13324 assert(resultTypes.size() == 1u && "mismatched number of results");
13325 odsState.addTypes(newTypes&: resultTypes);
13326}
13327
13328vector_reduce_umin vector_reduce_umin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13329 ::mlir::OperationState __state__(location, getOperationName());
13330 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
13331 auto __res__ = builder.create(state: __state__);
13332 assert((::llvm::isa<vector_reduce_umin>(__res__)) && "builder didn't return the right type");
13333 return ::llvm::cast<vector_reduce_umin>(Val: __res__);
13334}
13335
13336vector_reduce_umin vector_reduce_umin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13337 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
13338}
13339
13340void vector_reduce_umin::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13341 assert(operands.size() == 1u && "mismatched number of parameters");
13342 odsState.addOperands(newOperands: operands);
13343 odsState.addAttributes(newAttributes: attributes);
13344 assert(resultTypes.size() == 1u && "mismatched number of return types");
13345 odsState.addTypes(newTypes&: resultTypes);
13346}
13347
13348vector_reduce_umin vector_reduce_umin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13349 ::mlir::OperationState __state__(location, getOperationName());
13350 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));
13351 auto __res__ = builder.create(state: __state__);
13352 assert((::llvm::isa<vector_reduce_umin>(__res__)) && "builder didn't return the right type");
13353 return ::llvm::cast<vector_reduce_umin>(Val: __res__);
13354}
13355
13356vector_reduce_umin vector_reduce_umin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13357 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));
13358}
13359
13360void vector_reduce_umin::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13361 assert(operands.size() == 1u && "mismatched number of parameters");
13362 odsState.addOperands(newOperands: operands);
13363 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
13364 odsState.addAttributes(newAttributes: discardableAttributes);
13365 assert(resultTypes.size() == 1u && "mismatched number of return types");
13366 odsState.addTypes(newTypes&: resultTypes);
13367}
13368
13369vector_reduce_umin vector_reduce_umin::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13370 ::mlir::OperationState __state__(location, getOperationName());
13371 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));
13372 auto __res__ = builder.create(state: __state__);
13373 assert((::llvm::isa<vector_reduce_umin>(__res__)) && "builder didn't return the right type");
13374 return ::llvm::cast<vector_reduce_umin>(Val: __res__);
13375}
13376
13377vector_reduce_umin vector_reduce_umin::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13378 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));
13379}
13380
13381::llvm::LogicalResult vector_reduce_umin::verifyInvariantsImpl() {
13382 {
13383 unsigned index = 0; (void)index;
13384 auto valueGroup0 = getODSOperands(index: 0);
13385
13386 for (auto v : valueGroup0) {
13387 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13388 return ::mlir::failure();
13389 }
13390 }
13391 {
13392 unsigned index = 0; (void)index;
13393 auto valueGroup0 = getODSResults(index: 0);
13394
13395 for (auto v : valueGroup0) {
13396 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
13397 return ::mlir::failure();
13398 }
13399 }
13400 return ::mlir::success();
13401}
13402
13403::llvm::LogicalResult vector_reduce_umin::verifyInvariants() {
13404 return verifyInvariantsImpl();
13405}
13406
13407::llvm::LogicalResult vector_reduce_umin::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13408 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13409 if (!dict) {
13410 emitError() << "expected DictionaryAttr to set properties";
13411 return ::mlir::failure();
13412 }
13413 // keep track of used keys in the input dictionary to be able to error out
13414 // if there are some unknown ones.
13415 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
13416 ::mlir::MLIRContext *ctx = dict.getContext();
13417 (void)ctx;
13418
13419 for (::mlir::NamedAttribute attr : dict) {
13420 if (!usedKeys.contains(V: attr.getName()))
13421 return emitError() << "unknown key '" << attr.getName() <<
13422 "' when parsing properties dictionary";
13423 }
13424 return ::mlir::success();
13425}
13426
13427void vector_reduce_umin::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
13428}
13429
13430
13431} // namespace mlir::LLVM
13432MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_umin)
13433
13434namespace mlir::LLVM {
13435
13436
13437//===----------------------------------------------------------------------===//
13438// ::mlir::LLVM::vector_reduce_xor definitions
13439//===----------------------------------------------------------------------===//
13440
13441namespace detail {
13442
13443vector_reduce_xorGenericAdaptorBase::vector_reduce_xorGenericAdaptorBase(vector_reduce_xor op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
13444
13445
13446} // namespace detail
13447vector_reduce_xorAdaptor::vector_reduce_xorAdaptor(vector_reduce_xor op) : vector_reduce_xorGenericAdaptor(op->getOperands(), op) {}
13448
13449::llvm::LogicalResult vector_reduce_xorAdaptor::verify(::mlir::Location loc) {
13450 return ::mlir::success();
13451}
13452
13453::llvm::LogicalResult vector_reduce_xor::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13454 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13455 if (!dict) {
13456 emitError() << "expected DictionaryAttr to set properties";
13457 return ::mlir::failure();
13458 }
13459 return ::mlir::success();
13460}
13461
13462::mlir::Attribute vector_reduce_xor::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
13463 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
13464 ::mlir::Builder odsBuilder{ctx};
13465
13466 if (!attrs.empty())
13467 return odsBuilder.getDictionaryAttr(value: attrs);
13468 return {};
13469}
13470
13471llvm::hash_code vector_reduce_xor::computePropertiesHash(const Properties &prop) {
13472 using llvm::hash_value;
13473 return llvm::hash_combine();
13474}
13475
13476std::optional<mlir::Attribute> vector_reduce_xor::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
13477 return std::nullopt;
13478}
13479
13480void vector_reduce_xor::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
13481}
13482
13483void vector_reduce_xor::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
13484}
13485
13486::llvm::LogicalResult vector_reduce_xor::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13487 return ::mlir::success();
13488}
13489
13490void vector_reduce_xor::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in) {
13491 odsState.addOperands(newOperands: in);
13492 odsState.addTypes(newTypes: res);
13493}
13494
13495vector_reduce_xor vector_reduce_xor::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in) {
13496 ::mlir::OperationState __state__(location, getOperationName());
13497 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
13498 auto __res__ = builder.create(state: __state__);
13499 assert((::llvm::isa<vector_reduce_xor>(__res__)) && "builder didn't return the right type");
13500 return ::llvm::cast<vector_reduce_xor>(Val: __res__);
13501}
13502
13503vector_reduce_xor vector_reduce_xor::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in) {
13504 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), in: std::forward<decltype(in)>(t&: in));
13505}
13506
13507void vector_reduce_xor::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13508 odsState.addOperands(newOperands: in);
13509 assert(resultTypes.size() == 1u && "mismatched number of results");
13510 odsState.addTypes(newTypes&: resultTypes);
13511}
13512
13513vector_reduce_xor vector_reduce_xor::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13514 ::mlir::OperationState __state__(location, getOperationName());
13515 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
13516 auto __res__ = builder.create(state: __state__);
13517 assert((::llvm::isa<vector_reduce_xor>(__res__)) && "builder didn't return the right type");
13518 return ::llvm::cast<vector_reduce_xor>(Val: __res__);
13519}
13520
13521vector_reduce_xor vector_reduce_xor::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in) {
13522 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), in: std::forward<decltype(in)>(t&: in));
13523}
13524
13525void vector_reduce_xor::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13526 assert(operands.size() == 1u && "mismatched number of parameters");
13527 odsState.addOperands(newOperands: operands);
13528 odsState.addAttributes(newAttributes: attributes);
13529 assert(resultTypes.size() == 1u && "mismatched number of return types");
13530 odsState.addTypes(newTypes&: resultTypes);
13531}
13532
13533vector_reduce_xor vector_reduce_xor::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13534 ::mlir::OperationState __state__(location, getOperationName());
13535 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));
13536 auto __res__ = builder.create(state: __state__);
13537 assert((::llvm::isa<vector_reduce_xor>(__res__)) && "builder didn't return the right type");
13538 return ::llvm::cast<vector_reduce_xor>(Val: __res__);
13539}
13540
13541vector_reduce_xor vector_reduce_xor::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13542 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));
13543}
13544
13545void vector_reduce_xor::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13546 assert(operands.size() == 1u && "mismatched number of parameters");
13547 odsState.addOperands(newOperands: operands);
13548 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
13549 odsState.addAttributes(newAttributes: discardableAttributes);
13550 assert(resultTypes.size() == 1u && "mismatched number of return types");
13551 odsState.addTypes(newTypes&: resultTypes);
13552}
13553
13554vector_reduce_xor vector_reduce_xor::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13555 ::mlir::OperationState __state__(location, getOperationName());
13556 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));
13557 auto __res__ = builder.create(state: __state__);
13558 assert((::llvm::isa<vector_reduce_xor>(__res__)) && "builder didn't return the right type");
13559 return ::llvm::cast<vector_reduce_xor>(Val: __res__);
13560}
13561
13562vector_reduce_xor vector_reduce_xor::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13563 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));
13564}
13565
13566::llvm::LogicalResult vector_reduce_xor::verifyInvariantsImpl() {
13567 {
13568 unsigned index = 0; (void)index;
13569 auto valueGroup0 = getODSOperands(index: 0);
13570
13571 for (auto v : valueGroup0) {
13572 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps6(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13573 return ::mlir::failure();
13574 }
13575 }
13576 {
13577 unsigned index = 0; (void)index;
13578 auto valueGroup0 = getODSResults(index: 0);
13579
13580 for (auto v : valueGroup0) {
13581 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
13582 return ::mlir::failure();
13583 }
13584 }
13585 return ::mlir::success();
13586}
13587
13588::llvm::LogicalResult vector_reduce_xor::verifyInvariants() {
13589 return verifyInvariantsImpl();
13590}
13591
13592::llvm::LogicalResult vector_reduce_xor::setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13593 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13594 if (!dict) {
13595 emitError() << "expected DictionaryAttr to set properties";
13596 return ::mlir::failure();
13597 }
13598 // keep track of used keys in the input dictionary to be able to error out
13599 // if there are some unknown ones.
13600 ::mlir::DenseSet<::mlir::StringAttr> usedKeys;
13601 ::mlir::MLIRContext *ctx = dict.getContext();
13602 (void)ctx;
13603
13604 for (::mlir::NamedAttribute attr : dict) {
13605 if (!usedKeys.contains(V: attr.getName()))
13606 return emitError() << "unknown key '" << attr.getName() <<
13607 "' when parsing properties dictionary";
13608 }
13609 return ::mlir::success();
13610}
13611
13612void vector_reduce_xor::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
13613}
13614
13615
13616} // namespace mlir::LLVM
13617MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_xor)
13618
13619namespace mlir::LLVM {
13620
13621
13622//===----------------------------------------------------------------------===//
13623// ::mlir::LLVM::vector_repeat definitions
13624//===----------------------------------------------------------------------===//
13625
13626namespace detail {
13627
13628vector_repeatGenericAdaptorBase::vector_repeatGenericAdaptorBase(vector_repeat op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
13629
13630
13631} // namespace detail
13632vector_repeatAdaptor::vector_repeatAdaptor(vector_repeat op) : vector_repeatGenericAdaptor(op->getOperands(), op) {}
13633
13634::llvm::LogicalResult vector_repeatAdaptor::verify(::mlir::Location loc) {
13635 return ::mlir::success();
13636}
13637
13638::llvm::LogicalResult vector_repeat::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13639 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
13640 if (!dict) {
13641 emitError() << "expected DictionaryAttr to set properties";
13642 return ::mlir::failure();
13643 }
13644 return ::mlir::success();
13645}
13646
13647::mlir::Attribute vector_repeat::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
13648 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
13649 ::mlir::Builder odsBuilder{ctx};
13650
13651 if (!attrs.empty())
13652 return odsBuilder.getDictionaryAttr(value: attrs);
13653 return {};
13654}
13655
13656llvm::hash_code vector_repeat::computePropertiesHash(const Properties &prop) {
13657 using llvm::hash_value;
13658 return llvm::hash_combine();
13659}
13660
13661std::optional<mlir::Attribute> vector_repeat::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
13662 return std::nullopt;
13663}
13664
13665void vector_repeat::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
13666}
13667
13668void vector_repeat::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
13669}
13670
13671::llvm::LogicalResult vector_repeat::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
13672 return ::mlir::success();
13673}
13674
13675void vector_repeat::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value vec) {
13676 odsState.addOperands(newOperands: vec);
13677 odsState.addTypes(newTypes: res);
13678}
13679
13680vector_repeat vector_repeat::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vec) {
13681 ::mlir::OperationState __state__(location, getOperationName());
13682 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), vec: std::forward<decltype(vec)>(t&: vec));
13683 auto __res__ = builder.create(state: __state__);
13684 assert((::llvm::isa<vector_repeat>(__res__)) && "builder didn't return the right type");
13685 return ::llvm::cast<vector_repeat>(Val: __res__);
13686}
13687
13688vector_repeat vector_repeat::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vec) {
13689 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), vec: std::forward<decltype(vec)>(t&: vec));
13690}
13691
13692void vector_repeat::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vec) {
13693 odsState.addOperands(newOperands: vec);
13694 assert(resultTypes.size() == 1u && "mismatched number of results");
13695 odsState.addTypes(newTypes&: resultTypes);
13696}
13697
13698vector_repeat vector_repeat::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vec) {
13699 ::mlir::OperationState __state__(location, getOperationName());
13700 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vec: std::forward<decltype(vec)>(t&: vec));
13701 auto __res__ = builder.create(state: __state__);
13702 assert((::llvm::isa<vector_repeat>(__res__)) && "builder didn't return the right type");
13703 return ::llvm::cast<vector_repeat>(Val: __res__);
13704}
13705
13706vector_repeat vector_repeat::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vec) {
13707 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), vec: std::forward<decltype(vec)>(t&: vec));
13708}
13709
13710void vector_repeat::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13711 assert(operands.size() == 1u && "mismatched number of parameters");
13712 odsState.addOperands(newOperands: operands);
13713 odsState.addAttributes(newAttributes: attributes);
13714 assert(resultTypes.size() == 1u && "mismatched number of return types");
13715 odsState.addTypes(newTypes&: resultTypes);
13716}
13717
13718vector_repeat vector_repeat::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13719 ::mlir::OperationState __state__(location, getOperationName());
13720 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));
13721 auto __res__ = builder.create(state: __state__);
13722 assert((::llvm::isa<vector_repeat>(__res__)) && "builder didn't return the right type");
13723 return ::llvm::cast<vector_repeat>(Val: __res__);
13724}
13725
13726vector_repeat vector_repeat::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
13727 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));
13728}
13729
13730void vector_repeat::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13731 assert(operands.size() == 1u && "mismatched number of parameters");
13732 odsState.addOperands(newOperands: operands);
13733 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
13734 odsState.addAttributes(newAttributes: discardableAttributes);
13735 assert(resultTypes.size() == 1u && "mismatched number of return types");
13736 odsState.addTypes(newTypes&: resultTypes);
13737}
13738
13739vector_repeat vector_repeat::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13740 ::mlir::OperationState __state__(location, getOperationName());
13741 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));
13742 auto __res__ = builder.create(state: __state__);
13743 assert((::llvm::isa<vector_repeat>(__res__)) && "builder didn't return the right type");
13744 return ::llvm::cast<vector_repeat>(Val: __res__);
13745}
13746
13747vector_repeat vector_repeat::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
13748 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));
13749}
13750
13751::llvm::LogicalResult vector_repeat::verifyInvariantsImpl() {
13752 {
13753 unsigned index = 0; (void)index;
13754 auto valueGroup0 = getODSOperands(index: 0);
13755
13756 for (auto v : valueGroup0) {
13757 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps5(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
13758 return ::mlir::failure();
13759 }
13760 }
13761 {
13762 unsigned index = 0; (void)index;
13763 auto valueGroup0 = getODSResults(index: 0);
13764
13765 for (auto v : valueGroup0) {
13766 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_15VectorIntrinsic_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
13767 return ::mlir::failure();
13768 }
13769 }
13770 return ::mlir::success();
13771}
13772
13773::llvm::LogicalResult vector_repeat::verifyInvariants() {
13774 return verifyInvariantsImpl();
13775}
13776
13777::mlir::ParseResult vector_repeat::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
13778 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> allOperands;
13779 ::llvm::ArrayRef<::mlir::Type> allOperandTypes;
13780 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
13781 if (parser.parseLParen())
13782 return ::mlir::failure();
13783 [[maybe_unused]] ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();
13784 if (parser.parseOperandList(result&: allOperands))
13785 return ::mlir::failure();
13786 if (parser.parseRParen())
13787 return ::mlir::failure();
13788 {
13789 auto loc = parser.getCurrentLocation();(void)loc;
13790 if (parser.parseOptionalAttrDict(result&: result.attributes))
13791 return ::mlir::failure();
13792 }
13793 if (parser.parseColon())
13794 return ::mlir::failure();
13795
13796 ::mlir::FunctionType allOperand__allResult_functionType;
13797 if (parser.parseType(result&: allOperand__allResult_functionType))
13798 return ::mlir::failure();
13799 allOperandTypes = allOperand__allResult_functionType.getInputs();
13800 allResultTypes = allOperand__allResult_functionType.getResults();
13801 result.addTypes(newTypes: allResultTypes);
13802 // coverity[ARRAY_VS_SINGLETON]
13803 if (parser.resolveOperands(operands&: allOperands, types&: allOperandTypes, loc: allOperandLoc, result&: result.operands))
13804 return ::mlir::failure();
13805 return ::mlir::success();
13806}
13807
13808LLVM_ATTRIBUTE_MINSIZE void vector_repeat::print(::mlir::OpAsmPrinter &_odsPrinter) {
13809 _odsPrinter << "(";
13810 _odsPrinter << getOperation()->getOperands();
13811 _odsPrinter << ")";
13812 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
13813 _odsPrinter << " :";
13814 _odsPrinter << ' ';
13815 _odsPrinter.printFunctionalType(inputs: getOperation()->getOperandTypes(), results: getOperation()->getResultTypes());
13816}
13817
13818void vector_repeat::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
13819}
13820
13821
13822} // namespace mlir::LLVM
13823MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_repeat)
13824
13825
13826//===----------------------------------------------------------------------===//
13827// LLVMDialect VectorIntrinsic Op Registration Hook
13828//===----------------------------------------------------------------------===//
13829
13830void ::mlir::LLVM::registerLLVMDialectOperationsVectorIntrinsic(::mlir::LLVM::LLVMDialect *dialect) {
13831 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::GetActiveLaneMaskOp>(dialect&: *dialect);
13832 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::MaskedLoadOp>(dialect&: *dialect);
13833 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::MaskedStoreOp>(dialect&: *dialect);
13834 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::MatrixColumnMajorLoadOp>(dialect&: *dialect);
13835 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::MatrixColumnMajorStoreOp>(dialect&: *dialect);
13836 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::MatrixMultiplyOp>(dialect&: *dialect);
13837 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::MatrixTransposeOp>(dialect&: *dialect);
13838 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::StepVectorOp>(dialect&: *dialect);
13839 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::masked_compressstore>(dialect&: *dialect);
13840 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::masked_expandload>(dialect&: *dialect);
13841 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::masked_gather>(dialect&: *dialect);
13842 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::masked_scatter>(dialect&: *dialect);
13843 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_deinterleave2>(dialect&: *dialect);
13844 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_extract>(dialect&: *dialect);
13845 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_insert>(dialect&: *dialect);
13846 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_interleave2>(dialect&: *dialect);
13847 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_add>(dialect&: *dialect);
13848 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_and>(dialect&: *dialect);
13849 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_fadd>(dialect&: *dialect);
13850 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_fmax>(dialect&: *dialect);
13851 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_fmaximum>(dialect&: *dialect);
13852 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_fmaximumnum>(dialect&: *dialect);
13853 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_fmin>(dialect&: *dialect);
13854 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_fminimum>(dialect&: *dialect);
13855 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_fminimumnum>(dialect&: *dialect);
13856 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_fmul>(dialect&: *dialect);
13857 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_mul>(dialect&: *dialect);
13858 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_or>(dialect&: *dialect);
13859 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_smax>(dialect&: *dialect);
13860 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_smin>(dialect&: *dialect);
13861 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_umax>(dialect&: *dialect);
13862 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_umin>(dialect&: *dialect);
13863 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_reduce_xor>(dialect&: *dialect);
13864 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::vector_repeat>(dialect&: *dialect);
13865}
13866
13867#endif // GET_OP_CLASSES
13868
13869