[PATCH] D127504: [NVPTX] Use the mask() operator to initialize packed structs with pointers

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 08:27:23 PDT 2022


ikudrin created this revision.
ikudrin added reviewers: mlukyanov, jholewinski, tra.
ikudrin added a project: LLVM.
Herald added subscribers: mattd, gchakrabarti, hiraditya.
Herald added a project: All.
ikudrin requested review of this revision.

The current implementation assumes that all pointers used in the initialization of an aggregate are aligned according to the pointer size of the target; that might not be so if the object is packed. In the latter case, an array of `.u8` should be used as the initializer, and pointers should be decorated with the mask() operator. That requires PTX ISA 7.1 because the mask() operator was added in that version.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127504

Files:
  llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
  llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
  llvm/lib/Target/NVPTX/NVPTXSubtarget.h
  llvm/test/CodeGen/NVPTX/packed-aggr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127504.435920.patch
Type: text/x-patch
Size: 12047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220610/cd9bd95e/attachment.bin>


More information about the llvm-commits mailing list