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
+2017-09-21 Richard Sandiford <richard.sandiford@linaro.org>
+ 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>
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);
}