summaryrefslogtreecommitdiff
path: root/lib/builtins/fp_lib.h
diff options
context:
space:
mode:
authorRumeet Dhindsa <rdhindsa@google.com>2019-09-24 02:59:02 +0000
committerRumeet Dhindsa <rdhindsa@google.com>2019-09-24 02:59:02 +0000
commitfe62c81099a0b246783b8f1d1434219a5fdc08e6 (patch)
tree426d3bf16adadb6a63fd1513a0bf9ab93bb8da20 /lib/builtins/fp_lib.h
parent0690f4e61e8a2fdf221d6c061d7a05e7c2fa52dc (diff)
downloadcompiler-rt-fe62c81099a0b246783b8f1d1434219a5fdc08e6.tar.gz
Fix int to bool errors exposed due to r372612.
Differential Revision: https://reviews.llvm.org/D67937 M lib/builtins/fp_add_impl.inc M lib/builtins/fp_lib.h M lib/builtins/fp_trunc_impl.inc git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@372684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/fp_lib.h')
-rw-r--r--lib/builtins/fp_lib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/builtins/fp_lib.h b/lib/builtins/fp_lib.h
index d1a988ea4..e2a906681 100644
--- a/lib/builtins/fp_lib.h
+++ b/lib/builtins/fp_lib.h
@@ -245,7 +245,7 @@ static __inline void wideLeftShift(rep_t *hi, rep_t *lo, int count) {
static __inline void wideRightShiftWithSticky(rep_t *hi, rep_t *lo,
unsigned int count) {
if (count < typeWidth) {
- const bool sticky = *lo << (typeWidth - count);
+ const bool sticky = (*lo << (typeWidth - count)) != 0;
*lo = *hi << (typeWidth - count) | *lo >> count | sticky;
*hi = *hi >> count;
} else if (count < 2 * typeWidth) {