This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] loop invariant motion expensive codes
- From: Jeffrey A Law <law at redhat dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, Zdenek Dvorak <dvorakz at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 31 Mar 2005 09:58:34 -0700
- Subject: Re: [PATCH] loop invariant motion expensive codes
- Organization: Red Hat, Inc
- References: <200503311550.j2VFovD26012@makai.watson.ibm.com> <20050331155639.GA5932@topo.toronto.redhat.com>
- Reply-to: law at redhat dot com
On Thu, 2005-03-31 at 10:56 -0500, Diego Novillo wrote:
> On Thu, Mar 31, 2005 at 10:50:57AM -0500, David Edelsohn wrote:
>
> > * tree-ssa-loop-im.c (stmt_cost): Add RDIV_EXPR to list of
> > expensive operations.
> >
> OK.
Err, umm...
First, to move the divide you must be sure the division will always
execute in its original position. Otherwise you can introduce a
spurious divide by zero fault.
We have also avoided hoisting division operations in the past as
doing so changes the point at which a divide by zero fault will
occur.
jeff