[mips][FastISel] Use ternary operator to select opcode. NFC

llvm-svn: 249594
This commit is contained in:
Vasileios Kalintiris 2015-10-07 19:43:31 +00:00
parent 2a7b00e166
commit 6ae1b35cda
1 changed files with 2 additions and 8 deletions

View File

@ -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) {