[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 6 09:08:11 PDT 2023


doru1004 added inline comments.


================
Comment at: clang/test/OpenMP/target_team_variable_codegen.cpp:33
+//.
+// CHECK-NVIDIA: @local_a = internal addrspace(3) global [10 x i32] zeroinitializer, align 4
+//.
----------------
jhuber6 wrote:
> jdoerfert wrote:
> > doru1004 wrote:
> > > jhuber6 wrote:
> > > > Shouldn't the Nvidia version also be undefined? Not sure why this should vary depending on the target.
> > > Perhaps NVIDIA code path can tolerate a zeroinitializer? I don't want to change it if it's not needed. I am basing this check on the code path for AMD GPUs and the initial bug that was reported.
> > for AS 3 we should make it always poison.
> We should probably change this in `HeadToShared` in `OpenMPOpt` as well.
Happy to remove the guard and have it always use poison for both NVIDIA and AMD.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147572/new/

https://reviews.llvm.org/D147572



More information about the cfe-commits mailing list