public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz> To: hubicka@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: optimization/10024 [3.3 regression] [HP-PA] inline optimization ICE Date: Sun, 06 Apr 2003 12:06:00 -0000 [thread overview] Message-ID: <20030406120600.21195.qmail@sources.redhat.com> (raw) The following reply was made to PR optimization/10024; it has been noted by GNATS. From: Jan Hubicka <jh@suse.cz> To: Richard Henderson <rth@redhat.com>, Zack Weinberg <zack@codesourcery.com>, gcc-patches@gcc.gnu.org, gcc-gnats@gcc.gnu.org, tausq@debian.org Cc: Subject: Re: optimization/10024 [3.3 regression] [HP-PA] inline optimization ICE Date: Sun, 6 Apr 2003 14:01:39 +0200 > On Wed, Mar 26, 2003 at 10:27:54AM -0800, Zack Weinberg wrote: > > * cfgrtl.c (force_nonfallthru_and_redirect): If e is the edge > > we want, use it. > > Yes, this is ok for 3.3. I am attaching the fix I sent some time ago. It fixes the checking failure as well and fixes force_nonfallthru_and_redirect slightly differently - it just bypass the code when redirection is noop. I beleive it is slightly more safe as still we may have instruction with multiple outgoing edges where Zacks code would result in misscompilation (mine would die, not much better) From jh@suse.cz Tue Apr 1 19:16:18 2003 Return-Path: <jh@suse.cz> Delivered-To: hubicka@kam.mff.cuni.cz Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by nikam.ms.mff.cuni.cz (Postfix) with ESMTP id C23DF4DE86 for <hubicka@kam.mff.cuni.cz>; Tue, 1 Apr 2003 19:16:18 +0200 (CEST) Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id D7082151F7 for <hubicka@kam.mff.cuni.cz>; Tue, 1 Apr 2003 19:11:36 +0200 (MEST) Delivered-To: jh@localhost.suse.de Delivered-To: jh@suse.cz Received: from chimera.suse.cz [10.20.0.2] by localhost with POP3 (fetchmail-5.9.13) for jh@localhost (single-drop); Tue, 01 Apr 2003 19:08:43 +0200 (CEST) Received: from kerberos.suse.cz (kerberos.suse.cz [10.20.16.1]) by chimera.suse.cz (Postfix) with ESMTP id 74C0F3F96 for <jh@suse.cz>; Tue, 1 Apr 2003 19:05:41 +0200 (CEST) Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.18.106]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 4FB5459D368 for <jh@suse.cz>; Tue, 1 Apr 2003 19:05:41 +0200 (CEST) Received: from camelot.ms.mff.cuni.cz (kampanus.ms.mff.cuni.cz [195.113.18.107]) by nikam.ms.mff.cuni.cz (Postfix) with SMTP id 97D0D4DE86; Tue, 1 Apr 2003 19:05:42 +0200 (CEST) Received: by camelot.ms.mff.cuni.cz (sSMTP sendmail emulation); Tue, 1 Apr 2003 19:05:44 +0200 Date: Tue, 1 Apr 2003 19:05:44 +0200 From: Jan Hubicka <jh@suse.cz> To: Mark Mitchell <mark@codesourcery.com> Cc: jh@suse.cz, gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, rth@redhat.com Subject: Re: 3.3 PRs Message-ID: <20030401170544.GK904@kam.mff.cuni.cz> References: <200303311835.h2VIZvYF011397@sirius.codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200303311835.h2VIZvYF011397@sirius.codesourcery.com> User-Agent: Mutt/1.3.28i X-UIDL: k<g"!<nM"!n7K!!/Un"! X-Spam-Status: No, hits=-4.4 required=5.0 tests=IN_REP_TO version=2.20 X-Spam-Level: Status: RO Content-Length: 3742 Lines: 108 > > Jan -- > > There are a bunch of 3.3 PRs with your name on them. Let's get these > resolved ASAP. > > target/9929 ice-on-legal-code: > > Janis tracked this problem to one of your changes. > > You proposed a patch for this, and the discussion ends here: > > http://gcc.gnu.org/ml/gcc-patches/2003-03/msg02281.html > > RTH suggested an alternative way of fixing the problem; please > prepare a patch and submit it. > > optimization/8634 wrong-code: > > Janis tracked this problem to one of your changes. > > optimization/10056 ice-on-legal-code: > > You checked in a patch for this on March 25: > > Tue Mar 25 20:48:05 CET 2003 Jan Hubicka <jh@suse.cz> > > PR opt/10056 > > but the PR is still open. If you fixed it, would you close the PR? > > If not, what's up? > > optimization/10024 ice-on-legal-code: > > This seems like the same issue as 10056. Actually it is not. The attached patch should fix it OK for mainline/branch? I will install the testcase into compile of gcc-torture extern int * allegro_errno; typedef long fixed; extern inline int fixfloor (fixed x) { if (x >= 0) return (x >> 16); else return ~((~x) >> 16); } extern inline int fixtoi (fixed x) { return fixfloor(x) + ((x & 0x8000) >> 15); } extern inline fixed ftofix (double x) { if (x > 32767.0) { *allegro_errno = 34; return 0x7FFFFFFF; } if (x < -32767.0) { *allegro_errno = 34; return -0x7FFFFFFF; } return (long)(x * 65536.0 + (x < 0 ? -0.5 : 0.5)); } extern inline double fixtof (fixed x) { return (double)x / 65536.0; } extern inline fixed fixdiv (fixed x, fixed y) { if (y == 0) { *allegro_errno = 34; return (x < 0) ? -0x7FFFFFFF : 0x7FFFFFFF; } else return ftofix(fixtof(x) / fixtof(y)); } extern inline fixed itofix (int x) { return x << 16; } int foo(int n) { return fixtoi(fixdiv(itofix(512), itofix(n))); } Tue Apr 1 19:02:47 CEST 2003 Jan Hubicka <jh@suse.cz> PR opt/10024 * cfglayout.c (cfg_layout_redirect_edge): Update the jump. * cfgrtl.c (force_nonfallthru_and_redirect): Do not special case the fallthru edges when called via cfglayout.c Index: cfglayout.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cfglayout.c,v retrieving revision 1.30 diff -c -3 -p -r1.30 cfglayout.c *** cfglayout.c 30 Mar 2003 20:46:56 -0000 1.30 --- cfglayout.c 1 Apr 2003 17:02:13 -0000 *************** cfg_layout_redirect_edge (e, dest) *** 904,909 **** --- 902,914 ---- src->next_bb = NULL; if (e->flags & EDGE_FALLTHRU) { + /* Redirect also the branch edges unified with the fallthru one. */ + if (GET_CODE (src->end) == JUMP_INSN + && JUMP_LABEL (src->end) == e->dest->head) + { + if (!redirect_jump (src->end, block_label (dest), 0)) + abort (); + } /* In case we are redirecting fallthru edge to the branch edge of conditional jump, remove it. */ if (src->succ->succ_next Index: cfgrtl.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v retrieving revision 1.70 diff -c -3 -p -r1.70 cfgrtl.c *** cfgrtl.c 30 Mar 2003 20:46:56 -0000 1.70 --- cfgrtl.c 1 Apr 2003 17:02:14 -0000 *************** force_nonfallthru_and_redirect (e, targe *** 926,931 **** --- 926,934 ---- by creating an basic block afterwards to redirect fallthru edge. */ if (e->src != ENTRY_BLOCK_PTR && e->dest != EXIT_BLOCK_PTR && any_condjump_p (e->src->end) + /* We may be called from cfglayout when the fallthru edges can go + arbitarily. */ + && e->src->next_bb == e->dest && JUMP_LABEL (e->src->end) == e->dest->head) { rtx note;
next reply other threads:[~2003-04-06 12:06 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-06 12:06 Jan Hubicka [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-04-06 19:46 Zack Weinberg 2003-04-06 0:26 Zack Weinberg 2003-04-05 23:16 Richard Henderson 2003-03-27 1:06 Jan Hubicka 2003-03-26 20:46 Zack Weinberg 2003-03-26 18:45 Zack Weinberg 2003-03-26 18:36 Zack Weinberg 2003-03-14 15:14 optimization/10024: " ebotcazou
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=20030406120600.21195.qmail@sources.redhat.com \ --to=jh@suse.cz \ --cc=gcc-prs@gcc.gnu.org \ --cc=hubicka@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).