diff options
author | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-10-07 19:43:31 +0000 |
---|---|---|
committer | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-10-07 19:43:31 +0000 |
commit | 6ae1b35cda70ef89ad8e9f63d19405d1a4d9baa8 (patch) | |
tree | 15b40d4a49075acf48af8cf57c872ad61607cc76 /llvm/lib/Target/Mips/MipsFastISel.cpp | |
parent | 2a7b00e1667ce72d20dcd5fe83a7f124e57be0ee (diff) | |
download | llvm-6ae1b35cda70ef89ad8e9f63d19405d1a4d9baa8.zip llvm-6ae1b35cda70ef89ad8e9f63d19405d1a4d9baa8.tar.gz llvm-6ae1b35cda70ef89ad8e9f63d19405d1a4d9baa8.tar.bz2 |
[mips][FastISel] Use ternary operator to select opcode. NFC
llvm-svn: 249594
Diffstat (limited to 'llvm/lib/Target/Mips/MipsFastISel.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsFastISel.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Target/Mips/MipsFastISel.cpp b/llvm/lib/Target/Mips/MipsFastISel.cpp index da7b173..ca6fbdb 100644 --- a/llvm/lib/Target/Mips/MipsFastISel.cpp +++ b/llvm/lib/Target/Mips/MipsFastISel.cpp @@ -1060,22 +1060,16 @@ bool MipsFastISel::selectFPToInt(const Instruction *I, bool IsSigned) { // entirely within FPRs. unsigned DestReg = createResultReg(&Mips::GPR32RegClass); unsigned TempReg = createResultReg(&Mips::FGR32RegClass); - unsigned Opc; - - if (SrcVT == MVT::f32) - Opc = Mips::TRUNC_W_S; - else - Opc = Mips::TRUNC_W_D32; + unsigned Opc = (SrcVT == MVT::f32) ? Mips::TRUNC_W_S : Mips::TRUNC_W_D32; // Generate the convert. emitInst(Opc, TempReg).addReg(SrcReg); - emitInst(Mips::MFC1, DestReg).addReg(TempReg); updateValueMap(I, DestReg); return true; } -// + bool MipsFastISel::processCallArgs(CallLoweringInfo &CLI, SmallVectorImpl<MVT> &OutVTs, unsigned &NumBytes) { |