[llvm] r360037 - X86DAGToDAGISel::tryVPTESTM - fix uninitialized variable warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon May 6 04:52:16 PDT 2019
Author: rksimon
Date: Mon May 6 04:52:16 2019
New Revision: 360037
URL: http://llvm.org/viewvc/llvm-project?rev=360037&view=rev
Log:
X86DAGToDAGISel::tryVPTESTM - fix uninitialized variable warning. NFCI.
findBroadcastedOp should always initialize the value if it returns true but static-analyzer isn't great at recognising this.
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=360037&r1=360036&r2=360037&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon May 6 04:52:16 2019
@@ -3730,7 +3730,7 @@ bool X86DAGToDAGISel::tryVPTESTM(SDNode
bool FoldedBCast = false;
if (!FoldedLoad && CanFoldLoads &&
(CmpSVT == MVT::i32 || CmpSVT == MVT::i64)) {
- SDNode *ParentNode;
+ SDNode *ParentNode = nullptr;
if ((Load = findBroadcastedOp(Src1, CmpSVT, ParentNode))) {
FoldedBCast = tryFoldLoad(Root, ParentNode, Load, Tmp0,
Tmp1, Tmp2, Tmp3, Tmp4);
More information about the llvm-commits
mailing list