@@ -379,23 +379,23 @@ def AllocaOp : AllocLikeOp<"alloca", AutomaticAllocationScopeResource> {
379
379
operands. For example:
380
380
381
381
```mlir
382
- %0 = alloca() : memref<8x64xf32>
382
+ %0 = alloca() : memref<8x64xf32>
383
383
```
384
384
385
385
The optional list of dimension operands are bound to the dynamic dimensions
386
386
specified in its memref type. In the example below, the SSA value '%d' is
387
387
bound to the second dimension of the memref (which is dynamic).
388
388
389
389
```mlir
390
- %0 = alloca(%d) : memref<8x?xf32>
390
+ %0 = alloca(%d) : memref<8x?xf32>
391
391
```
392
392
393
393
The optional list of symbol operands are bound to the symbols of the
394
394
memref's affine map. In the example below, the SSA value '%s' is bound to
395
395
the symbol 's0' in the affine map specified in the allocs memref type.
396
396
397
397
```mlir
398
- %0 = alloca()[%s] : memref<8x64xf32,
398
+ %0 = alloca()[%s] : memref<8x64xf32,
399
399
affine_map<(d0, d1)[s0] -> ((d0 + s0), d1)>>
400
400
```
401
401
@@ -441,6 +441,34 @@ def AndOp : IntArithmeticOp<"and", [Commutative]> {
441
441
let hasFolder = 1;
442
442
}
443
443
444
+ //===----------------------------------------------------------------------===//
445
+ // AssertOp
446
+ //===----------------------------------------------------------------------===//
447
+
448
+ def AssertOp : Std_Op<"assert"> {
449
+ let summary = "Assert operation with message attribute";
450
+ let description = [{
451
+ Assert operation with single boolean operand and an error message attribute.
452
+ If the argument is `true` this operation has no effect.
453
+ Otherwise, the program execution will abort.
454
+ The provided error message may be used by a runtime to propagate the error
455
+ to the user.
456
+
457
+ Example:
458
+
459
+ ```mlir
460
+ assert %b, "Expected ... to be true"
461
+ ```
462
+ }];
463
+
464
+ let arguments = (ins I1:$arg, StrAttr:$msg);
465
+
466
+ let assemblyFormat = "$arg `,` $msg attr-dict";
467
+
468
+ // AssertOp is fully verified by its traits.
469
+ let verifier = ?;
470
+ }
471
+
444
472
//===----------------------------------------------------------------------===//
445
473
// AssumeAlignmentOp
446
474
//===----------------------------------------------------------------------===//
0 commit comments