mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 23:41:13 +08:00
re PR rtl-optimization/61220 (ICE on valid code at -O2 on x86_64-linux-gnu in maybe_record_trace_start, at dwarf2cfi.c:2239)
ChangeLog: 2014-05-26 Zhenqiang Chen <zhenqiang.chen@linaro.org> PR rtl-optimization/61220 Part of PR rtl-optimization/61225 * shrink-wrap.c (move_insn_for_shrink_wrap): Skip SP and FP adjustment insn; skip split_edge for a block with only one successor. testsuite/ChangeLog: 2014-05-26 Zhenqiang Chen <zhenqiang.chen@linaro.org> * gcc.dg/pr61220.c: New test. * gcc.dg/shrink-wrap-loop.c: Disable for x86_64 -m32 mode. From-SVN: r210921
This commit is contained in:
parent
97ae6b6443
commit
88f32f0f92
gcc
@ -1,3 +1,11 @@
|
||||
ChangeLog:
|
||||
2014-05-26 Zhenqiang Chen <zhenqiang.chen@linaro.org>
|
||||
|
||||
PR rtl-optimization/61220
|
||||
Part of PR rtl-optimization/61225
|
||||
* shrink-wrap.c (move_insn_for_shrink_wrap): Skip SP and FP adjustment
|
||||
insn; skip split_edge for a block with only one successor.
|
||||
|
||||
2014-05-23 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
* symtab.c (symtab_nonoverwritable_alias): Copy READONLY flag for variables.
|
||||
|
@ -179,7 +179,12 @@ move_insn_for_shrink_wrap (basic_block bb, rtx insn,
|
||||
return false;
|
||||
src = SET_SRC (set);
|
||||
dest = SET_DEST (set);
|
||||
if (!REG_P (dest) || !REG_P (src))
|
||||
if (!REG_P (dest) || !REG_P (src)
|
||||
/* STACK or FRAME related adjustment might be part of prologue.
|
||||
So keep them in the entry block. */
|
||||
|| dest == stack_pointer_rtx
|
||||
|| dest == frame_pointer_rtx
|
||||
|| dest == hard_frame_pointer_rtx)
|
||||
return false;
|
||||
|
||||
/* Make sure that the source register isn't defined later in BB. */
|
||||
@ -204,6 +209,10 @@ move_insn_for_shrink_wrap (basic_block bb, rtx insn,
|
||||
/* Create a new basic block on the edge. */
|
||||
if (EDGE_COUNT (next_block->preds) == 2)
|
||||
{
|
||||
/* split_edge for a block with only one successor is meaningless. */
|
||||
if (EDGE_COUNT (bb->succs) == 1)
|
||||
return false;
|
||||
|
||||
next_block = split_edge (live_edge);
|
||||
|
||||
bitmap_copy (df_get_live_in (next_block), df_get_live_out (bb));
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-05-26 Zhenqiang Chen <zhenqiang.chen@linaro.org>
|
||||
|
||||
* gcc.dg/pr61220.c: New test.
|
||||
* gcc.dg/shrink-wrap-loop.c: Disable for x86_64 -m32 mode.
|
||||
|
||||
2014-05-25 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
* gfortran.dg/coarray_10.f90: Update dg-warning.
|
||||
|
39
gcc/testsuite/gcc.dg/pr61220.c
Normal file
39
gcc/testsuite/gcc.dg/pr61220.c
Normal file
@ -0,0 +1,39 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -g" } */
|
||||
|
||||
int a, c, d, e, f, g, h, i, j, k;
|
||||
|
||||
struct S0
|
||||
{
|
||||
int f0;
|
||||
int f1;
|
||||
int f2;
|
||||
};
|
||||
|
||||
struct S1
|
||||
{
|
||||
int f0;
|
||||
int f1;
|
||||
struct S0 f2;
|
||||
} b;
|
||||
|
||||
void
|
||||
fn1 (struct S1 p)
|
||||
{
|
||||
for (; k; k++)
|
||||
h = j ? a : a - 1;
|
||||
d &= i;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int l[5] = { 0 };
|
||||
fn1 (b);
|
||||
for (c = 0; c < 3; c++)
|
||||
for (g = 0; g < 3; g++)
|
||||
l[c * 2] = e = l[c];
|
||||
if (f)
|
||||
fn1 (b);
|
||||
return 0;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* { dg-do compile { target { { x86_64-*-* } || { arm_thumb2 } } } } */
|
||||
/* { dg-do compile { target { { x86_64-*-* && lp64 } || { arm_thumb2 } } } } */
|
||||
/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue" } */
|
||||
|
||||
int foo (int *p1, int *p2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user