Adds an extra explicit cast to fix Bug 7931 and removes codepaths that were never used

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@111269 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/floatunsidf.c b/lib/floatunsidf.c
index 1342c3c..05242c1 100644
--- a/lib/floatunsidf.c
+++ b/lib/floatunsidf.c
@@ -27,17 +27,9 @@
     const int exponent = (aWidth - 1) - __builtin_clz(a);
     rep_t result;
     
-    // Shift a into the significand field, rounding if it is a right-shift
-    if (exponent <= significandBits) {
-        const int shift = significandBits - exponent;
-        result = (rep_t)a << shift ^ implicitBit;
-    } else {
-        const int shift = exponent - significandBits;
-        result = (rep_t)a >> shift ^ implicitBit;
-        rep_t round = (rep_t)a << (typeWidth - shift);
-        if (round > signBit) result++;
-        if (round == signBit) result += result & 1;
-    }
+    // Shift a into the significand field and clear the implicit bit.
+    const int shift = significandBits - exponent;
+    result = (rep_t)a << shift ^ implicitBit;
     
     // Insert the exponent
     result += (rep_t)(exponent + exponentBias) << significandBits;