aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
diff options
context:
space:
mode:
authorWang, Xin10 <xin10.wang@intel.com>2023-06-28 23:23:06 -0400
committerWang, Xin10 <xin10.wang@intel.com>2023-06-28 23:26:09 -0400
commitc78acc92759cda8fc6ecb2690df39c7ee65355bf (patch)
treeeaa2cf1381d25095f8d5c0def60371f73e2db047 /llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
parent42cb3c6346fcd2799060189e399a5b494687f40b (diff)
downloadllvm-c78acc92759cda8fc6ecb2690df39c7ee65355bf.zip
llvm-c78acc92759cda8fc6ecb2690df39c7ee65355bf.tar.gz
llvm-c78acc92759cda8fc6ecb2690df39c7ee65355bf.tar.bz2
[NFC]Fix possibly derefer nullptr in ComplexDeinterleavingPass.cpp
Fix static analyzer reports issue, add assert to avoid analyzer report. Reviewed By: igor.kirillov Differential Revision: https://reviews.llvm.org/D153942
Diffstat (limited to 'llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp')
-rw-r--r--llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
index 08f2867..2464eba 100644
--- a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
+++ b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
@@ -1046,7 +1046,7 @@ ComplexDeinterleavingGraph::identifyReassocNodes(Instruction *Real,
if (!FinalNode)
return nullptr;
}
-
+ assert(FinalNode && "FinalNode can not be nullptr here");
// Set the Real and Imag fields of the final node and submit it
FinalNode->Real = Real;
FinalNode->Imag = Imag;