1 // RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s
3 // tests firx for test-suite test: pr69183.f90. Makes sure we can handle inling
4 // private ops when the alloca block ends with a conditional branch.
6 omp.private {type = private} @_QFwsloop_privateEi_private_ref_i32 : !llvm.ptr alloc {
7 ^bb0(%arg0: !llvm.ptr):
8 %0 = llvm.mlir.constant(1 : i64) : i64
9 %1 = llvm.alloca %0 x i32 {bindc_name = "i", pinned} : (i64) -> !llvm.ptr
10 omp.yield(%1 : !llvm.ptr)
13 llvm.func @wsloop_private_(%arg0: !llvm.ptr {fir.bindc_name = "y"}) attributes {fir.internal_name = "_QPwsloop_private", frame_pointer = #llvm.framePointerKind<all>, target_cpu = "x86-64"} {
14 %0 = llvm.mlir.constant(1 : i64) : i64
15 %3 = llvm.alloca %0 x i32 {bindc_name = "i"} : (i64) -> !llvm.ptr
16 %6 = llvm.mlir.constant(1 : i32) : i32
17 %7 = llvm.mlir.constant(10 : i32) : i32
18 %8 = llvm.mlir.constant(0 : i32) : i32
19 %cond = llvm.mlir.constant(0 : i1) : i1
20 llvm.cond_br %cond, ^bb1, ^bb2
29 omp.wsloop private(@_QFwsloop_privateEi_private_ref_i32 %3 -> %arg2 : !llvm.ptr) {
30 omp.loop_nest (%arg4) : i32 = (%8) to (%7) inclusive step (%6) {
37 // CHECK: %[[INT:.*]] = alloca i32, i64 1, align 4
38 // CHECK: br label %[[LATE_ALLOC_BB:.*]]
40 // CHECK: [[LATE_ALLOC_BB]]:
41 // CHECK: br label %[[AFTER_ALLOC_BB:.*]]
43 // CHECK: [[AFTER_ALLOC_BB]]:
44 // CHECK: br i1 false, label %[[BB1:.*]], label %5[[BB2:.*]]
47 // CHECK: br label %[[BB3:.*]]
50 // CHECK: br label %[[BB3:.*]]
53 // CHECK: br label %omp_loop.preheader