diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-09-21 11:10:48 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-09-21 11:10:48 +0000 |
commit | 6b1237e30840dac66ae8d16507581c948c76c52c (patch) | |
tree | ff694be8822ad7a6a67ce2c206bab3d21f8b5dad /gcc | |
parent | 2e89be4857edfbbcfcca261079c868d70341feb1 (diff) | |
download | gcc-6b1237e30840dac66ae8d16507581c948c76c52c.zip gcc-6b1237e30840dac66ae8d16507581c948c76c52c.tar.gz gcc-6b1237e30840dac66ae8d16507581c948c76c52c.tar.bz2 |
Add copy_rtx call to RTL loop unroller
This is needed if the step is an unshared constant, like many
(const ...)s are. Without this patch, libgfortran would fail
to build for SVE.
2017-09-21 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* loop-unroll.c (split_iv): Call copy_rtx on the step.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r253058
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/loop-unroll.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8d78c7..7eec767 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,12 @@ Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> + * loop-unroll.c (split_iv): Call copy_rtx on the step. + +2017-09-21 Richard Sandiford <richard.sandiford@linaro.org> + Alan Hayward <alan.hayward@arm.com> + David Sherwood <david.sherwood@arm.com> + * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before calling tree_to_uhwi. diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 8cf305b..322f151 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -1731,7 +1731,8 @@ split_iv (struct iv_to_split *ivts, rtx_insn *insn, unsigned delta) else { incr = simplify_gen_binary (MULT, mode, - ivts->step, gen_int_mode (delta, mode)); + copy_rtx (ivts->step), + gen_int_mode (delta, mode)); expr = simplify_gen_binary (PLUS, GET_MODE (ivts->base_var), ivts->base_var, incr); } |