xref: /llvm-project/mlir/test/Integration/Dialect/ControlFlow/assert.mlir (revision eb206e9ea84eff0a0596fed2de8316d924f946d1)
1// RUN: mlir-opt %s -test-cf-assert \
2// RUN:     -convert-func-to-llvm -convert-arith-to-llvm | \
3// RUN: mlir-runner -e main -entry-point-result=void | \
4// RUN: FileCheck %s
5
6func.func @main() {
7  %a = arith.constant 0 : i1
8  %b = arith.constant 1 : i1
9  // CHECK: assertion foo
10  cf.assert %a, "assertion foo"
11  // CHECK-NOT: assertion bar
12  cf.assert %b, "assertion bar"
13  return
14}
15