[RISCV][VLOPT] Add vector narrowing integer right shift instructions to isSupportedIn...
[llvm-project.git] / flang / test / Fir / basic-program.fir
blobd2788008c3893e5dff05dd0a305de786262cbc0c
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:        Canonicalizer
20 // PASSES-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']
21 // PASSES-NEXT: 'fir.global' Pipeline
22 // PASSES-NEXT:   SimplifyHLFIRIntrinsics
23 // PASSES-NEXT:   InlineElementals
24 // PASSES-NEXT: 'func.func' Pipeline
25 // PASSES-NEXT:   SimplifyHLFIRIntrinsics
26 // PASSES-NEXT:   InlineElementals
27 // PASSES-NEXT: 'omp.declare_reduction' Pipeline
28 // PASSES-NEXT:   SimplifyHLFIRIntrinsics
29 // PASSES-NEXT:   InlineElementals
30 // PASSES-NEXT: 'omp.private' Pipeline
31 // PASSES-NEXT:   SimplifyHLFIRIntrinsics
32 // PASSES-NEXT:   InlineElementals
33 // PASSES-NEXT:   Canonicalizer
34 // PASSES-NEXT:   CSE
35 // PASSES-NEXT:    (S) 0 num-cse'd - Number of operations CSE'd
36 // PASSES-NEXT:    (S) 0 num-dce'd - Number of operations DCE'd
37 // PASSES-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']
38 // PASSES-NEXT: 'fir.global' Pipeline
39 // PASSES-NEXT:    OptimizedBufferization
40 // PASSES-NEXT: 'func.func' Pipeline
41 // PASSES-NEXT:    OptimizedBufferization
42 // PASSES-NEXT: 'omp.declare_reduction' Pipeline
43 // PASSES-NEXT:    OptimizedBufferization
44 // PASSES-NEXT: 'omp.private' Pipeline
45 // PASSES-NEXT:    OptimizedBufferization
46 // PASSES-NEXT:   LowerHLFIROrderedAssignments
47 // PASSES-NEXT:   LowerHLFIRIntrinsics
48 // PASSES-NEXT:   BufferizeHLFIR
49 // PASSES-NEXT:   ConvertHLFIRtoFIR
50 // PASSES-NEXT:   LowerWorkshare
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
55 // PASSES-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']
56 // PASSES-NEXT: 'fir.global' Pipeline
57 // PASSES-NEXT:   CharacterConversion
58 // PASSES-NEXT: 'func.func' Pipeline
59 // PASSES-NEXT:   ArrayValueCopy
60 // PASSES-NEXT:   CharacterConversion
61 // PASSES-NEXT: 'omp.declare_reduction' Pipeline
62 // PASSES-NEXT:   CharacterConversion
63 // PASSES-NEXT: 'omp.private' Pipeline
64 // PASSES-NEXT:   CharacterConversion
66 // PASSES-NEXT: Canonicalizer
67 // PASSES-NEXT: SimplifyRegionLite
68 // PASSES-NEXT: SimplifyIntrinsics
69 // PASSES-NEXT: AlgebraicSimplification
70 // PASSES-NEXT: CSE
71 // PASSES-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd
72 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd
74 // PASSES-NEXT: 'func.func' Pipeline
75 // PASSES-NEXT:   MemoryAllocationOpt
77 // PASSES-NEXT: Inliner
78 // PASSES-NEXT: SimplifyRegionLite
79 // PASSES-NEXT: CSE
80 // PASSES-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd
81 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd
83 // PASSES-NEXT: PolymorphicOpConversion
84 // PASSES-NEXT: AssumedRankOpConversion
85 // PASSES-NEXT: AddAliasTags
87 // PASSES-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'omp.declare_reduction', 'omp.private']
88 // PASSES-NEXT: 'fir.global' Pipeline
89 // PASSES-NEXT:   StackReclaim
90 // PASSES-NEXT:   CFGConversion
91 // PASSES-NEXT: 'func.func' Pipeline
92 // PASSES-NEXT:   StackReclaim
93 // PASSES-NEXT:   CFGConversion
94 // PASSES-NEXT: 'omp.declare_reduction' Pipeline
95 // PASSES-NEXT:   StackReclaim
96 // PASSES-NEXT:   CFGConversion
97 // PASSES-NEXT: 'omp.private' Pipeline
98 // PASSES-NEXT:   StackReclaim
99 // PASSES-NEXT:   CFGConversion
101 // PASSES-NEXT: SCFToControlFlow
102 // PASSES-NEXT: Canonicalizer
103 // PASSES-NEXT: SimplifyRegionLite
104 // PASSES-NEXT: CSE
105 // PASSES-NEXT:   (S) 0 num-cse'd - Number of operations CSE'd
106 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations DCE'd
107 // PASSES-NEXT: BoxedProcedurePass
109 // PASSES-NEXT: Pipeline Collection : ['fir.global', 'func.func', 'gpu.module', 'omp.declare_reduction', 'omp.private']
110 // PASSES-NEXT:  'fir.global' Pipeline
111 // PASSES-NEXT:    AbstractResultOpt
112 // PASSES-NEXT:  'func.func' Pipeline
113 // PASSES-NEXT:    AbstractResultOpt
114 // PASSES-NEXT:  'gpu.module' Pipeline
115 // PASSES-NEXT:   Pipeline Collection : ['func.func', 'gpu.func'] 
116 // PASSES-NEXT:   'func.func' Pipeline 
117 // PASSES-NEXT:   AbstractResultOpt
118 // PASSES-NEXT:   'gpu.func' Pipeline 
119 // PASSES-NEXT:   AbstractResultOpt
120 // PASSES-NEXT:  'omp.declare_reduction' Pipeline
121 // PASSES-NEXT:    AbstractResultOpt
122 // PASSES-NEXT:  'omp.private' Pipeline
123 // PASSES-NEXT:    AbstractResultOpt
125 // PASSES-NEXT: CodeGenRewrite
126 // PASSES-NEXT:   (S) 0 num-dce'd - Number of operations eliminated
127 // PASSES-NEXT: TargetRewrite
128 // PASSES-NEXT: CompilerGeneratedNamesConversion
129 // PASSES-NEXT: 'func.func' Pipeline
130 // PASSES-NEXT:  FunctionAttr
131 // PASSES-NEXT: FIRToLLVMLowering
132 // PASSES-NEXT: ReconcileUnrealizedCasts
133 // PASSES-NEXT: LLVMIRLoweringPass