summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/fp_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/builtins/fp_lib.h')
-rw-r--r--compiler-rt/lib/builtins/fp_lib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/builtins/fp_lib.h b/compiler-rt/lib/builtins/fp_lib.h
index d1a988ea471..e2a906681c4 100644
--- a/compiler-rt/lib/builtins/fp_lib.h
+++ b/compiler-rt/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) {
OpenPOWER on IntegriCloud