diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2019-11-12 15:35:16 +0300 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2019-11-13 22:57:55 +0300 |
| commit | 63bbbcde9f623fd54c80e9768dc25b77bccf5f7d (patch) | |
| tree | 7db34dc353c691d3f1f052481abab078ace69d67 /llvm/lib | |
| parent | 14d316228515f54f1136d950094edfdff978cd50 (diff) | |
| download | bcm5719-llvm-63bbbcde9f623fd54c80e9768dc25b77bccf5f7d.tar.gz bcm5719-llvm-63bbbcde9f623fd54c80e9768dc25b77bccf5f7d.zip | |
[mips] Reduce number of nested `if` statements. NFC
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
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, |

