1// RUN: tco %s | FileCheck %s
2// RUN: tco %s --mlir-pass-statistics --mlir-pass-statistics-display=pipeline 2>&1 | FileCheck %s --check-prefix=PASSES
3
4// Check that tco is working with a basic test.
5// Also check the passes in the default pipeline.
6
7func.func @_QQmain() {
8  return
9}
10
11// CHECK: ; ModuleID = 'FIRModule'
12// CHECK-LABEL: define void @_QQmain()
13// CHECK:       ret void
14
15// PASSES: Pass statistics report
16
17// PASSES-LABEL: 'func.func' Pipeline
18// PASSES: ArrayValueCopy
19// PASSES: CharacterConversion
20// PASSES: Canonicalizer
21// PASSES: SimplifyRegionLite
22
23// PASSES-LABEL: 'func.func' Pipeline
24// PASSES: MemoryAllocationOpt
25// PASSES: Inliner
26// PASSES: CSE
27
28// PASSES-LABEL: 'func.func' Pipeline
29// PASSES: CFGConversion
30// PASSES: SCFToControlFlow
31// PASSES: Canonicalizer
32// PASSES: SimplifyRegionLite
33// PASSES: BoxedProcedurePass
34
35// PASSES-LABEL: 'func.func' Pipeline
36// PASSES: AbstractResultOpt
37// PASSES: CodeGenRewrite
38// PASSES: TargetRewrite
39// PASSES: FIRToLLVMLowering
40// PASSES: LLVMIRLoweringPass
41