[llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Jul 23 10:19:02 PDT 2003


Changes in directory llvm/lib/CodeGen/InstrSelection:

InstrSelectionSupport.cpp updated: 1.53 -> 1.54

---
Log message:

Remove unnecessary casts


---
Diffs of the changes:

Index: llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
diff -u llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.53 llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.54
--- llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.53	Wed Jul 23 09:55:59 2003
+++ llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp	Wed Jul 23 10:17:51 2003
@@ -103,12 +103,12 @@
   if (isa<PointerType>(CPV->getType()))
     intValue = 0;                       // We checked above that it is NULL 
   else if (ConstantBool* CB = dyn_cast<ConstantBool>(CPV))
-    intValue = (int64_t) CB->getValue();
+    intValue = CB->getValue();
   else if (CPV->getType()->isSigned())
     intValue = cast<ConstantSInt>(CPV)->getValue();
   else
     { // get the int value and sign-extend if original was less than 64 bits
-      intValue = (int64_t) cast<ConstantUInt>(CPV)->getValue();
+      intValue = cast<ConstantUInt>(CPV)->getValue();
       switch(CPV->getType()->getPrimitiveID())
         {
         case Type::UByteTyID:  intValue = (int64_t) (int8_t) intValue; break;





More information about the llvm-commits mailing list