public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/16482] [4.0 Regression] gcc.c-torture/unsorted/SFset.c fails with "-O2 -m4" Date: Fri, 15 Oct 2004 15:49:00 -0000 [thread overview] Message-ID: <20041015154906.23732.qmail@sourceware.org> (raw) In-Reply-To: <20040711232647.16482.kkojima@gcc.gnu.org> ------- Additional Comments From amylaar at gcc dot gnu dot org 2004-10-15 15:49 ------- Looking closer, I see that sched-deps.c already has code to keep branches, calls and USEs at the end of the last basic block. The problem is that lcm.c:optimize_mode_switching has put some instructions after the USE before sched1 is run. In this code: /* Split the edge from the entry block and the fallthrough edge to the exit block, so that we can note that there NORMAL_MODE is supplied / required. */ edge eg; edge_iterator ei; post_entry = split_edge (EDGE_SUCC (ENTRY_BLOCK_PTR, 0)); /* The only non-call predecessor at this stage is a block with a fallthrough edge; there can be at most one, but there could be none at all, e.g. when exit is called. */ pre_exit = 0; FOR_EACH_EDGE (eg, ei, EXIT_BLOCK_PTR->preds) if (eg->flags & EDGE_FALLTHRU) { regset live_at_end = eg->src->global_live_at_end; gcc_assert (!pre_exit); pre_exit = split_edge (eg); COPY_REG_SET (pre_exit->global_live_at_start, live_at_end); COPY_REG_SET (pre_exit->global_live_at_end, live_at_end); break; } } We create a new block at the end to put the final mode switch into. If the fall-through predecessor of the exit block is the only predecessor of the exit block, and it ends with a USE, then instead of split_edge we should use split_block, to place the USE and the preceding copy from the result to the return value register into the new block. I would write a patch for this, but the copyright assignment for STM is not finished yet. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16482
next prev parent reply other threads:[~2004-10-15 15:49 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-07-11 23:26 [Bug target/16482] New: " kkojima at gcc dot gnu dot org 2004-07-11 23:32 ` [Bug target/16482] " kkojima at gcc dot gnu dot org 2004-07-12 4:35 ` [Bug target/16482] [3.5 Regression] " pinskia at gcc dot gnu dot org 2004-10-13 2:19 ` [Bug target/16482] [4.0 " pinskia at gcc dot gnu dot org 2004-10-15 13:35 ` amylaar at gcc dot gnu dot org 2004-10-15 14:23 ` kkojima at gcc dot gnu dot org 2004-10-15 15:49 ` amylaar at gcc dot gnu dot org [this message] 2004-10-18 12:03 ` naveen dot sharma at noida dot hcltech dot com 2004-10-18 15:16 ` joern dot rennecke at superh-support dot com 2004-10-19 5:57 ` naveen dot sharma at noida dot hcltech dot com 2004-10-19 6:06 ` sanjivkumargupta at yahoo dot com 2004-12-01 18:19 ` pinskia at gcc dot gnu dot org 2004-12-01 18:38 ` joern dot rennecke at st dot com 2005-01-05 14:41 ` cvs-commit at gcc dot gnu dot org 2005-01-05 14:50 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20041015154906.23732.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).