-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributemliropenmp
Description
The OpenMP single construct can contain a structured block. A structured block allows branches inside. Hence the correct modelling for this is AnyRegion
and not SizedRegion<1>
.
So code like the following which will create multiple blocks is allowed. Currently a verification failure happens while converting to LLVM, since the LLVM dialect representation will contain multiple blocks for this.
subroutine fun_real(c)
real::psum
logical:: c
!$OMP SINGLE
if(c) then
call myfunc(psum)
end if
!$OMP END SINGLE
end subroutine
Current Error
error: loc("./tmp2.f90":1:1): 'omp.single' op region #0 ('region') failed to verify constraint: region with 1 blocks
error: Lowering to LLVM IR failed
error: loc("./tmp2.f90":1:1): cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: func.func
Metadata
Metadata
Assignees
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributemliropenmp
Type
Projects
Status
Done