This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] loop invariant motion expensive codes


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]