diff options
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 877cf32..702f4e0 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -999,6 +999,16 @@ int_const_binop_1 (enum tree_code code, const_tree arg1, const_tree arg2, &res.low, &res.high); break; + case MULT_HIGHPART_EXPR: + /* ??? Need quad precision, or an additional shift operand + to the multiply primitive, to handle very large highparts. */ + if (TYPE_PRECISION (type) > HOST_BITS_PER_WIDE_INT) + return NULL_TREE; + tmp = double_int_mul (op1, op2); + res = double_int_rshift (tmp, TYPE_PRECISION (type), + TYPE_PRECISION (type), !uns); + break; + case TRUNC_DIV_EXPR: case FLOOR_DIV_EXPR: case CEIL_DIV_EXPR: case EXACT_DIV_EXPR: |