[all-commits] [llvm/llvm-project] 32eed8: Reapply "[NVPTX] Use the mask() operator to initia...

Igor Kudrin via All-commits all-commits at lists.llvm.org
Mon Jul 18 09:57:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32eed8828e0c6b2efdd5b31fa3f18aef1c6c7d7b
      https://github.com/llvm/llvm-project/commit/32eed8828e0c6b2efdd5b31fa3f18aef1c6c7d7b
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
    M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
    M llvm/lib/Target/NVPTX/NVPTXSubtarget.h
    A llvm/test/CodeGen/NVPTX/packed-aggr.ll

  Log Message:
  -----------
  Reapply "[NVPTX] Use the mask() operator to initialize packed structs with pointers"

The original patch revealed an issue of reading incorrect values on BE hosts.
That is now changed to use `endian::read32le()` and `endian::read64le()`.

Original commit message:

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 that
case, an array of .u8 should be used and pointers should be decorated
with the mask() operator.

The operator was introduced in PTX ISA 7.1, so an error is issued if the
case is detected for an earlier version.

Differential Revision: https://reviews.llvm.org/D127504




More information about the All-commits mailing list