summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-08-05 20:15:19 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-08-05 20:15:19 +0000
commitef98dbe3de31d6a77ebdcbbf58d181e13f9a8eb3 (patch)
tree841bca15ac60ab8d7e2753104e728d7138746670
parent87cc2c2dce8e67882e1ba725537f3ee27a7f2082 (diff)
downloadbcm5719-llvm-ef98dbe3de31d6a77ebdcbbf58d181e13f9a8eb3.tar.gz
bcm5719-llvm-ef98dbe3de31d6a77ebdcbbf58d181e13f9a8eb3.zip
Remove redundand checks: the only way to have, e.g. f32 RegVT is exactly
hardfloat case. llvm-svn: 78237
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 252d920e6c2..155ef591f53 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -1461,21 +1461,17 @@ ARMTargetLowering::LowerFormalArguments(SDValue Chain,
} else {
TargetRegisterClass *RC;
- if (FloatABIType == FloatABI::Hard && RegVT == MVT::f32)
+ if (RegVT == MVT::f32)
RC = ARM::SPRRegisterClass;
- else if (FloatABIType == FloatABI::Hard && RegVT == MVT::f64)
+ else if (RegVT == MVT::f64)
RC = ARM::DPRRegisterClass;
- else if (FloatABIType == FloatABI::Hard && RegVT == MVT::v2f64)
+ else if (RegVT == MVT::v2f64)
RC = ARM::QPRRegisterClass;
- else if (AFI->isThumb1OnlyFunction())
- RC = ARM::tGPRRegisterClass;
+ else if (RegVT == MVT::i32)
+ RC = (AFI->isThumb1OnlyFunction() ?
+ ARM::tGPRRegisterClass : ARM::GPRRegisterClass);
else
- RC = ARM::GPRRegisterClass;
-
- assert((RegVT == MVT::i32 || RegVT == MVT::f32 ||
- (FloatABIType == FloatABI::Hard &&
- ((RegVT == MVT::f64) || (RegVT == MVT::v2f64)))) &&
- "RegVT not supported by FORMAL_ARGUMENTS Lowering");
+ llvm_unreachable("RegVT not supported by FORMAL_ARGUMENTS Lowering");
// Transform the arguments in physical registers into virtual ones.
unsigned Reg = MF.addLiveIn(VA.getLocReg(), RC);
OpenPOWER on IntegriCloud