summaryrefslogtreecommitdiff
path: root/mlir/test/Integration/Dialect/ControlFlow/assert.mlir
blob: 0271598140a7dd4944428db779e93c8f6dd2d3bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: mlir-opt %s -test-cf-assert \
// RUN:     -convert-func-to-llvm -convert-arith-to-llvm | \
// RUN: mlir-runner -e main -entry-point-result=void | \
// RUN: FileCheck %s

func.func @main() {
  %a = arith.constant 0 : i1
  %b = arith.constant 1 : i1
  // CHECK: assertion foo
  cf.assert %a, "assertion foo"
  // CHECK-NOT: assertion bar
  cf.assert %b, "assertion bar"
  return
}