aboutsummaryrefslogtreecommitdiff
path: root/gcc/range-op.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/range-op.c')
-rw-r--r--gcc/range-op.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/range-op.c b/gcc/range-op.c
index 61917274296..9837710db01 100644
--- a/gcc/range-op.c
+++ b/gcc/range-op.c
@@ -1011,6 +1011,14 @@ bool
operator_multiply::op1_irange (irange& r, const irange& lhs,
const irange& op2) const
{
+ wide_int c;
+ // For overflow types. all we know is that the lower "precsion / 2" bits
+ // match up with the range of the LHS. See if we know anything about
+ // the zero bits.
+ if (lhs.singleton_p (c) && TYPE_OVERFLOW_WRAPS (lhs.get_type ()))
+ {
+ return false;
+ }
return op_rr (OPM_DIV, r, lhs, op2);
}
@@ -1018,6 +1026,14 @@ bool
operator_multiply::op2_irange (irange& r, const irange& lhs,
const irange& op1) const
{
+ wide_int c;
+ // For overflow types. all we know is that the lower "precsion / 2" bits
+ // match up with the range of the LHS. See if we know anything about
+ // the zero bits.
+ if (lhs.singleton_p (c) && TYPE_OVERFLOW_WRAPS (lhs.get_type ()))
+ {
+ return false;
+ }
return op_rr (OPM_DIV, r, lhs, op1);
}