Simplify code a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2322 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-04-27 02:24:17 +00:00
parent f270c1ba27
commit 87e873bd3d

View File

@ -262,16 +262,15 @@ int UltraSparcRegInfo::getRegType(const Value *Val) const {
switch (getRegClassIDOfValue(Val)) { switch (getRegClassIDOfValue(Val)) {
case IntRegClassID: return IntRegType; case IntRegClassID: return IntRegType;
case FloatRegClassID: case FloatRegClassID:
Typ = Val->getType()->getPrimitiveID(); if (Val->getType() == Type::FloatTy)
if (Typ == Type::FloatTyID)
return FPSingleRegType; return FPSingleRegType;
else if (Typ == Type::DoubleTyID) else if (Val->getType() == Type::DoubleTy)
return FPDoubleRegType; return FPDoubleRegType;
assert(0 && "Unknown type in FloatRegClass"); assert(0 && "Unknown type in FloatRegClass");
case IntCCRegClassID: return IntCCRegType; case IntCCRegClassID: return IntCCRegType;
case FloatCCRegClassID: return FloatCCRegType ; case FloatCCRegClassID: return FloatCCRegType;
default: assert(0 && "Unknown reg class ID"); default: assert(0 && "Unknown reg class ID");
return 0; return 0;
} }