From 87e873bd3dda5e6319157c5f132af9e34385bc58 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 27 Apr 2002 02:24:17 +0000 Subject: [PATCH] Simplify code a bit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2322 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SparcV9/SparcV9RegInfo.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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; } -- 2.34.1