OSDN Git Service

Fix a few old-GCC warnings. No functional change.
authorNadav Rotem <nrotem@apple.com>
Thu, 6 Sep 2012 11:13:55 +0000 (11:13 +0000)
committerNadav Rotem <nrotem@apple.com>
Thu, 6 Sep 2012 11:13:55 +0000 (11:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163309 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/ARM/ARMFastISel.cpp

index cbc7352..dcaa9ba 100644 (file)
@@ -2440,7 +2440,7 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
   if (N0 == N1) {
     // The sext(setcc()) => setcc() optimization relies on the appropriate
     // constant being emitted.
-    uint64_t EqVal;
+    uint64_t EqVal = 0;
     switch (getBooleanContents(N0.getValueType().isVector())) {
     case UndefinedBooleanContent:
     case ZeroOrOneBooleanContent:
index 9849cb5..045d904 100644 (file)
@@ -2642,7 +2642,7 @@ bool ARMFastISel::SelectShift(const Instruction *I,
   unsigned Reg1 = getRegForValue(Src1Value);
   if (Reg1 == 0) return false;
 
-  unsigned Reg2;
+  unsigned Reg2 = 0;
   if (Opc == ARM::MOVsr) {
     Reg2 = getRegForValue(Src2Value);
     if (Reg2 == 0) return false;