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 rtl-optimization/33638] [4.3 regression]: wrong code with -fforce-addr



------- Comment #13 from kargl at gcc dot gnu dot org  2007-10-05 17:50 -------
(In reply to comment #9)
> > Hope this helps.
> Sure, I've got the problem. The problem is actually in RTL optimization, where
> dse1 pass removes wrong insn.
> 
> Suprisingly, the problem is in line 61 of comunpack.f:
> 
> -->   bscale = 2.0**real(idrstmpl(2))
>       dscale = 10.0**real(-idrstmpl(3))
> 

This meant for Manfred instead of Uros, but it does contain the 
relevant info.  Manfred, you told me elsewhere that you use -fforce-addr
to achieve better performance.  Whoever wrote this code should be
flogged.  idrstmpl is an INTEGER variable, and gfortran can generate
much faster code for integer exponents than calling __builtin_powf.

Try changing the lines to

  bscale = 2.0**idrstmpl(2)
  dscale = 10.0**(-idrstmpl(3))

This, of course, doesn't fix the underlying bug.


-- 


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


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