[PATCH] D27898: [compiler-rt] [builtins] Implement __floattitf() & __floatuntitf()

Steve Canon via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 22 10:36:16 PST 2016


scanon added inline comments.


================
Comment at: lib/builtins/floattitf.c:65
+        if (a & ((tu_int)1 << LDBL_MANT_DIG)) {
+            a >>= 1;
+            ++e;
----------------
Strictly speaking there's no need to adjust `a` here. If we rounded up into a new binade, then `a` is necessarily `0b1000...0`, and the leading 1 bit will get killed by the mask when we assemble `fb.u.high.all` regardless of its position. Same comment applies to floatuntitf.


https://reviews.llvm.org/D27898





More information about the cfe-commits mailing list