summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-07-23 15:17:51 +0000
committerChris Lattner <sabre@nondot.org>2003-07-23 15:17:51 +0000
commitc8bf87af3efe766440d0df259a038a0b6998e6e9 (patch)
treefec0cc8f90a77c9c2cf396474ac0a0db385daa36 /lib
parentbfcdf14d83bbe974f3a232e2247eae8b6a6923bc (diff)
downloadllvm-c8bf87af3efe766440d0df259a038a0b6998e6e9.tar.gz
llvm-c8bf87af3efe766440d0df259a038a0b6998e6e9.tar.bz2
llvm-c8bf87af3efe766440d0df259a038a0b6998e6e9.tar.xz
Remove unnecessary casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp4
-rw-r--r--lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
index 6c1c860d2c..22320130f4 100644
--- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
@@ -103,12 +103,12 @@ ChooseRegOrImmed(Value* val,
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;
diff --git a/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp b/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
index 6c1c860d2c..22320130f4 100644
--- a/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
@@ -103,12 +103,12 @@ ChooseRegOrImmed(Value* val,
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;