diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-09-10 06:26:10 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-09-10 06:26:10 +0000 |
commit | fc2508eb78eb4e754c85e01e082fcd79e7e66645 (patch) | |
tree | 0cd0ca3d3470fe0c81c44d3690fb040d1853ae6e /lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | c0c3b9a3d07a86490c4dae66e4f4c8eb40dec339 (diff) |
Remove unnecessary bit-wise AND from the limited precision work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 2c3851332a..57b6768528 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -2755,18 +2755,16 @@ GetSignificand(SelectionDAG &DAG, SDValue Op) { // GetExponent - Get the exponent: // -// (float)(((Op1 & 0x7f800000) >> 23) - 127); +// (float)((Op1 >> 23) - 127); // // where Op is the hexidecimal representation of floating point value. static SDValue GetExponent(SelectionDAG &DAG, SDValue Op) { - SDValue t1 = DAG.getNode(ISD::AND, MVT::i32, Op, - DAG.getConstant(0x7f800000, MVT::i32)); - SDValue t2 = DAG.getNode(ISD::SRL, MVT::i32, t1, + SDValue t1 = DAG.getNode(ISD::SRL, MVT::i32, Op, DAG.getConstant(23, MVT::i32)); - SDValue t3 = DAG.getNode(ISD::SUB, MVT::i32, t2, + SDValue t2 = DAG.getNode(ISD::SUB, MVT::i32, t1, DAG.getConstant(127, MVT::i32)); - return DAG.getNode(ISD::UINT_TO_FP, MVT::f32, t3); + return DAG.getNode(ISD::UINT_TO_FP, MVT::f32, t2); } /// Inlined utility function to implement binary input atomic intrinsics for |