forked from OSchip/llvm-project
[mips][FastISel] Use ternary operator to select opcode. NFC
llvm-svn: 249594
This commit is contained in:
parent
2a7b00e166
commit
6ae1b35cda
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue