[llvm] Fix i1 array global crash in NVPTXAsmPrinter. (PR #92506)
Johannes Reifferscheid via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 00:21:38 PDT 2024
================
@@ -1847,9 +1847,13 @@ void NVPTXAsmPrinter::bufferLEByte(const Constant *CPV, int Bytes,
auto AddIntToBuffer = [AggBuffer, Bytes](const APInt &Val) {
size_t NumBytes = (Val.getBitWidth() + 7) / 8;
SmallVector<unsigned char, 16> Buf(NumBytes);
- for (unsigned I = 0; I < NumBytes; ++I) {
+ for (unsigned I = 0; I < NumBytes - 1; ++I) {
----------------
jreiffers wrote:
Sounds good. Sent a follow-up.
https://github.com/llvm/llvm-project/pull/92506
More information about the llvm-commits
mailing list