@@ -163,52 +163,74 @@ def OpExecutionModeId: Op<331, (outs), (ins ID:$entry, ExecutionMode:$mode, vari
163163
164164// 3.42.6 Type-Declaration Instructions
165165
166- def OpTypeVoid: Op<19, (outs TYPE:$type), (ins), "$type = OpTypeVoid">;
167- def OpTypeBool: Op<20, (outs TYPE:$type), (ins), "$type = OpTypeBool">;
168- def OpTypeInt: Op<21, (outs TYPE:$type), (ins i32imm:$width, i32imm:$signedness),
169- "$type = OpTypeInt $width $signedness">;
170- def OpTypeFloat: Op<22, (outs TYPE:$type), (ins i32imm:$width, variable_ops),
171- "$type = OpTypeFloat $width">;
172- def OpTypeVector: Op<23, (outs TYPE:$type), (ins TYPE:$compType, i32imm:$compCount),
173- "$type = OpTypeVector $compType $compCount">;
174- def OpTypeMatrix: Op<24, (outs TYPE:$type), (ins TYPE:$colType, i32imm:$colCount),
175- "$type = OpTypeMatrix $colType $colCount">;
176- def OpTypeImage: Op<25, (outs TYPE:$res), (ins TYPE:$sampTy, Dim:$dim, i32imm:$depth,
177- i32imm:$arrayed, i32imm:$MS, i32imm:$sampled, ImageFormat:$imFormat, variable_ops),
178- "$res = OpTypeImage $sampTy $dim $depth $arrayed $MS $sampled $imFormat">;
179- def OpTypeSampler: Op<26, (outs TYPE:$res), (ins), "$res = OpTypeSampler">;
180- def OpTypeSampledImage: Op<27, (outs TYPE:$res), (ins TYPE:$imageType),
181- "$res = OpTypeSampledImage $imageType">;
182- def OpTypeArray: Op<28, (outs TYPE:$type), (ins TYPE:$elementType, ID:$length),
183- "$type = OpTypeArray $elementType $length">;
184- def OpTypeRuntimeArray: Op<29, (outs TYPE:$type), (ins TYPE:$elementType),
185- "$type = OpTypeRuntimeArray $elementType">;
186- def OpTypeStruct: Op<30, (outs TYPE:$res), (ins variable_ops), "$res = OpTypeStruct">;
187- def OpTypeStructContinuedINTEL: Op<6090, (outs), (ins variable_ops),
188- "OpTypeStructContinuedINTEL">;
189- def OpTypeOpaque: Op<31, (outs TYPE:$res), (ins StringImm:$name, variable_ops),
190- "$res = OpTypeOpaque $name">;
191- def OpTypePointer: Op<32, (outs TYPE:$res), (ins StorageClass:$storage, TYPE:$type),
192- "$res = OpTypePointer $storage $type">;
193- def OpTypeFunction: Op<33, (outs TYPE:$funcType), (ins TYPE:$returnType, variable_ops),
194- "$funcType = OpTypeFunction $returnType">;
195- def OpTypeEvent: Op<34, (outs TYPE:$res), (ins), "$res = OpTypeEvent">;
196- def OpTypeDeviceEvent: Op<35, (outs TYPE:$res), (ins), "$res = OpTypeDeviceEvent">;
197- def OpTypeReserveId: Op<36, (outs TYPE:$res), (ins), "$res = OpTypeReserveId">;
198- def OpTypeQueue: Op<37, (outs TYPE:$res), (ins), "$res = OpTypeQueue">;
199- def OpTypePipe: Op<38, (outs TYPE:$res), (ins AccessQualifier:$a), "$res = OpTypePipe $a">;
200- def OpTypeForwardPointer: Op<39, (outs), (ins TYPE:$ptrType, StorageClass:$storageClass),
201- "OpTypeForwardPointer $ptrType $storageClass">;
202- def OpTypePipeStorage: Op<322, (outs TYPE:$res), (ins), "$res = OpTypePipeStorage">;
203- def OpTypeNamedBarrier: Op<327, (outs TYPE:$res), (ins), "$res = OpTypeNamedBarrier">;
204- def OpTypeAccelerationStructureNV: Op<5341, (outs TYPE:$res), (ins),
205- "$res = OpTypeAccelerationStructureNV">;
206- def OpTypeCooperativeMatrixNV: Op<5358, (outs TYPE:$res),
207- (ins TYPE:$compType, ID:$scope, ID:$rows, ID:$cols),
208- "$res = OpTypeCooperativeMatrixNV $compType $scope $rows $cols">;
209- def OpTypeCooperativeMatrixKHR: Op<4456, (outs TYPE:$res),
210- (ins TYPE:$compType, ID:$scope, ID:$rows, ID:$cols, ID:$use),
211- "$res = OpTypeCooperativeMatrixKHR $compType $scope $rows $cols $use">;
166+ def OpTypeVoid : PureOp<19, (outs TYPE:$type), (ins), "$type = OpTypeVoid">;
167+ def OpTypeBool : PureOp<20, (outs TYPE:$type), (ins), "$type = OpTypeBool">;
168+ def OpTypeInt
169+ : PureOp<21, (outs TYPE:$type), (ins i32imm:$width, i32imm:$signedness),
170+ "$type = OpTypeInt $width $signedness">;
171+ def OpTypeFloat
172+ : PureOp<22, (outs TYPE:$type), (ins i32imm:$width, variable_ops),
173+ "$type = OpTypeFloat $width">;
174+ def OpTypeVector
175+ : PureOp<23, (outs TYPE:$type), (ins TYPE:$compType, i32imm:$compCount),
176+ "$type = OpTypeVector $compType $compCount">;
177+ def OpTypeMatrix
178+ : PureOp<24, (outs TYPE:$type), (ins TYPE:$colType, i32imm:$colCount),
179+ "$type = OpTypeMatrix $colType $colCount">;
180+ def OpTypeImage : PureOp<25, (outs TYPE:$res),
181+ (ins TYPE:$sampTy, Dim:$dim, i32imm:$depth,
182+ i32imm:$arrayed, i32imm:$MS, i32imm:$sampled,
183+ ImageFormat:$imFormat, variable_ops),
184+ "$res = OpTypeImage $sampTy $dim $depth $arrayed $MS "
185+ "$sampled $imFormat">;
186+ def OpTypeSampler : PureOp<26, (outs TYPE:$res), (ins), "$res = OpTypeSampler">;
187+ def OpTypeSampledImage : PureOp<27, (outs TYPE:$res), (ins TYPE:$imageType),
188+ "$res = OpTypeSampledImage $imageType">;
189+ def OpTypeArray
190+ : PureOp<28, (outs TYPE:$type), (ins TYPE:$elementType, ID:$length),
191+ "$type = OpTypeArray $elementType $length">;
192+ def OpTypeRuntimeArray : PureOp<29, (outs TYPE:$type), (ins TYPE:$elementType),
193+ "$type = OpTypeRuntimeArray $elementType">;
194+ def OpTypeStruct
195+ : PureOp<30, (outs TYPE:$res), (ins variable_ops), "$res = OpTypeStruct">;
196+ def OpTypeStructContinuedINTEL
197+ : PureOp<6090, (outs), (ins variable_ops), "OpTypeStructContinuedINTEL">;
198+ def OpTypeOpaque
199+ : PureOp<31, (outs TYPE:$res), (ins StringImm:$name, variable_ops),
200+ "$res = OpTypeOpaque $name">;
201+ def OpTypePointer
202+ : PureOp<32, (outs TYPE:$res), (ins StorageClass:$storage, TYPE:$type),
203+ "$res = OpTypePointer $storage $type">;
204+ def OpTypeFunction
205+ : PureOp<33, (outs TYPE:$funcType), (ins TYPE:$returnType, variable_ops),
206+ "$funcType = OpTypeFunction $returnType">;
207+ def OpTypeEvent : PureOp<34, (outs TYPE:$res), (ins), "$res = OpTypeEvent">;
208+ def OpTypeDeviceEvent
209+ : PureOp<35, (outs TYPE:$res), (ins), "$res = OpTypeDeviceEvent">;
210+ def OpTypeReserveId
211+ : PureOp<36, (outs TYPE:$res), (ins), "$res = OpTypeReserveId">;
212+ def OpTypeQueue : PureOp<37, (outs TYPE:$res), (ins), "$res = OpTypeQueue">;
213+ def OpTypePipe : PureOp<38, (outs TYPE:$res), (ins AccessQualifier:$a),
214+ "$res = OpTypePipe $a">;
215+ def OpTypeForwardPointer
216+ : PureOp<39, (outs), (ins TYPE:$ptrType, StorageClass:$storageClass),
217+ "OpTypeForwardPointer $ptrType $storageClass">;
218+ def OpTypePipeStorage
219+ : PureOp<322, (outs TYPE:$res), (ins), "$res = OpTypePipeStorage">;
220+ def OpTypeNamedBarrier
221+ : PureOp<327, (outs TYPE:$res), (ins), "$res = OpTypeNamedBarrier">;
222+ def OpTypeAccelerationStructureNV
223+ : PureOp<5341, (outs TYPE:$res), (ins),
224+ "$res = OpTypeAccelerationStructureNV">;
225+ def OpTypeCooperativeMatrixNV
226+ : PureOp<5358, (outs TYPE:$res),
227+ (ins TYPE:$compType, ID:$scope, ID:$rows, ID:$cols),
228+ "$res = OpTypeCooperativeMatrixNV $compType $scope $rows $cols">;
229+ def OpTypeCooperativeMatrixKHR
230+ : PureOp<4456, (outs TYPE:$res),
231+ (ins TYPE:$compType, ID:$scope, ID:$rows, ID:$cols, ID:$use),
232+ "$res = OpTypeCooperativeMatrixKHR $compType $scope $rows $cols "
233+ "$use">;
212234
213235// 3.42.7 Constant-Creation Instructions
214236
@@ -222,31 +244,46 @@ defm OpConstant: IntFPImm<43, "OpConstant">;
222244
223245def ConstPseudoTrue: IntImmLeaf<i64, [{ return Imm.getBitWidth() == 1 && Imm.getZExtValue() == 1; }]>;
224246def ConstPseudoFalse: IntImmLeaf<i64, [{ return Imm.getBitWidth() == 1 && Imm.getZExtValue() == 0; }]>;
225- def OpConstantTrue: Op<41, (outs iID:$dst), (ins TYPE:$src_ty), "$dst = OpConstantTrue $src_ty",
226- [(set iID:$dst, (assigntype ConstPseudoTrue, TYPE:$src_ty))]>;
227- def OpConstantFalse: Op<42, (outs iID:$dst), (ins TYPE:$src_ty), "$dst = OpConstantFalse $src_ty",
228- [(set iID:$dst, (assigntype ConstPseudoFalse, TYPE:$src_ty))]>;
229-
230- def OpConstantComposite: Op<44, (outs ID:$res), (ins TYPE:$type, variable_ops),
231- "$res = OpConstantComposite $type">;
232- def OpConstantCompositeContinuedINTEL: Op<6091, (outs), (ins variable_ops),
233- "OpConstantCompositeContinuedINTEL">;
234-
235- def OpConstantSampler: Op<45, (outs ID:$res),
236- (ins TYPE:$t, SamplerAddressingMode:$s, i32imm:$p, SamplerFilterMode:$f),
237- "$res = OpConstantSampler $t $s $p $f">;
238- def OpConstantNull: Op<46, (outs ID:$dst), (ins TYPE:$src_ty), "$dst = OpConstantNull $src_ty">;
239-
240- def OpSpecConstantTrue: Op<48, (outs ID:$r), (ins TYPE:$t), "$r = OpSpecConstantTrue $t">;
241- def OpSpecConstantFalse: Op<49, (outs ID:$r), (ins TYPE:$t), "$r = OpSpecConstantFalse $t">;
242- def OpSpecConstant: Op<50, (outs ID:$res), (ins TYPE:$type, i32imm:$imm, variable_ops),
243- "$res = OpSpecConstant $type $imm">;
244- def OpSpecConstantComposite: Op<51, (outs ID:$res), (ins TYPE:$type, variable_ops),
245- "$res = OpSpecConstantComposite $type">;
246- def OpSpecConstantCompositeContinuedINTEL: Op<6092, (outs), (ins variable_ops),
247- "OpSpecConstantCompositeContinuedINTEL">;
248- def OpSpecConstantOp: Op<52, (outs ID:$res), (ins TYPE:$t, SpecConstantOpOperands:$c, ID:$o, variable_ops),
249- "$res = OpSpecConstantOp $t $c $o">;
247+ def OpConstantTrue
248+ : PureOp<41, (outs iID:$dst), (ins TYPE:$src_ty),
249+ "$dst = OpConstantTrue $src_ty",
250+ [(set iID:$dst, (assigntype ConstPseudoTrue, TYPE:$src_ty))]>;
251+ def OpConstantFalse
252+ : PureOp<42, (outs iID:$dst), (ins TYPE:$src_ty),
253+ "$dst = OpConstantFalse $src_ty",
254+ [(set iID:$dst, (assigntype ConstPseudoFalse, TYPE:$src_ty))]>;
255+
256+ def OpConstantComposite
257+ : PureOp<44, (outs ID:$res), (ins TYPE:$type, variable_ops),
258+ "$res = OpConstantComposite $type">;
259+ def OpConstantCompositeContinuedINTEL
260+ : PureOp<6091, (outs), (ins variable_ops),
261+ "OpConstantCompositeContinuedINTEL">;
262+
263+ def OpConstantSampler : PureOp<45, (outs ID:$res),
264+ (ins TYPE:$t, SamplerAddressingMode:$s,
265+ i32imm:$p, SamplerFilterMode:$f),
266+ "$res = OpConstantSampler $t $s $p $f">;
267+ def OpConstantNull : PureOp<46, (outs ID:$dst), (ins TYPE:$src_ty),
268+ "$dst = OpConstantNull $src_ty">;
269+
270+ def OpSpecConstantTrue
271+ : PureOp<48, (outs ID:$r), (ins TYPE:$t), "$r = OpSpecConstantTrue $t">;
272+ def OpSpecConstantFalse
273+ : PureOp<49, (outs ID:$r), (ins TYPE:$t), "$r = OpSpecConstantFalse $t">;
274+ def OpSpecConstant
275+ : PureOp<50, (outs ID:$res), (ins TYPE:$type, i32imm:$imm, variable_ops),
276+ "$res = OpSpecConstant $type $imm">;
277+ def OpSpecConstantComposite
278+ : PureOp<51, (outs ID:$res), (ins TYPE:$type, variable_ops),
279+ "$res = OpSpecConstantComposite $type">;
280+ def OpSpecConstantCompositeContinuedINTEL
281+ : PureOp<6092, (outs), (ins variable_ops),
282+ "OpSpecConstantCompositeContinuedINTEL">;
283+ def OpSpecConstantOp
284+ : PureOp<52, (outs ID:$res),
285+ (ins TYPE:$t, SpecConstantOpOperands:$c, ID:$o, variable_ops),
286+ "$res = OpSpecConstantOp $t $c $o">;
250287
251288// 3.42.8 Memory Instructions
252289
0 commit comments