forked from OSchip/llvm-project
add support for loading FP constants +0.0 and +1.0 to the dag isel,
stop pretending -0.0 and -1.0 are machine constants llvm-svn: 24146
This commit is contained in:
parent
17df608719
commit
9abf1650ed
|
@ -321,6 +321,14 @@ SDOperand IA64DAGToDAGISel::Select(SDOperand Op) {
|
||||||
/* todo:
|
/* todo:
|
||||||
* case ISD::DYNAMIC_STACKALLOC:
|
* case ISD::DYNAMIC_STACKALLOC:
|
||||||
*/
|
*/
|
||||||
|
case ISD::ConstantFP: {
|
||||||
|
if (cast<ConstantFPSDNode>(N)->isExactlyValue(+0.0))
|
||||||
|
return CurDAG->getRegister(IA64::F0, MVT::f64); // load 0.0
|
||||||
|
else if (cast<ConstantFPSDNode>(N)->isExactlyValue(+1.0))
|
||||||
|
return CurDAG->getRegister(IA64::F1, MVT::f64); // load 1.0
|
||||||
|
else
|
||||||
|
assert(0 && "Unexpected FP constant!");
|
||||||
|
}
|
||||||
|
|
||||||
case ISD::FrameIndex: { // TODO: reduce creepyness
|
case ISD::FrameIndex: { // TODO: reduce creepyness
|
||||||
int FI = cast<FrameIndexSDNode>(N)->getIndex();
|
int FI = cast<FrameIndexSDNode>(N)->getIndex();
|
||||||
|
|
|
@ -80,9 +80,6 @@ IA64TargetLowering::IA64TargetLowering(TargetMachine &TM)
|
||||||
|
|
||||||
addLegalFPImmediate(+0.0);
|
addLegalFPImmediate(+0.0);
|
||||||
addLegalFPImmediate(+1.0);
|
addLegalFPImmediate(+1.0);
|
||||||
addLegalFPImmediate(-0.0);
|
|
||||||
addLegalFPImmediate(-1.0);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isFloatingPointZero - Return true if this is 0.0 or -0.0.
|
/// isFloatingPointZero - Return true if this is 0.0 or -0.0.
|
||||||
|
|
Loading…
Reference in New Issue