[llvm-commits] [llvm] r124869 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp

David Greene greened at obbligato.org
Fri Feb 4 09:01:53 PST 2011


Author: greened
Date: Fri Feb  4 11:01:53 2011
New Revision: 124869

URL: http://llvm.org/viewvc/llvm-project?rev=124869&view=rev
Log:

Silence uninitialized value warnings.

Modified:
    llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp

Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=124869&r1=124868&r2=124869&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Fri Feb  4 11:01:53 2011
@@ -383,7 +383,7 @@
 
   // Okay, find the smallest type from the current set and remove it from the
   // largest set.
-  MVT::SimpleValueType SmallestInt;
+  MVT::SimpleValueType SmallestInt = MVT::LAST_VALUETYPE;
   for (unsigned i = 0, e = TypeVec.size(); i != e; ++i)
     if (isInteger(TypeVec[i])) {
       SmallestInt = TypeVec[i];
@@ -393,7 +393,7 @@
     if (isInteger(TypeVec[i]) && TypeVec[i] < SmallestInt)
       SmallestInt = TypeVec[i];
 
-  MVT::SimpleValueType SmallestFP;
+  MVT::SimpleValueType SmallestFP = MVT::LAST_VALUETYPE;
   for (unsigned i = 0, e = TypeVec.size(); i != e; ++i)
     if (isFloatingPoint(TypeVec[i])) {
       SmallestFP = TypeVec[i];
@@ -439,7 +439,7 @@
 
   // Okay, find the largest type in the Other set and remove it from the
   // current set.
-  MVT::SimpleValueType LargestInt = Other.TypeVec[0];
+  MVT::SimpleValueType LargestInt = MVT::Other;
   for (unsigned i = 0, e = Other.TypeVec.size(); i != e; ++i)
     if (isInteger(Other.TypeVec[i])) {
       LargestInt = Other.TypeVec[i];
@@ -449,7 +449,7 @@
     if (isInteger(Other.TypeVec[i]) && Other.TypeVec[i] > LargestInt)
       LargestInt = Other.TypeVec[i];
 
-  MVT::SimpleValueType LargestFP;
+  MVT::SimpleValueType LargestFP = MVT::Other;
   for (unsigned i = 0, e = Other.TypeVec.size(); i != e; ++i)
     if (isFloatingPoint(Other.TypeVec[i])) {
       LargestFP = Other.TypeVec[i];





More information about the llvm-commits mailing list