re PR rtl-optimization/80500 (ICE: internal consistency failure (error: invalid rtl sharing found in the insn))
PR rtl-optimization/80500 * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on sum's initial value. * gcc.dg/pr80500.c: New test. From-SVN: r247127
This commit is contained in:
parent
a1f0186093
commit
75092192da
|
@ -1,3 +1,9 @@
|
||||||
|
2017-04-25 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR rtl-optimization/80500
|
||||||
|
* loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
|
||||||
|
sum's initial value.
|
||||||
|
|
||||||
2017-04-24 Martin Liska <mliska@suse.cz>
|
2017-04-24 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
Backport from mainline
|
Backport from mainline
|
||||||
|
|
|
@ -1913,6 +1913,9 @@ combine_var_copies_in_loop_exit (struct var_to_expand *ve, basic_block place)
|
||||||
if (ve->var_expansions.length () == 0)
|
if (ve->var_expansions.length () == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* ve->reg might be SUBREG or some other non-shareable RTL, and we use
|
||||||
|
it both here and as the destination of the assignment. */
|
||||||
|
sum = copy_rtx (sum);
|
||||||
start_sequence ();
|
start_sequence ();
|
||||||
switch (ve->op)
|
switch (ve->op)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2017-04-25 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR rtl-optimization/80500
|
||||||
|
* gcc.dg/pr80500.c: New test.
|
||||||
|
|
||||||
2017-04-24 Martin Liska <mliska@suse.cz>
|
2017-04-24 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
Backport from mainline
|
Backport from mainline
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
/* PR rtl-optimization/80500 */
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-O2 -funroll-loops -ftree-loop-if-convert -fvariable-expansion-in-unroller" } */
|
||||||
|
|
||||||
|
signed char v;
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (int x)
|
||||||
|
{
|
||||||
|
while (x != 0)
|
||||||
|
{
|
||||||
|
v = (x >= 0) + 1;
|
||||||
|
++x;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue