diff options
author | Dale Johannesen <dalej@apple.com> | 2007-08-31 04:03:46 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-08-31 04:03:46 +0000 |
commit | eaf089430e7681fcddc3465c3b33b9645273ab02 (patch) | |
tree | 426df38ac585285c3b18e3b4575b297fcd4d9e59 /lib/Target/Alpha/AlphaISelDAGToDAG.cpp | |
parent | 8c132633c86a7e496f84e3458c47520d0cc4d938 (diff) | |
download | external_llvm-eaf089430e7681fcddc3465c3b33b9645273ab02.zip external_llvm-eaf089430e7681fcddc3465c3b33b9645273ab02.tar.gz external_llvm-eaf089430e7681fcddc3465c3b33b9645273ab02.tar.bz2 |
Enhance APFloat to retain bits of NaNs (fixes oggenc).
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaISelDAGToDAG.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp index 4f7533c..df976fd 100644 --- a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp +++ b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp @@ -131,15 +131,15 @@ namespace { static bool isFPZ(SDOperand N) { ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(N); - return (CN && (CN->isExactlyValue(+0.0) || CN->isExactlyValue(-0.0))); + return (CN && (CN->getValueAPF().isZero())); } static bool isFPZn(SDOperand N) { ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(N); - return (CN && CN->isExactlyValue(-0.0)); + return (CN && CN->getValueAPF().isNegZero()); } static bool isFPZp(SDOperand N) { ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(N); - return (CN && CN->isExactlyValue(+0.0)); + return (CN && CN->getValueAPF().isPosZero()); } public: @@ -334,11 +334,11 @@ SDNode *AlphaDAGToDAGISel::Select(SDOperand Op) { ConstantFPSDNode *CN = cast<ConstantFPSDNode>(N); bool isDouble = N->getValueType(0) == MVT::f64; MVT::ValueType T = isDouble ? MVT::f64 : MVT::f32; - if (CN->isExactlyValue(+0.0)) { + if (CN->getValueAPF().isPosZero()) { return CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYST : Alpha::CPYSS, T, CurDAG->getRegister(Alpha::F31, T), CurDAG->getRegister(Alpha::F31, T)); - } else if ( CN->isExactlyValue(-0.0)) { + } else if (CN->getValueAPF().isNegZero()) { return CurDAG->SelectNodeTo(N, isDouble ? Alpha::CPYSNT : Alpha::CPYSNS, T, CurDAG->getRegister(Alpha::F31, T), CurDAG->getRegister(Alpha::F31, T)); |