diff options
author | Duraid Madina <duraid@octopus.com.au> | 2005-11-02 02:35:04 +0000 |
---|---|---|
committer | Duraid Madina <duraid@octopus.com.au> | 2005-11-02 02:35:04 +0000 |
commit | 93856802ae9f5a26aaeb565cb856aa16bd95b62d (patch) | |
tree | 799beed6e7575f547fe975f5705a5cc6bc4ed83f /lib/Target | |
parent | 7c22575e3292a80b42ec6189d618976a464f7406 (diff) | |
download | external_llvm-93856802ae9f5a26aaeb565cb856aa16bd95b62d.zip external_llvm-93856802ae9f5a26aaeb565cb856aa16bd95b62d.tar.gz external_llvm-93856802ae9f5a26aaeb565cb856aa16bd95b62d.tar.bz2 |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/IA64/IA64ISelDAGToDAG.cpp | 8 | ||||
-rw-r--r-- | lib/Target/IA64/IA64ISelLowering.cpp | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/Target/IA64/IA64ISelDAGToDAG.cpp b/lib/Target/IA64/IA64ISelDAGToDAG.cpp index 1a83d89..d3487f2 100644 --- a/lib/Target/IA64/IA64ISelDAGToDAG.cpp +++ b/lib/Target/IA64/IA64ISelDAGToDAG.cpp @@ -321,6 +321,14 @@ SDOperand IA64DAGToDAGISel::Select(SDOperand Op) { /* todo: * 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 int FI = cast<FrameIndexSDNode>(N)->getIndex(); diff --git a/lib/Target/IA64/IA64ISelLowering.cpp b/lib/Target/IA64/IA64ISelLowering.cpp index 2ffa24e..37f15ee 100644 --- a/lib/Target/IA64/IA64ISelLowering.cpp +++ b/lib/Target/IA64/IA64ISelLowering.cpp @@ -80,9 +80,6 @@ IA64TargetLowering::IA64TargetLowering(TargetMachine &TM) addLegalFPImmediate(+0.0); addLegalFPImmediate(+1.0); - addLegalFPImmediate(-0.0); - addLegalFPImmediate(-1.0); - } /// isFloatingPointZero - Return true if this is 0.0 or -0.0. |