[PATCH] D109458: [NVPTX] Simplify and generalize constant printer.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 8 13:07:53 PDT 2021
tra added inline comments.
================
Comment at: llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1762-1764
+ std::array<unsigned char, 16> Buf;
+ size_t NumBytes = (Val.getBitWidth() + 7) / 8;
+ assert(NumBytes <= Buf.size() && "value is too large.");
----------------
jlebar wrote:
> Any reason we have this restriction on 16 bytes long? Like, it'll work for i128 but fail for i256, right?
>
> Could we use InlinedVector instead of a fixed std::array?
InlinedVector is an absl thing and is not available in LLVM.
Updated to use SmallVector instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109458/new/
https://reviews.llvm.org/D109458
More information about the llvm-commits
mailing list