[llvm] r333754 - [NFC] Zero initialize local variables

Hiroshi Inoue via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 07:23:15 PDT 2018


Author: inouehrs
Date: Fri Jun  1 07:23:15 2018
New Revision: 333754

URL: http://llvm.org/viewvc/llvm-project?rev=333754&view=rev
Log:
[NFC] Zero initialize local variables

This patch makes local variables zero initialized to avoid broken values in debug output.


Modified:
    llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=333754&r1=333753&r2=333754&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Fri Jun  1 07:23:15 2018
@@ -2253,7 +2253,7 @@ public:
     // set of bit groups, and then mask in the zeros at the end. With early
     // masking, we only insert the non-zero parts of the result at every step.
 
-    unsigned InstCnt, InstCntLateMask;
+    unsigned InstCnt = 0, InstCntLateMask = 0;
     LLVM_DEBUG(dbgs() << "\tEarly masking:\n");
     SDNode *RN = Select(N, false, &InstCnt);
     LLVM_DEBUG(dbgs() << "\t\tisel would use " << InstCnt << " instructions\n");




More information about the llvm-commits mailing list