[PATCH] D123522: [NVPTX][FIX] Allow __nvvm_reflect in the presence of opaque pointers

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 11:14:55 PDT 2022


jdoerfert added inline comments.


================
Comment at: llvm/lib/Target/NVPTX/NVVMReflect.cpp:139
+    if (auto *CE = dyn_cast<ConstantExpr>(Str))
+      Str = CE->getOperand(0);
+    assert(isa<Constant>(Str) &&
----------------
nikic wrote:
> Stripping an arbitrary constant expression looks a bit dubious -- shouldn't this be doing `Str->stripPointerCasts()`?
I basically kept the original code (which didn't check and therefore worked for the GEP and AS cast case).
Will make it strip pointer cast though. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123522



More information about the llvm-commits mailing list