Handle (i32,i32) => f64 in a cleaner way. Patch by Sasa Stankovic

llvm-svn: 123763
This commit is contained in:
Bruno Cardoso Lopes 2011-01-18 19:38:25 +00:00
parent c4e411ffc0
commit ac517fa9f7
1 changed files with 2 additions and 3 deletions

View File

@ -1276,9 +1276,8 @@ MipsTargetLowering::LowerFormalArguments(SDValue Chain,
unsigned Reg2 = AddLiveIn(DAG.getMachineFunction(),
VA.getLocReg()+1, RC);
SDValue ArgValue2 = DAG.getCopyFromReg(Chain, dl, Reg2, RegVT);
SDValue Hi = DAG.getNode(ISD::BITCAST, dl, MVT::f32, ArgValue);
SDValue Lo = DAG.getNode(ISD::BITCAST, dl, MVT::f32, ArgValue2);
ArgValue = DAG.getNode(ISD::BUILD_PAIR, dl, MVT::f64, Lo, Hi);
SDValue Pair = DAG.getNode(ISD::BUILD_PAIR, dl, MVT::i64, ArgValue2, ArgValue);
ArgValue = DAG.getNode(ISD::BITCAST, dl, MVT::f64, Pair);
}
}