You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
415 B
22 lines
415 B
// RUN: mlir-opt -pass-pipeline='func(canonicalize)' %s | FileCheck %s
|
|
// verify that terminators survive the canonicalizer
|
|
|
|
// CHECK-LABEL: @return
|
|
// CHECK: llvm.return
|
|
func @return() {
|
|
llvm.return
|
|
}
|
|
|
|
// CHECK-LABEL: @control_flow
|
|
// CHECK: llvm.br
|
|
// CHECK: llvm.cond_br
|
|
// CHECK: llvm.return
|
|
func @control_flow(%cond : !llvm.i1) {
|
|
llvm.br ^bb1
|
|
^bb1:
|
|
llvm.cond_br %cond, ^bb2, ^bb1
|
|
^bb2:
|
|
llvm.return
|
|
}
|
|
|