This is the mail archive of the gcc-bugs@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]

[Bug middle-end/40106] [4.4/4.5 Regression] Weird interaction between optimize_insn_for_speed_p and -funsafe-math-optimizations



------- Comment #42 from rguenther at suse dot de  2010-03-16 16:07 -------
Subject: Re:  [4.4/4.5 Regression] Weird interaction
 between optimize_insn_for_speed_p and -funsafe-math-optimizations

On Tue, 16 Mar 2010, dominiq at lps dot ens dot fr wrote:

> 
> 
> ------- Comment #41 from dominiq at lps dot ens dot fr  2010-03-16 16:04 -------
> > > > Especially on embedded targets with soft-float the multiplication would
> > > > add a significant code size penalty.
> > > 
> > > Even in this case this would strongly of the code. It may be true if other
> > > pieces require log and exp. If not I seriously doubt that replacing the code
> > > for multiplies and square roots will be larger than the code for log and exp.
> > 
> > Parse error.
> 
> Sorry, is "stongly depend on the code" and  "If not, I seriously doubt that
> replacing the code for multiplies and square roots will be larger than the code
> for log and exp." better? 
> 
> pow(a,b) == exp(b*log(a)), so if 'a' is not a constant, you need the code for
> log and exp to evaluate x*sqrt(x) as pow(x,1.5), instead of the code for
> multiply and sqrt (note that I cannot see how the code for log and exp could
> not require the code for multiply). If log or exp codes are not needed by other
> parts of the whole program, x*sqrt(x) will almost certainly gives a more
> compact code than pow(x,1.5).

log, exp?  What code are you looking at now?

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40106


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