diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-01-02 18:07:15 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-01-02 18:07:15 +0100 |
commit | bc470c243a8bbecdb92f2a7f4636f92db6fe0120 (patch) | |
tree | 5ef681ee68f0e49503bc7fb851a8a95b133b3c40 /gcc/cfgexpand.c | |
parent | 7dfef5845a42894b26155ecc65844a03f1b4fb5e (diff) | |
download | gcc-bc470c243a8bbecdb92f2a7f4636f92db6fe0120.zip gcc-bc470c243a8bbecdb92f2a7f4636f92db6fe0120.tar.gz gcc-bc470c243a8bbecdb92f2a7f4636f92db6fe0120.tar.bz2 |
re PR rtl-optimization/47028 (gcc.dg/tree-ssa/tailrecursion-[57].c FAIL with -foptimize-sibling-calls -fno-forward-propagate -fno-tree-copy-prop -fno-tree-dominator-opts)
PR rtl-optimization/47028
* cfgexpand.c (gimple_expand_cfg): Insert entry edge
insertions after parm_birth_insn instead of at the beginning
of first bb.
* gcc.dg/pr47028.c: New test.
From-SVN: r168401
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index a3940d0..13c63be 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -4085,7 +4085,19 @@ gimple_expand_cfg (void) for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); ) { if (e->insns.r) - commit_one_edge_insertion (e); + { + /* Avoid putting insns before parm_birth_insn. */ + if (e->src == ENTRY_BLOCK_PTR + && single_succ_p (ENTRY_BLOCK_PTR) + && parm_birth_insn) + { + rtx insns = e->insns.r; + e->insns.r = NULL_RTX; + emit_insn_after_noloc (insns, parm_birth_insn, e->dest); + } + else + commit_one_edge_insertion (e); + } else ei_next (&ei); } |