[llvm] Explain partial byte extraction logic. (PR #92868)

Johannes Reifferscheid via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 23:20:10 PDT 2024


================
@@ -1851,6 +1851,9 @@ 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);
+    // `extractBitsAsZExtValue` does not allow the extraction of bits beyond the
+    // input's bit width. We handle the last byte separately, so we never
----------------
jreiffers wrote:

Done. Sorry for the delay.

https://github.com/llvm/llvm-project/pull/92868


More information about the llvm-commits mailing list