diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-06-21 11:04:04 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-06-21 11:04:04 -0700 |
commit | 97e31a0a2a2d2273687fcdb4e5416aab1a2186e1 (patch) | |
tree | d5c1cae4de436a0fe54a5f0a2a197d309f3d654c /gcc/tree-loop-distribution.cc | |
parent | 6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced (diff) | |
parent | 577223aebc7acdd31e62b33c1682fe54a622ae27 (diff) | |
download | gcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.zip gcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.tar.gz gcc-97e31a0a2a2d2273687fcdb4e5416aab1a2186e1.tar.bz2 |
Merge from trunk revision 577223aebc7acdd31e62b33c1682fe54a622ae27.
Diffstat (limited to 'gcc/tree-loop-distribution.cc')
-rw-r--r-- | gcc/tree-loop-distribution.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/tree-loop-distribution.cc b/gcc/tree-loop-distribution.cc index 431bd45..cf7c197 100644 --- a/gcc/tree-loop-distribution.cc +++ b/gcc/tree-loop-distribution.cc @@ -453,7 +453,7 @@ create_edge_for_control_dependence (struct graph *rdg, basic_block bb, 0, edge_n, bi) { basic_block cond_bb = cd->get_edge_src (edge_n); - gimple *stmt = last_stmt (cond_bb); + gimple *stmt = *gsi_last_bb (cond_bb); if (stmt && is_ctrl_stmt (stmt)) { struct graph_edge *e; @@ -1756,11 +1756,12 @@ classify_builtin_st (loop_p loop, partition *partition, data_reference_p dr) return; } - poly_uint64 base_offset; - unsigned HOST_WIDE_INT const_base_offset; - tree base_base = strip_offset (base, &base_offset); - if (!base_offset.is_constant (&const_base_offset)) + tree base_offset; + tree base_base; + split_constant_offset (base, &base_base, &base_offset); + if (!cst_and_fits_in_hwi (base_offset)) return; + unsigned HOST_WIDE_INT const_base_offset = int_cst_value (base_offset); struct builtin_info *builtin; builtin = alloc_builtin (dr, NULL, base, NULL_TREE, size); @@ -3587,7 +3588,7 @@ loop_distribution::transform_reduction_loop (loop_p loop) data_reference_p load_dr = NULL, store_dr = NULL; edge e = single_exit (loop); - gcond *cond = safe_dyn_cast <gcond *> (last_stmt (e->src)); + gcond *cond = safe_dyn_cast <gcond *> (*gsi_last_bb (e->src)); if (!cond) return false; /* Ensure loop condition is an (in)equality test and loop is exited either if |