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

@ -263,10 +263,9 @@ int UltraSparcRegInfo::getRegType(const Value *Val) const {
switch (getRegClassIDOfValue(Val)) {
case IntRegClassID: return IntRegType;
case FloatRegClassID:
Typ = Val->getType()->getPrimitiveID();
if (Typ == Type::FloatTyID)
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");