// RUN: tco -test-gen %s | FileCheck %s // Test the real FIR-to-LLVM pipeline. In particular, this guards against // adding a FIR-level CSE-like pass between fir-rematerialize-box-ops and // FIR-to-LLVM lowering, which could merge FIR box operations across OpenMP // regions before their descriptor allocas are materialized. func.func private @use_box(!fir.box>) func.func @box_used_in_sibling_tasks(%arg0: !fir.ref>, %n: index) { %shape = fir.shape %n : (index) -> !fir.shape<1> %box = fir.embox %arg0(%shape) : (!fir.ref>, !fir.shape<1>) -> !fir.box> omp.task { fir.call @use_box(%box) : (!fir.box>) -> () omp.terminator } omp.task { fir.call @use_box(%box) : (!fir.box>) -> () omp.terminator } return } // CHECK-LABEL: llvm.func @box_used_in_sibling_tasks( // CHECK: omp.task { // CHECK: llvm.alloca // CHECK: llvm.call @use_box // CHECK: omp.terminator // CHECK: omp.task { // CHECK: llvm.alloca // CHECK: llvm.call @use_box // CHECK: omp.terminator