1// RUN: mlir-opt -pass-pipeline='func(canonicalize)' %s | FileCheck %s 2// verify that terminators survive the canonicalizer 3 4// CHECK-LABEL: @return 5// CHECK: llvm.return 6func @return() { 7 llvm.return 8} 9 10// CHECK-LABEL: @control_flow 11// CHECK: llvm.br 12// CHECK: llvm.cond_br 13// CHECK: llvm.return 14func @control_flow(%cond : !llvm.i1) { 15 llvm.br ^bb1 16^bb1: 17 llvm.cond_br %cond, ^bb2, ^bb1 18^bb2: 19 llvm.return 20} 21 22