This allows handling i128 values and fixes
https://bugs.llvm.org/show_bug.cgi?id=51789.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Is it a pain to add a test? I know the reproducer from the bug still crashes llvm, not sure if it's hard to reproduce the i128 issue independently.
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | ||
---|---|---|
1763–1765 | 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? |
Use SmallVector
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | ||
---|---|---|
1763–1765 | InlinedVector is an absl thing and is not available in LLVM. |
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | ||
---|---|---|
1756–1758 | This (and the original code) looks suspicious. Why would we allow filling in more bytes than we were told to by the caller? Or it was a typo and the code should've read if (s > Bytes) s = Bytes essentially only filling up to Bytes, but no more. |
This (and the original code) looks suspicious. Why would we allow filling in more bytes than we were told to by the caller?
I think this should've been an assert(AllocSize <= Bytes); addZeroes(Bytes);
Or it was a typo and the code should've read if (s > Bytes) s = Bytes essentially only filling up to Bytes, but no more.