[llvm] r365018 - Fix uninitialized variable warnings. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 03:22:08 PDT 2019


Author: rksimon
Date: Wed Jul  3 03:22:08 2019
New Revision: 365018

URL: http://llvm.org/viewvc/llvm-project?rev=365018&view=rev
Log:
Fix uninitialized variable warnings. NFCI.

Both MSVC and cppcheck don't like the fact that the variables are initialized via references.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=365018&r1=365017&r2=365018&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul  3 03:22:08 2019
@@ -13235,7 +13235,7 @@ static SDValue lowerV8I16GeneralSingleIn
     // a half by taking the sum of the half with three inputs and subtracting
     // the sum of the actual three inputs. The difference is the remaining
     // slot.
-    int ADWord, BDWord;
+    int ADWord = 0, BDWord = 0;
     int &TripleDWord = ThreeAInputs ? ADWord : BDWord;
     int &OneInputDWord = ThreeAInputs ? BDWord : ADWord;
     int TripleInputOffset = ThreeAInputs ? AOffset : BOffset;




More information about the llvm-commits mailing list