diff options
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 4b805aa..86a587d 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -627,7 +627,7 @@ split_constant_offset_1 (tree type, tree op0, enum tree_code code, tree op1, case ADDR_EXPR: { tree base, poffset; - HOST_WIDE_INT pbitsize, pbitpos; + poly_int64 pbitsize, pbitpos, pbytepos; machine_mode pmode; int punsignedp, preversep, pvolatilep; @@ -636,10 +636,10 @@ split_constant_offset_1 (tree type, tree op0, enum tree_code code, tree op1, = get_inner_reference (op0, &pbitsize, &pbitpos, &poffset, &pmode, &punsignedp, &preversep, &pvolatilep); - if (pbitpos % BITS_PER_UNIT != 0) + if (!multiple_p (pbitpos, BITS_PER_UNIT, &pbytepos)) return false; base = build_fold_addr_expr (base); - off0 = ssize_int (pbitpos / BITS_PER_UNIT); + off0 = ssize_int (pbytepos); if (poffset) { @@ -789,7 +789,7 @@ bool dr_analyze_innermost (innermost_loop_behavior *drb, tree ref, struct loop *loop) { - HOST_WIDE_INT pbitsize, pbitpos; + poly_int64 pbitsize, pbitpos; tree base, poffset; machine_mode pmode; int punsignedp, preversep, pvolatilep; @@ -804,7 +804,8 @@ dr_analyze_innermost (innermost_loop_behavior *drb, tree ref, &punsignedp, &preversep, &pvolatilep); gcc_assert (base != NULL_TREE); - if (pbitpos % BITS_PER_UNIT != 0) + poly_int64 pbytepos; + if (!multiple_p (pbitpos, BITS_PER_UNIT, &pbytepos)) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "failed: bit offset alignment.\n"); @@ -885,7 +886,7 @@ dr_analyze_innermost (innermost_loop_behavior *drb, tree ref, } } - init = ssize_int (pbitpos / BITS_PER_UNIT); + init = ssize_int (pbytepos); /* Subtract any constant component from the base and add it to INIT instead. Adjust the misalignment to reflect the amount we subtracted. */ |