From 63bbbcde9f623fd54c80e9768dc25b77bccf5f7d Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Tue, 12 Nov 2019 15:35:16 +0300 Subject: [mips] Reduce number of nested `if` statements. NFC --- llvm/lib/Target/Mips/MipsISelLowering.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp index eb460ca3797..56db378ae6d 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp @@ -111,14 +111,11 @@ static bool isShiftedMask(uint64_t I, uint64_t &Pos, uint64_t &Size) { MVT MipsTargetLowering::getRegisterTypeForCallingConv(LLVMContext &Context, CallingConv::ID CC, EVT VT) const { - if (VT.isVector()) { - if (Subtarget.isABI_O32()) { - return MVT::i32; - } else { - return (VT.getSizeInBits() == 32) ? MVT::i32 : MVT::i64; - } - } - return MipsTargetLowering::getRegisterType(Context, VT); + if (!VT.isVector()) + return getRegisterType(Context, VT); + + return Subtarget.isABI_O32() || VT.getSizeInBits() == 32 ? MVT::i32 + : MVT::i64; } unsigned MipsTargetLowering::getNumRegistersForCallingConv(LLVMContext &Context, -- cgit v1.2.3