Really silence compiler warnings.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 14 May 2008 20:29:30 +0000 (20:29 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 14 May 2008 20:29:30 +0000 (20:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51126 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 3cc815283bf655a95d1dde8aafdf756b8173046d..4998613fc928d311dcde4f2e9381fa02d3a66450 100644 (file)
@@ -807,8 +807,8 @@ static SDOperand getCopyFromParts(SelectionDAG &DAG,
       unsigned NumRegs =
         TLI.getVectorTypeBreakdown(ValueVT, IntermediateVT, NumIntermediates,
                                    RegisterVT);
-      NumRegs; // Silence a compiler warning.
       assert(NumRegs == NumParts && "Part count doesn't match vector breakdown!");
+      NumParts = NumRegs; // Silence a compiler warning.
       assert(RegisterVT == PartVT && "Part type doesn't match vector breakdown!");
       assert(RegisterVT == Parts[0].getValueType() &&
              "Part type doesn't match part!");
@@ -1024,10 +1024,10 @@ static void getCopyToParts(SelectionDAG &DAG,
     DAG.getTargetLoweringInfo()
       .getVectorTypeBreakdown(ValueVT, IntermediateVT, NumIntermediates,
                               RegisterVT);
-  NumRegs; // Silence a compiler warning.
   unsigned NumElements = MVT::getVectorNumElements(ValueVT);
 
   assert(NumRegs == NumParts && "Part count doesn't match vector breakdown!");
+  NumParts = NumRegs; // Silence a compiler warning.
   assert(RegisterVT == PartVT && "Part type doesn't match vector breakdown!");
 
   // Split the vector into intermediate operands.