[llvm-bugs] [Bug 52010] New: Wrong number of dependencies when using OpenMP iterator()
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 29 04:02:56 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52010
Bug ID: 52010
Summary: Wrong number of dependencies when using OpenMP
iterator()
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: OpenMP
Assignee: unassignedclangbugs at nondot.org
Reporter: rpenacob at bsc.es
CC: llvm-bugs at lists.llvm.org, rofirrim at gmail.com
In the following test case kmp_depend_info array size and the number of
dependencies passed to __kmpc_omp_task_with_deps is wrongly computed.
// t1.c
int x[100];
int y[100];
void foo() {
#pragma omp task depend(iterator(j=0:5), in: x[j], y[j])
{
}
}
void bar() {
#pragma omp task depend(iterator(j=0:5), in: x[j]) depend(iterator(j=0:5),
in: y[j])
{
}
}
Looking at the IR code with : clang -fopenmp -S -emit-llvm t1.c
; Size 5, but it is 5*2 = 10
define dso_local void @foo() #0 {
...
%vla = alloca %struct.kmp_depend_info, i64 5, align 16
%28 = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @1, i32 %0, i8*
%1, i32 5, i8* %27, i32 0, i8* null)
}
; Size 25, but it is 10
define dso_local void @bar() #0 {
...
%vla = alloca %struct.kmp_depend_info, i64 25, align 16
%32 = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @1, i32 %0, i8*
%1, i32 25, i8* %31, i32 0, i8* null)
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210929/eb76ebb5/attachment.html>
More information about the llvm-bugs
mailing list