[llvm-bugs] [Bug 47126] New: Wrong IR emitted for "target enter data" with dependences
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Aug 12 00:30:47 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47126
Bug ID: 47126
Summary: Wrong IR emitted for "target enter data" with
dependences
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: rofirrim at gmail.com
CC: llvm-bugs at lists.llvm.org
Hi all,
the following test is failing in x86-64
libomptarget :: offloading/target_depend_nowait.cpp
The following small reproducer seems to show the issue
// -- t.cpp
#include <omp.h>
#include <stdio.h>
#define N 1024
int A[N];
int main() {
#pragma omp target enter data map(to:A) depend(out:A[0])
}
// -- end of t.cpp
For reference this is the compilation line
clang++ \
-fopenmp \
-pthread \
-fno-experimental-isel \
-I /work/llvm-src/openmp/libomptarget/test \
-I
/work/llvm-build-debug/runtimes/runtimes-bins/openmp/libomptarget/../runtime/src
\
-fopenmp-targets=x86_64-pc-linux-gnu \
t.cpp \
-S -emit-llvm \
-o t.ll
The generated IR contains a memcpy with a source from null pointer.
%20 = getelementptr inbounds %struct..kmp_privates.t, %struct..kmp_privates.t*
%11, i32 0, i32 3
%21 = bitcast [1 x i8*]* %20 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %21, i8* align 8 null, i64 8,
i1 false) ; <-- bug?
Kind regards,
--
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/20200812/fe6c6aa1/attachment.html>
More information about the llvm-bugs
mailing list