[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
Tue Apr 4 14:57:33 PDT 2023


doru1004 marked an inline comment as done.
doru1004 added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:3355
+        llvm::GlobalValue::InternalLinkage,
+        CGM.getTriple().isAMDGCN() ? llvm::UndefValue::get(VarTy)
+                                   : llvm::Constant::getNullValue(VarTy),
----------------
nlopes wrote:
> Please use poison instead of undef wherever possible as we are tying to remove undef. The replacement is usually safe when you just need a placeholder.
> Thank you!
I've made the change as requested, this also means that I had to add another check in `AMDGPUAsmPrinter.cpp`.


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