[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > This fails for me on the host and the AMD GPU: GPU: > > ``` > # | :217:1: note: possible intended match here > # | dat.datum[dat.arr[0][0]] = 5 > ``` > > X86: > > ``` > # | :134:1: note: possible intended match here > # | dat.datum[dat.arr[0][0]] = 5461 > ``` > > The location

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-21 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: This fails for me on the host and the AMD GPU: GPU: # | :217:1: note: possible intended match here # | dat.datum[dat.arr[0][0]] = 5 X86: # | :134:1: note: possible intended match here # | dat.datum[dat.arr[0][0]] = 5461 The location that is printed (datum[1]) is uninitialized.

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-19 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: > The newly added test `offloading/struct_mapping_with_pointers.cpp` fails on > NVIDIA GPUs as well. > > ``` > TEST 'libomptarget :: nvptx64-nvidia-cuda :: > offloading/struct_mapping_with_pointers.cpp' FAILED > Exit Code: 1 > > Comman

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-18 Thread Shilei Tian via cfe-commits
shiltian wrote: The newly added test `offloading/struct_mapping_with_pointers.cpp` fails on NVIDIA GPUs as well. ``` TEST 'libomptarget :: nvptx64-nvidia-cuda :: offloading/struct_mapping_with_pointers.cpp' FAILED Exit Code: 1 Command Output (stdout):

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
doru1004 wrote: @alexey-bataev I have reworked the previous patch with your advice in mind. The emitCombinedEntry function was not changed since eliminating the combined entry has many ramifications which would need to be handled in a separate patch. For now this fixes the immediate error in a

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/75642 >From 32454489d4e77f22ab935827dffe0febbb7b0626 Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 15 Dec 2023 10:22:38 -0500 Subject: [PATCH] Fix mapping of structs to device. --- clang/lib/CodeGen/CGOpenMP

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/75642 >From e0e1f5e7bb2f95f2568b5dd647b883f4740bcafd Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 15 Dec 2023 10:22:38 -0500 Subject: [PATCH] Fix mapping of structs to device. --- clang/lib/CodeGen/CGOpenMP

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/75642 >From ae6cf04a149f00f52c1da8e7b9c1ca3af5393f99 Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Fri, 15 Dec 2023 10:22:38 -0500 Subject: [PATCH] Fix mapping of structs to device. --- clang/lib/CodeGen/CGOpenMP

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gheorghe-Teodor Bercea (doru1004) Changes Fix mapping of structs to device. The following example fails: ``` #include #include struct Descriptor { int *datum; long int x; int xi; long int arr[1][30]; }; int

[clang] [openmp] [Clang][OpenMP] Fix mapping of structs to device (PR #75642)

2023-12-15 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 created https://github.com/llvm/llvm-project/pull/75642 Fix mapping of structs to device. The following example fails: ``` #include #include struct Descriptor { int *datum; long int x; int xi; long int arr[1][30]; }; int main() { Descriptor dat = Descr