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/loop-unroll.c | |
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/loop-unroll.c')
-rw-r--r-- | gcc/loop-unroll.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |