summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-09-10 06:26:10 +0000
committerBill Wendling <isanbard@gmail.com>2008-09-10 06:26:10 +0000
commit6987fec11cac132bc858cec4d2e4109a07487a01 (patch)
treec43407229ea4a8f98de54e2239fe599aeb7d4c15 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
parent999096065f97f762950459bc912e1f720bd624fa (diff)
downloadbcm5719-llvm-6987fec11cac132bc858cec4d2e4109a07487a01.tar.gz
bcm5719-llvm-6987fec11cac132bc858cec4d2e4109a07487a01.zip
Remove unnecessary bit-wise AND from the limited precision work.
llvm-svn: 56049
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 2c3851332a2..57b6768528f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud