Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Lower / irreducible.f90
blob7a421f395da62e2fcc0cdd135a8eb19efe6e35f4
1 ! RUN: bbc %s -o "-" | FileCheck %s
3 ! CHECK-LABEL: irreducible
4 subroutine irreducible(k)
5 ! CHECK: cond_br %{{[0-9]+}}, ^bb1, ^bb2
6 if (k < 5) goto 20
7 ! CHECK: ^bb1: // 2 preds: ^bb0, ^bb2
8 10 print*, k ! scc entry #1: (k < 5) is false
9 k = k + 1
10 ! CHECK: ^bb2: // 2 preds: ^bb0, ^bb1
11 ! CHECK: cond_br %{{[0-9]+}}, ^bb1, ^bb3
12 20 if (k < 3) goto 10 ! scc entry #2: (k < 5) is true
13 ! CHECK: ^bb3: // pred: ^bb2
14 end
16 ! CHECK-LABEL: main
17 program p
18 do i = 0, 6
19 n = i
20 print*
21 print*, 1000 + n
22 call irreducible(n)
23 enddo
24 end