[llvm-branch-commits] [flang] [flang][OpenMP] Support lowering of metadirective (part 2) (PR #194424)
Abid Qadeer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 26 02:25:56 PDT 2026
================
@@ -70,3 +74,250 @@ subroutine test_begin_condition_false()
x = 1
!$omp end metadirective
end subroutine
+
+!===----------------------------------------------------------------------===!
+! Dynamic (runtime) user conditions
+!===----------------------------------------------------------------------===!
+
+! CHECK-LABEL: func.func @_QPtest_dynamic_condition(
+! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.logical<4>>
+! CHECK: %[[DECL:.*]]:2 = hlfir.declare %[[ARG0]]
+! CHECK: %[[LOAD:.*]] = fir.load %[[DECL]]#0
+! CHECK: %[[COND:.*]] = fir.convert %[[LOAD]] : (!fir.logical<4>) -> i1
+! CHECK: fir.if %[[COND]] {
+! CHECK: omp.barrier
+! CHECK: } else {
+! CHECK: }
----------------
abidh wrote:
```suggestion
! CHECK-NEXT: }
```
https://github.com/llvm/llvm-project/pull/194424
More information about the llvm-branch-commits
mailing list