Fix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the

isel changes happened months ago.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31164 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-10-24 17:09:43 +00:00
parent d1300ab4f0
commit bacf9f4888

View File

@ -408,12 +408,16 @@ SDNode *IA64DAGToDAGISel::Select(SDOperand Op) {
case ISD::TargetConstantFP: {
SDOperand Chain = CurDAG->getEntryNode(); // this is a constant, so..
SDOperand V;
if (cast<ConstantFPSDNode>(N)->isExactlyValue(+0.0)) {
return CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64).Val;
V = CurDAG->getCopyFromReg(Chain, IA64::F0, MVT::f64);
} else if (cast<ConstantFPSDNode>(N)->isExactlyValue(+1.0)) {
return CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64).Val;
V = CurDAG->getCopyFromReg(Chain, IA64::F1, MVT::f64);
} else
assert(0 && "Unexpected FP constant!");
ReplaceUses(SDOperand(N, 0), V);
return 0;
}
case ISD::FrameIndex: { // TODO: reduce creepyness