[PATCH] D146791: Guard against dereferencing a nullptr
Akshay Khadse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 01:42:56 PDT 2023
akshaykhadse created this revision.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, jvesely, arsenm.
Herald added a project: All.
akshaykhadse requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146791
Files:
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
Index: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -1350,6 +1350,7 @@
TII->getNamedOperand(MI, AMDGPU::OpName::vdata)->getReg();
if (FuncInfo->allocateVGPRSpillToAGPR(MF, FI,
TRI->isAGPR(MRI, VReg))) {
+ assert(RS != nullptr);
// FIXME: change to enterBasicBlockEnd()
RS->enterBasicBlock(MBB);
TRI->eliminateFrameIndex(MI, 0, FIOp, RS);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146791.507996.patch
Type: text/x-patch
Size: 624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/8fb555c9/attachment.bin>
More information about the llvm-commits
mailing list