Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Fir / basic-program.fir
blob78c1ab080db1111d0a701ec2763c3b957bed85f1
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
4 // REQUIRES: asserts
6 // Check that tco is working with a basic test.
7 // Also check the passes in the default pipeline.
9 func.func @_QQmain() {
10   return
13 // CHECK: ; ModuleID = 'FIRModule'
14 // CHECK-LABEL: define void @_QQmain()
15 // CHECK:       ret void
17 // PASSES: Pass statistics report
19 // PASSES:      CSE
20 // PASSES-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd
21 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd
23 // PASSES-NEXT: 'func.func' Pipeline
24 // PASSES-NEXT:   ArrayValueCopy
25 // PASSES-NEXT:   CharacterConversion
27 // PASSES-NEXT: Canonicalizer
28 // PASSES-NEXT: SimplifyRegionLite
29 // PASSES-NEXT: SimplifyIntrinsics
30 // PASSES-NEXT: AlgebraicSimplification
31 // PASSES-NEXT: CSE
32 // PASSES-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd
33 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd
35 // PASSES-NEXT: 'func.func' Pipeline
36 // PASSES-NEXT:   MemoryAllocationOpt
38 // PASSES-NEXT: Inliner
39 // PASSES-NEXT: SimplifyRegionLite
40 // PASSES-NEXT: CSE
41 // PASSES-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd
42 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd
44 // PASSES-NEXT: 'func.func' Pipeline
45 // PASSES-NEXT:   PolymorphicOpConversion
46 // PASSES-NEXT:   CFGConversion
48 // PASSES-NEXT: SCFToControlFlow
49 // PASSES-NEXT: Canonicalizer
50 // PASSES-NEXT: SimplifyRegionLite
51 // PASSES-NEXT: CSE
52 // PASSES-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd
53 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd
54 // PASSES-NEXT: BoxedProcedurePass
56 // PASSES-NEXT: Pipeline Collection : ['fir.global', 'func.func']
57 // PASSES-NEXT:   'fir.global' Pipeline
58 // PASSES-NEXT:    AbstractResultOnGlobalOpt
59 // PASSES-NEXT:  'func.func' Pipeline
60 // PASSES-NEXT:    AbstractResultOnFuncOpt
62 // PASSES-NEXT: CodeGenRewrite
63 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations eliminated
64 // PASSES-NEXT: TargetRewrite
65 // PASSES-NEXT: FIRToLLVMLowering
66 // PASSES-NEXT: LLVMIRLoweringPass