aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-27 02:24:17 +0000
committerChris Lattner <sabre@nondot.org>2002-04-27 02:24:17 +0000
commit87e873bd3dda5e6319157c5f132af9e34385bc58 (patch)
tree053b2291cec3d970b83009afad83abbe8fb054b6
parentf270c1ba27c127f6bd78f046e74e371856fe81c6 (diff)
Simplify code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2322 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/SparcV9RegInfo.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp
index d849ce23be..ad66a3482c 100644
--- a/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -262,16 +262,15 @@ int UltraSparcRegInfo::getRegType(const Value *Val) const {
switch (getRegClassIDOfValue(Val)) {
case IntRegClassID: return IntRegType;
- case FloatRegClassID:
- Typ = Val->getType()->getPrimitiveID();
- if (Typ == Type::FloatTyID)
+ case FloatRegClassID:
+ if (Val->getType() == Type::FloatTy)
return FPSingleRegType;
- else if (Typ == Type::DoubleTyID)
+ else if (Val->getType() == Type::DoubleTy)
return FPDoubleRegType;
assert(0 && "Unknown type in FloatRegClass");
- case IntCCRegClassID: return IntCCRegType;
- case FloatCCRegClassID: return FloatCCRegType ;
+ case IntCCRegClassID: return IntCCRegType;
+ case FloatCCRegClassID: return FloatCCRegType;
default: assert(0 && "Unknown reg class ID");
return 0;
}