Skip to content

Commit b1a633b

Browse files
authored
[NFC][NVPTX] remove truncating c-style cast (#85889)
While a stack size large enough to cause this truncation to be a problem would certainly cause other issues and not produce a valid program anyway, this cast is triggering our Coverity static analysis. Removing it seems cleaner.
1 parent 09155ac commit b1a633b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ void NVPTXAsmPrinter::setAndEmitFunctionVirtualRegisters(
17191719

17201720
// Emit the Fake Stack Object
17211721
const MachineFrameInfo &MFI = MF.getFrameInfo();
1722-
int NumBytes = (int) MFI.getStackSize();
1722+
int64_t NumBytes = MFI.getStackSize();
17231723
if (NumBytes) {
17241724
O << "\t.local .align " << MFI.getMaxAlign().value() << " .b8 \t"
17251725
<< DEPOTNAME << getFunctionNumber() << "[" << NumBytes << "];\n";

0 commit comments

Comments
 (0)