aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/IR/test-take-body.mlir
blob: 7edb3b8625376f7ae4ed22ea99e8f9ae2729c624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: mlir-opt -allow-unregistered-dialect %s --test-take-body -split-input-file

func.func @foo() {
  %0 = "test.foo"() : () -> i32
  cf.br ^header

^header:
  cf.br ^body

^body:
  "test.use"(%0) : (i32) -> ()
  cf.br ^header
}

func.func private @bar() {
  return
}

// CHECK-LABEL: func @foo
// CHECK-NEXT: return

// CHECK-LABEL: func private @bar()
// CHECK-NOT: {