Simplify code a bit
authorChris Lattner <sabre@nondot.org>
Sat, 27 Apr 2002 02:24:17 +0000 (02:24 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 27 Apr 2002 02:24:17 +0000 (02:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2322 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9RegInfo.cpp

index d849ce23be72865070927548dfc52a7a55d4b36f..ad66a3482cd2bc93f246cb127faea06aa8f16630 100644 (file)
@@ -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;
   }