From: Chris Lattner Date: Sat, 27 Apr 2002 02:24:17 +0000 (+0000) Subject: Simplify code a bit X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=87e873bd3dda5e6319157c5f132af9e34385bc58;p=oota-llvm.git Simplify code a bit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2322 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp index d849ce23be7..ad66a3482cd 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; }